{
  "openapi": "3.0.0",
  "paths": {
    "/auth/login": {
      "post": {
        "description": "Authenticates a user and returns a JWT token, or a temp token if 2FA is required.",
        "operationId": "AuthController_login",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponseDto"
                }
              }
            }
          }
        },
        "summary": "Login User",
        "tags": [
          "System"
        ]
      }
    },
    "/auth/2fa/verify-login": {
      "post": {
        "description": "Completes the two-factor authentication login by verifying a TOTP code or backup code.",
        "operationId": "AuthController_verify2FaLogin",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Verify2FaLoginDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponseDto"
                }
              }
            }
          }
        },
        "summary": "Verify 2FA Login",
        "tags": [
          "System"
        ]
      }
    },
    "/auth/2fa/setup": {
      "post": {
        "description": "Generates a TOTP secret, QR code, and backup codes for two-factor authentication setup.",
        "operationId": "AuthController_setup2Fa",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TwoFactorSetupResponseDto"
                }
              }
            }
          }
        },
        "summary": "Setup 2FA",
        "tags": [
          "System"
        ]
      }
    },
    "/auth/2fa/enable": {
      "post": {
        "description": "Enables two-factor authentication after verifying the setup code.",
        "operationId": "AuthController_enable2Fa",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Enable2FaDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Enable2FaResponseDto"
                }
              }
            }
          }
        },
        "summary": "Enable 2FA",
        "tags": [
          "System"
        ]
      }
    },
    "/auth/2fa/disable": {
      "post": {
        "description": "Disables two-factor authentication. Requires password and current TOTP code.",
        "operationId": "AuthController_disable2Fa",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Disable2FaDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Disable2FaResponseDto"
                }
              }
            }
          }
        },
        "summary": "Disable 2FA",
        "tags": [
          "System"
        ]
      }
    },
    "/auth/2fa/backup-codes/regenerate": {
      "post": {
        "description": "Regenerates two-factor authentication backup codes. Requires password and current TOTP code.",
        "operationId": "AuthController_regenerateBackupCodes",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegenerateBackupCodesDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegenerateBackupCodesResponseDto"
                }
              }
            }
          }
        },
        "summary": "Regenerate Backup Codes",
        "tags": [
          "System"
        ]
      }
    },
    "/auth/2fa/status": {
      "get": {
        "description": "Returns whether two-factor authentication is enabled for the current user.",
        "operationId": "AuthController_get2FaStatus",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TwoFactorStatusDto"
                }
              }
            }
          }
        },
        "summary": "Get 2FA Status",
        "tags": [
          "System"
        ]
      }
    },
    "/auth/me": {
      "get": {
        "description": "Returns the identity and role of the currently authenticated user.",
        "operationId": "AuthController_me",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Current User",
        "tags": [
          "System"
        ]
      }
    },
    "/roles": {
      "get": {
        "description": "Returns a list of all roles.",
        "operationId": "RolesController_findAll",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RoleDetailsDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Find all roles",
        "tags": [
          "System"
        ]
      }
    },
    "/roles/{role}": {
      "get": {
        "description": "Returns details for a specific role.",
        "operationId": "RolesController_findOne",
        "parameters": [
          {
            "name": "role",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleDetailsDto"
                }
              }
            }
          }
        },
        "summary": "Get role details",
        "tags": [
          "System"
        ]
      },
      "post": {
        "description": "Sets the permissions for a specific role.",
        "operationId": "RolesController_setPermissions",
        "parameters": [
          {
            "name": "role",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetRolePermissionsDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleDetailsDto"
                }
              }
            }
          }
        },
        "summary": "Set role permissions",
        "tags": [
          "System"
        ]
      },
      "delete": {
        "description": "Deletes a specific role.",
        "operationId": "RolesController_remove",
        "parameters": [
          {
            "name": "role",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RolesSuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Delete role",
        "tags": [
          "System"
        ]
      }
    },
    "/customers": {
      "get": {
        "description": "Retrieve a paginated list of customers.",
        "operationId": "CustomersController_findAll",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CustomerResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List Customers",
        "tags": [
          "Customers"
        ]
      },
      "post": {
        "description": "Create a new customer.",
        "operationId": "CustomersController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomerDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Customer",
        "tags": [
          "Customers"
        ]
      }
    },
    "/customers/aged-balances": {
      "get": {
        "description": "Retrieve aged balances for all customers with outstanding invoices.",
        "operationId": "CustomersController_getAgedBalances",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "agingBasis",
            "required": false,
            "in": "query",
            "schema": {
              "enum": [
                "invoiceDate",
                "dueDate"
              ],
              "type": "string"
            }
          },
          {
            "name": "quickFilter",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/AgedBalanceResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get Aged Balances",
        "tags": [
          "Customers"
        ]
      }
    },
    "/customers/{id}": {
      "get": {
        "description": "Retrieve a single customer by ID.",
        "operationId": "CustomersController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Customer",
        "tags": [
          "Customers"
        ]
      },
      "patch": {
        "description": "Update an existing customer.",
        "operationId": "CustomersController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCustomerDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Customer",
        "tags": [
          "Customers"
        ]
      }
    },
    "/customers/{id}/credit-assessment": {
      "get": {
        "description": "Retrieve the credit assessment for a customer.",
        "operationId": "CustomersController_getCreditAssessment",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditAssessmentResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Credit Assessment",
        "tags": [
          "Customers"
        ]
      }
    },
    "/customers/{id}/archive": {
      "post": {
        "description": "Archive a customer.",
        "operationId": "CustomersController_archive",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerResponseDto"
                }
              }
            }
          }
        },
        "summary": "Archive Customer",
        "tags": [
          "Customers"
        ]
      }
    },
    "/customers/{id}/unarchive": {
      "post": {
        "description": "Unarchive a customer.",
        "operationId": "CustomersController_unarchive",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerResponseDto"
                }
              }
            }
          }
        },
        "summary": "Unarchive Customer",
        "tags": [
          "Customers"
        ]
      }
    },
    "/customers/{id}/email-document": {
      "post": {
        "description": "Generates a Customer Statement PDF using the active customer statement template/hook and queues an email outbox message to the specified recipient.",
        "operationId": "CustomersController_emailDocument",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailDocumentDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Email queued successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Email Customer Statement Document",
        "tags": [
          "Customers"
        ]
      }
    },
    "/customer-groups": {
      "get": {
        "description": "Retrieve a list of all customer groups.",
        "operationId": "CustomerGroupsController_findAll",
        "parameters": [
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomerGroupResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "List Customer Groups",
        "tags": [
          "Customers"
        ]
      },
      "post": {
        "description": "Add a new customer group to the system.",
        "operationId": "CustomerGroupsController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomerGroupDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerGroupResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Customer Group",
        "tags": [
          "Customers"
        ]
      }
    },
    "/customer-groups/{id}": {
      "get": {
        "description": "Retrieve detailed information about a specific customer group.",
        "operationId": "CustomerGroupsController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerGroupResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Customer Group",
        "tags": [
          "Customers"
        ]
      },
      "patch": {
        "description": "Modify the details of an existing customer group.",
        "operationId": "CustomerGroupsController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCustomerGroupDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerGroupResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Customer Group",
        "tags": [
          "Customers"
        ]
      },
      "delete": {
        "description": "Remove a customer group from the system.",
        "operationId": "CustomerGroupsController_remove",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteCustomerGroupResponseDto"
                }
              }
            }
          }
        },
        "summary": "Delete Customer Group",
        "tags": [
          "Customers"
        ]
      }
    },
    "/pdf-templates/hooks/{hookSlug}/run": {
      "post": {
        "description": "Execute a specific reporting hook and generate a PDF document.",
        "operationId": "PdfTemplatesController_runHook",
        "parameters": [
          {
            "name": "hookSlug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "context",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunHookBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "PDF Document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          }
        },
        "summary": "Run Hook",
        "tags": [
          "System"
        ]
      }
    },
    "/pdf-templates/hooks": {
      "get": {
        "description": "Retrieve a list of available reporting hooks.",
        "operationId": "PdfTemplatesController_getHooks",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HookDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get Hooks",
        "tags": [
          "System"
        ]
      }
    },
    "/pdf-templates/hook-assignments": {
      "get": {
        "description": "Retrieve current template assignments for reporting hooks.",
        "operationId": "PdfTemplatesController_getAssignments",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HookAssignmentDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get Hook Assignments",
        "tags": [
          "System"
        ]
      }
    },
    "/pdf-templates/hook-assignments/{hook}": {
      "patch": {
        "description": "Update the assigned template and context for a reporting hook.",
        "operationId": "PdfTemplatesController_updateAssignment",
        "parameters": [
          {
            "name": "hook",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateHookAssignmentDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HookAssignmentDto"
                }
              }
            }
          }
        },
        "summary": "Update Hook Assignment",
        "tags": [
          "System"
        ]
      }
    },
    "/pdf-templates/hooks/{slug}/random-id": {
      "get": {
        "description": "Fetch a random valid entity ID for a given reporting context (used for previewing).",
        "operationId": "PdfTemplatesController_getRandomId",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RandomIdData"
                }
              }
            }
          }
        },
        "summary": "Get Random ID",
        "tags": [
          "System"
        ]
      }
    },
    "/pdf-templates": {
      "get": {
        "description": "Retrieve a list of all configured report templates.",
        "operationId": "PdfTemplatesController_getAllReports",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReportDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get All Reports",
        "tags": [
          "System"
        ]
      },
      "post": {
        "description": "Create a new custom report template.",
        "operationId": "PdfTemplatesController_createReport",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReportDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportDto"
                }
              }
            }
          }
        },
        "summary": "Create Report",
        "tags": [
          "System"
        ]
      }
    },
    "/pdf-templates/{id}": {
      "get": {
        "description": "Retrieve the details and template content of a specific report.",
        "operationId": "PdfTemplatesController_getReport",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportDto"
                }
              }
            }
          }
        },
        "summary": "Get Report",
        "tags": [
          "System"
        ]
      },
      "patch": {
        "description": "Modify the configuration or content of an existing report template.",
        "operationId": "PdfTemplatesController_updateReport",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateReportDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportDto"
                }
              }
            }
          }
        },
        "summary": "Update Report",
        "tags": [
          "System"
        ]
      },
      "delete": {
        "description": "Remove a report template from the system.",
        "operationId": "PdfTemplatesController_deleteReport",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportDto"
                }
              }
            }
          }
        },
        "summary": "Delete Report",
        "tags": [
          "System"
        ]
      }
    },
    "/pdf-templates/preview": {
      "post": {
        "description": "Generate a preview PDF of a report template using mock or real entity data.",
        "operationId": "PdfTemplatesController_preview",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewReportDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "PDF Document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          }
        },
        "summary": "Preview Report",
        "tags": [
          "System"
        ]
      }
    },
    "/emails": {
      "get": {
        "description": "List emails in the outbox queue.",
        "operationId": "EmailController_listEmails",
        "parameters": [
          {
            "name": "entityType",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entityId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of emails",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "List emails",
        "tags": [
          "System"
        ]
      }
    },
    "/emails/{id}/retry": {
      "post": {
        "description": "Retry sending a failed email.",
        "operationId": "EmailController_retryEmail",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Email updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Retry a failed email",
        "tags": [
          "System"
        ]
      }
    },
    "/emails/{id}/dismiss": {
      "post": {
        "description": "Dismiss a failed email so it is no longer shown as an error.",
        "operationId": "EmailController_dismissEmail",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Email dismissed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Dismiss a failed email",
        "tags": [
          "System"
        ]
      }
    },
    "/emails/test-connection": {
      "get": {
        "description": "Test SMTP connection",
        "operationId": "EmailController_testConnection",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "test-connection",
        "tags": [
          "System"
        ]
      }
    },
    "/settings/uom-dictionary": {
      "get": {
        "description": "findAll operation",
        "operationId": "UomDictionaryController_findAll",
        "parameters": [
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UomResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "findAll",
        "tags": [
          "System"
        ]
      },
      "post": {
        "description": "create operation",
        "operationId": "UomDictionaryController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUomDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UomResponseDto"
                }
              }
            }
          }
        },
        "summary": "create",
        "tags": [
          "System"
        ]
      }
    },
    "/settings/uom-dictionary/{code}": {
      "get": {
        "description": "findOne operation",
        "operationId": "UomDictionaryController_findOne",
        "parameters": [
          {
            "name": "code",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UomResponseDto"
                }
              }
            }
          }
        },
        "summary": "findOne",
        "tags": [
          "System"
        ]
      },
      "patch": {
        "description": "update operation",
        "operationId": "UomDictionaryController_update",
        "parameters": [
          {
            "name": "code",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUomDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UomResponseDto"
                }
              }
            }
          }
        },
        "summary": "update",
        "tags": [
          "System"
        ]
      },
      "delete": {
        "description": "remove operation",
        "operationId": "UomDictionaryController_remove",
        "parameters": [
          {
            "name": "code",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UomResponseDto"
                }
              }
            }
          }
        },
        "summary": "remove",
        "tags": [
          "System"
        ]
      }
    },
    "/settings/exchange-rates": {
      "get": {
        "description": "findAll operation",
        "operationId": "ExchangeRatesController_findAll",
        "parameters": [
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ExchangeRateResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "findAll",
        "tags": [
          "General Ledger"
        ]
      },
      "post": {
        "description": "create operation",
        "operationId": "ExchangeRatesController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateExchangeRateDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExchangeRateResponseDto"
                }
              }
            }
          }
        },
        "summary": "create",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/settings/exchange-rates/{id}": {
      "get": {
        "description": "findOne operation",
        "operationId": "ExchangeRatesController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExchangeRateResponseDto"
                }
              }
            }
          }
        },
        "summary": "findOne",
        "tags": [
          "General Ledger"
        ]
      },
      "patch": {
        "description": "update operation",
        "operationId": "ExchangeRatesController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateExchangeRateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExchangeRateResponseDto"
                }
              }
            }
          }
        },
        "summary": "update",
        "tags": [
          "General Ledger"
        ]
      },
      "delete": {
        "description": "remove operation",
        "operationId": "ExchangeRatesController_remove",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExchangeRateResponseDto"
                }
              }
            }
          }
        },
        "summary": "remove",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/settings/organization": {
      "get": {
        "description": "get operation",
        "operationId": "OrganizationController_get",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationResponseDto"
                }
              }
            }
          }
        },
        "summary": "get",
        "tags": [
          "System"
        ]
      },
      "patch": {
        "description": "update operation",
        "operationId": "OrganizationController_update",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrganizationDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationResponseDto"
                }
              }
            }
          }
        },
        "summary": "update",
        "tags": [
          "System"
        ]
      }
    },
    "/settings/app": {
      "get": {
        "description": "get operation",
        "operationId": "AppConfigController_get",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppConfigResponseDto"
                }
              }
            }
          }
        },
        "summary": "get",
        "tags": [
          "System"
        ]
      },
      "patch": {
        "description": "update operation",
        "operationId": "AppConfigController_update",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAppConfigDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppConfigResponseDto"
                }
              }
            }
          }
        },
        "summary": "update",
        "tags": [
          "System"
        ]
      }
    },
    "/settings/trading-terms": {
      "get": {
        "description": "List all trading terms",
        "operationId": "TradingTermsController_findAll",
        "parameters": [
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TradingTermResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "List trading terms",
        "tags": [
          "System"
        ]
      },
      "post": {
        "description": "Create a new trading term",
        "operationId": "TradingTermsController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTradingTermDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TradingTermResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create trading term",
        "tags": [
          "System"
        ]
      }
    },
    "/settings/trading-terms/{id}": {
      "patch": {
        "description": "Update an existing trading term",
        "operationId": "TradingTermsController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTradingTermDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TradingTermResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update trading term",
        "tags": [
          "System"
        ]
      },
      "delete": {
        "description": "Delete an existing trading term",
        "operationId": "TradingTermsController_delete",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsSuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Delete trading term",
        "tags": [
          "System"
        ]
      }
    },
    "/settings/cost-centers": {
      "get": {
        "description": "List all cost centers",
        "operationId": "CostCentersController_findAll",
        "parameters": [
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CostCenterResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "List all cost centers",
        "tags": [
          "General Ledger"
        ]
      },
      "post": {
        "description": "Create a new cost center",
        "operationId": "CostCentersController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCostCenterDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CostCenterResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create a new cost center",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/settings/cost-centers/{id}": {
      "patch": {
        "description": "Update a cost center",
        "operationId": "CostCentersController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCostCenterDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CostCenterResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update a cost center",
        "tags": [
          "General Ledger"
        ]
      },
      "delete": {
        "description": "Delete a cost center",
        "operationId": "CostCentersController_delete",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CostCenterResponseDto"
                }
              }
            }
          }
        },
        "summary": "Delete a cost center",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/settings/cost-centers/import": {
      "post": {
        "description": "Bulk import cost centers",
        "operationId": "CostCentersController_import",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CreateCostCenterDto"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkImportResultDto"
                }
              }
            }
          }
        },
        "summary": "Bulk import cost centers",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/settings/activities": {
      "get": {
        "description": "List all activities",
        "operationId": "ActivitiesController_findAll",
        "parameters": [
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ActivityResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "List all activities",
        "tags": [
          "System"
        ]
      },
      "post": {
        "description": "Create a new activity",
        "operationId": "ActivitiesController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateActivityDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActivityResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create a new activity",
        "tags": [
          "System"
        ]
      }
    },
    "/settings/activities/{id}": {
      "patch": {
        "description": "Update an activity",
        "operationId": "ActivitiesController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateActivityDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActivityResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update an activity",
        "tags": [
          "System"
        ]
      },
      "delete": {
        "description": "Delete an activity",
        "operationId": "ActivitiesController_delete",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActivityResponseDto"
                }
              }
            }
          }
        },
        "summary": "Delete an activity",
        "tags": [
          "System"
        ]
      }
    },
    "/settings/activities/import": {
      "post": {
        "description": "Bulk import activities",
        "operationId": "ActivitiesController_import",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CreateActivityDto"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkImportResultDto"
                }
              }
            }
          }
        },
        "summary": "Bulk import activities",
        "tags": [
          "System"
        ]
      }
    },
    "/settings/license-status": {
      "get": {
        "description": "Get the current license status.",
        "operationId": "LicenseController_getStatus",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseStatusDto"
                }
              }
            }
          }
        },
        "summary": "Get License Status",
        "tags": [
          "System"
        ]
      }
    },
    "/settings/license": {
      "post": {
        "description": "Apply a new license key.",
        "operationId": "LicenseController_applyLicense",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "licenseKey": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseStatusDto"
                }
              }
            }
          }
        },
        "summary": "Apply License",
        "tags": [
          "System"
        ]
      }
    },
    "/products/images/{path}": {
      "get": {
        "description": "Publicly stream a product image with caching headers.",
        "operationId": "ProductsController_streamImage",
        "parameters": [
          {
            "name": "path",
            "required": true,
            "in": "path",
            "description": "Product image relative path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Product image binary content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          }
        },
        "summary": "Stream Product Image",
        "tags": [
          "Products"
        ]
      }
    },
    "/products": {
      "get": {
        "description": "Retrieve a paginated list of all products in the catalog.",
        "operationId": "ProductsController_findAll",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ProductResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List Products",
        "tags": [
          "Products"
        ]
      },
      "post": {
        "description": "Register a new product in the catalog with its initial details.",
        "operationId": "ProductsController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProductDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Product",
        "tags": [
          "Products"
        ]
      }
    },
    "/products/{id}": {
      "get": {
        "description": "Retrieve detailed information for a specific product by its unique identifier.",
        "operationId": "ProductsController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Product",
        "tags": [
          "Products"
        ]
      },
      "patch": {
        "description": "Modify the details of an existing product.",
        "operationId": "ProductsController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProductDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Product",
        "tags": [
          "Products"
        ]
      }
    },
    "/products/{id}/cost-summary": {
      "get": {
        "description": "Retrieve aggregated cost metrics, supplier costs, purchasing stats, and inventory valuation for a product.",
        "operationId": "ProductsController_getCostSummary",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductCostSummaryResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Product Cost Summary",
        "tags": [
          "Products"
        ]
      }
    },
    "/products/{id}/archive": {
      "post": {
        "description": "Mark a product as archived to prevent it from being used in new transactions.",
        "operationId": "ProductsController_archive",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponseDto"
                }
              }
            }
          }
        },
        "summary": "Archive Product",
        "tags": [
          "Products"
        ]
      }
    },
    "/products/{id}/unarchive": {
      "post": {
        "description": "Restore an archived product to active status.",
        "operationId": "ProductsController_unarchive",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponseDto"
                }
              }
            }
          }
        },
        "summary": "Unarchive Product",
        "tags": [
          "Products"
        ]
      }
    },
    "/products/{id}/suppliers": {
      "post": {
        "description": "Link a supplier to a product for purchasing purposes.",
        "operationId": "ProductsController_addSupplier",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddSupplierDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponseDto"
                }
              }
            }
          }
        },
        "summary": "Add Product Supplier",
        "tags": [
          "Products"
        ]
      }
    },
    "/products/{id}/suppliers/{vendorId}": {
      "delete": {
        "description": "Unlink a supplier from a product.",
        "operationId": "ProductsController_removeSupplier",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponseDto"
                }
              }
            }
          }
        },
        "summary": "Remove Product Supplier",
        "tags": [
          "Products"
        ]
      }
    },
    "/products/{id}/uoms": {
      "post": {
        "description": "Define a new Unit of Measure for the product.",
        "operationId": "ProductsController_addUom",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddProductUomDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponseDto"
                }
              }
            }
          }
        },
        "summary": "Add Product UOM",
        "tags": [
          "Products"
        ]
      }
    },
    "/products/{id}/uoms/{uomId}": {
      "delete": {
        "description": "Delete a previously assigned Unit of Measure from a product.",
        "operationId": "ProductsController_removeUom",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "uomId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponseDto"
                }
              }
            }
          }
        },
        "summary": "Remove Product UOM",
        "tags": [
          "Products"
        ]
      }
    },
    "/products/{id}/default-bins": {
      "post": {
        "description": "Assign a default storage bin to a product for inventory management.",
        "operationId": "ProductsController_linkDefaultBin",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkBinDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponseDto"
                }
              }
            }
          }
        },
        "summary": "Link Default Bin",
        "tags": [
          "Products"
        ]
      }
    },
    "/products/{id}/default-bins/{binLinkId}": {
      "delete": {
        "description": "Remove the default storage bin assignment from a product.",
        "operationId": "ProductsController_removeDefaultBin",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "binLinkId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponseDto"
                }
              }
            }
          }
        },
        "summary": "Remove Default Bin",
        "tags": [
          "Products"
        ]
      }
    },
    "/products/{id}/components": {
      "get": {
        "description": "Retrieve the list of sub-components or ingredients that make up a product.",
        "operationId": "ProductsController_getComponents",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ProductResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List Components",
        "tags": [
          "Products"
        ]
      },
      "post": {
        "description": "Add a new sub-component to the product bill of materials.",
        "operationId": "ProductsController_addComponent",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddProductComponentDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponseDto"
                }
              }
            }
          }
        },
        "summary": "Add Component",
        "tags": [
          "Products"
        ]
      }
    },
    "/products/{id}/components/{componentId}": {
      "patch": {
        "description": "Modify the details (like quantity) of an existing product component.",
        "operationId": "ProductsController_updateComponent",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "componentId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProductComponentDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Component",
        "tags": [
          "Products"
        ]
      },
      "delete": {
        "description": "Remove a sub-component from the product bill of materials.",
        "operationId": "ProductsController_removeComponent",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "componentId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponseDto"
                }
              }
            }
          }
        },
        "summary": "Remove Component",
        "tags": [
          "Products"
        ]
      }
    },
    "/products/{id}/image": {
      "post": {
        "description": "Upload and set the primary image for a product (max 5MB).",
        "operationId": "ProductsController_uploadImage",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "Image file (JPG, PNG, WebP, GIF, SVG up to 5MB)"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponseDto"
                }
              }
            }
          }
        },
        "summary": "Upload Product Image",
        "tags": [
          "Products"
        ]
      },
      "delete": {
        "description": "Remove the assigned image from a product.",
        "operationId": "ProductsController_removeImage",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponseDto"
                }
              }
            }
          }
        },
        "summary": "Remove Product Image",
        "tags": [
          "Products"
        ]
      }
    },
    "/product-groups": {
      "get": {
        "description": "Retrieve all product groups configured in the system.",
        "operationId": "ProductGroupsController_findAll",
        "parameters": [
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ProductGroupResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List Product Groups",
        "tags": [
          "Products"
        ]
      },
      "post": {
        "description": "Create a new product group for categorizing items.",
        "operationId": "ProductGroupsController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProductGroupDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductGroupResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Product Group",
        "tags": [
          "Products"
        ]
      }
    },
    "/product-groups/{id}": {
      "get": {
        "description": "Retrieve details of a specific product group.",
        "operationId": "ProductGroupsController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductGroupResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Product Group",
        "tags": [
          "Products"
        ]
      },
      "patch": {
        "description": "Modify an existing product group.",
        "operationId": "ProductGroupsController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProductGroupDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductGroupResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Product Group",
        "tags": [
          "Products"
        ]
      },
      "delete": {
        "description": "Remove a product group from the system.",
        "operationId": "ProductGroupsController_remove",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductGroupResponseDto"
                }
              }
            }
          }
        },
        "summary": "Delete Product Group",
        "tags": [
          "Products"
        ]
      }
    },
    "/inventory": {
      "get": {
        "description": "Retrieve a paginated list of inventory levels.",
        "operationId": "InventoryController_findAll",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "locationNo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/InventoryResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List Inventory",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/inventory/by-products": {
      "get": {
        "description": "Retrieve inventory items for specific product IDs.",
        "operationId": "InventoryController_findByProductIds",
        "parameters": [
          {
            "name": "productIds",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locationId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InventoryResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get By Products",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/inventory/by-products-bulk": {
      "post": {
        "description": "Retrieve inventory items for multiple product IDs in bulk.",
        "operationId": "InventoryController_findByProductIdsBulk",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FindByProductIdsBulkDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InventoryResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Bulk Get By Products",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/inventory/bins": {
      "get": {
        "description": "Retrieve a paginated list of inventory bins.",
        "operationId": "InventoryController_findBins",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "locationNo",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "binType",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hasStock",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/InventoryBinResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List Inventory Bins",
        "tags": [
          "Warehouse"
        ]
      },
      "post": {
        "description": "Create a new storage bin.",
        "operationId": "LocationsController_createBin",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBinDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BinResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Bin",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/inventory/putaway-context": {
      "get": {
        "description": "Retrieve context for putting away inventory.",
        "operationId": "InventoryController_getPutawayContext",
        "parameters": [
          {
            "name": "productId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locationId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PutawayContextResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Putaway Context",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/inventory/locations": {
      "get": {
        "description": "Retrieve all inventory locations.",
        "operationId": "InventoryController_findAllLocations",
        "parameters": [
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InventoryLocationResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "List Locations",
        "tags": [
          "Warehouse"
        ]
      },
      "post": {
        "description": "Create a new warehouse location.",
        "operationId": "LocationsController_createLocation",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLocationDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Location",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/inventory/locations/{id}/bins": {
      "get": {
        "description": "Retrieve all bins for a specific location.",
        "operationId": "InventoryController_findBinsByLocation",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "binType",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "zoneCode",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InventoryBinResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get Location Bins",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/inventory/topography": {
      "get": {
        "description": "Retrieve full warehouse topography hierarchy.",
        "operationId": "InventoryController_getTopography",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TopographyLocationResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get Warehouse Topography",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/inventory/ledger": {
      "get": {
        "description": "Retrieve inventory ledger entries.",
        "operationId": "InventoryController_getLedger",
        "parameters": [
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InventoryLedgerResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "List Ledger Entries",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/inventory/entries/{id}": {
      "get": {
        "description": "Retrieve details for a specific inventory entry.",
        "operationId": "InventoryController_getEntryDetails",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventoryEntryDetailsResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Entry Details",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/inventory/pending-putaway": {
      "get": {
        "description": "Retrieve pending putaway lines.",
        "operationId": "InventoryController_getPendingPutaway",
        "parameters": [
          {
            "name": "locationId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PendingPutawayResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "List Pending Putaways",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/inventory/putaway": {
      "post": {
        "description": "Process inventory putaway.",
        "operationId": "InventoryController_putaway",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutawayBulkDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Putaway successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventorySuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Process Putaways",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/inventory/quarantine/move": {
      "post": {
        "description": "Move stock between quarantine and regular storage.",
        "operationId": "InventoryController_quarantineMove",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuarantineMoveDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Quarantine move successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventorySuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Move to/from Quarantine",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/inventory/move": {
      "post": {
        "description": "Manually move stock between bins in the same location.",
        "operationId": "InventoryController_moveStock",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveStockDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Move successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventorySuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Move Stock manually",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/inventory/adjust": {
      "post": {
        "description": "Manually adjust stock levels to match a physical count.",
        "operationId": "InventoryController_adjustStock",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdjustStockDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Adjustment successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventorySuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Adjust Stock manually",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/gl/accounts": {
      "get": {
        "description": "Retrieve the chart of accounts or a flat list of accounts.",
        "operationId": "GlController_getAccounts",
        "parameters": [
          {
            "name": "format",
            "required": false,
            "in": "query",
            "schema": {
              "enum": [
                "tree",
                "flat"
              ],
              "type": "string"
            }
          },
          {
            "name": "isBankAccount",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GlAccountResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get Accounts",
        "tags": [
          "General Ledger"
        ]
      },
      "post": {
        "description": "Create a new general ledger account.",
        "operationId": "GlController_createAccount",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAccountRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GlAccountResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Account",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/accounts/{id}": {
      "patch": {
        "description": "Modify an existing general ledger account.",
        "operationId": "GlController_updateAccount",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAccountRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GlAccountResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Account",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/journal-entries": {
      "get": {
        "description": "Retrieve a paginated list of journal entries.",
        "operationId": "GlController_getJournalEntries",
        "parameters": [
          {
            "name": "fromDate",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sourceType",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sourceId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/JournalEntryResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get Journal Entries",
        "tags": [
          "General Ledger"
        ]
      },
      "post": {
        "description": "Post a new manual journal entry to the ledger.",
        "operationId": "GlController_createManualJournalEntry",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateJournalEntryDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalEntryResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Manual Entry",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/journal-entries/{id}": {
      "get": {
        "description": "Retrieve a specific journal entry by ID.",
        "operationId": "GlController_getJournalEntry",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalEntryResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Journal Entry",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/journal-entries/source/{type}/{id}": {
      "get": {
        "description": "Find a journal entry by its source transaction type and ID.",
        "operationId": "GlController_getJournalEntryBySource",
        "parameters": [
          {
            "name": "type",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalEntryResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Source Entry",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/trial-balance": {
      "get": {
        "description": "Calculate and retrieve the trial balance as of a specific date, optionally with periodic activity.",
        "operationId": "GlController_getTrialBalance",
        "parameters": [
          {
            "name": "asOfDate",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "periodStart",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TrialBalanceResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get Trial Balance",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/cash-flow": {
      "get": {
        "description": "Calculate Operating, Investing, and Financing cash flows for a date range or fiscal period.",
        "operationId": "GlController_getCashFlow",
        "parameters": [
          {
            "name": "startDate",
            "required": true,
            "in": "query",
            "schema": {
              "example": "2026-08-01",
              "type": "string"
            }
          },
          {
            "name": "endDate",
            "required": true,
            "in": "query",
            "schema": {
              "example": "2026-08-31",
              "type": "string"
            }
          },
          {
            "name": "periodName",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fiscalYear",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "periodNumber",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "comparativeStartDate",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comparativeEndDate",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CashFlowStatementResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Statement of Cash Flows",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/cash-flow/drilldown": {
      "get": {
        "description": "Lazy-load underlying decomposed journal lines that contributed to a specific cash flow line item.",
        "operationId": "GlController_getCashFlowDrilldown",
        "parameters": [
          {
            "name": "lineId",
            "required": true,
            "in": "query",
            "schema": {
              "example": "op-customers",
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "required": true,
            "in": "query",
            "schema": {
              "example": "2026-08-01",
              "type": "string"
            }
          },
          {
            "name": "endDate",
            "required": true,
            "in": "query",
            "schema": {
              "example": "2026-08-31",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CashFlowDrilldownResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Statement of Cash Flows Line Drilldown",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/general-ledger": {
      "get": {
        "description": "Retrieve the general ledger line items for specific accounts and date ranges.",
        "operationId": "GlController_getGeneralLedger",
        "parameters": [
          {
            "name": "account",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromDate",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GeneralLedgerResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get General Ledger",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/settings": {
      "get": {
        "description": "Retrieve the current general ledger settings.",
        "operationId": "GlController_getSettings",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Settings",
        "tags": [
          "General Ledger"
        ]
      },
      "patch": {
        "description": "Update the general ledger configuration settings.",
        "operationId": "GlController_updateSettings",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGlSettingsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Settings",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/fx-revaluation/candidates": {
      "get": {
        "description": "Calculates Unrealised FX Gains/Losses on open foreign currency balances and returns proposed adjustments without posting them.",
        "operationId": "GlController_getFxCandidates",
        "parameters": [
          {
            "name": "revaluationDate",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FxRevalCandidatesResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get FX Revaluation Candidates",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/fx-revaluation/commit": {
      "post": {
        "description": "Commits the user-approved FX Revaluation adjustments and automatically generates their corresponding reversing journals for the following day.",
        "operationId": "GlController_commitFxRevaluation",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommitFxRevaluationDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FxRevalCommitResponseDto"
                }
              }
            }
          }
        },
        "summary": "Commit Period-End FX Revaluation",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/settings/reload": {
      "post": {
        "description": "Force a reload of the application configuration cache.",
        "operationId": "GlController_reloadSettings",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessMessageResponseDto"
                }
              }
            }
          }
        },
        "summary": "Reload Settings",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/charts": {
      "get": {
        "description": "Get available predefined chart of accounts templates.",
        "operationId": "GlController_listCharts",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChartFileDto"
                  }
                }
              }
            }
          }
        },
        "summary": "List Charts",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/seed": {
      "post": {
        "description": "Initialize the chart of accounts from a predefined template file or uploaded JSON data.",
        "operationId": "GlController_seedChartOfAccounts",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SeedRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessMessageResponseDto"
                }
              }
            }
          }
        },
        "summary": "Seed Chart of Accounts",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/tax-settings-files": {
      "get": {
        "description": "Get available predefined tax configuration templates.",
        "operationId": "GlController_listTaxSettingsFiles",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SettingsFileDto"
                  }
                }
              }
            }
          }
        },
        "summary": "List Tax Settings",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/seed-tax": {
      "post": {
        "description": "Initialize tax rates and rules from a predefined template file.",
        "operationId": "GlController_seedTaxSettings",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SeedTaxRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessMessageResponseDto"
                }
              }
            }
          }
        },
        "summary": "Seed Tax Settings",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/periods": {
      "get": {
        "description": "Retrieve all accounting / fiscal periods, optionally filtered by fiscal year and status.",
        "operationId": "GlController_getFiscalPeriods",
        "parameters": [
          {
            "name": "fiscalYear",
            "required": false,
            "in": "query",
            "schema": {
              "example": 2026,
              "type": "number"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "enum": [
                "open",
                "soft_locked",
                "hard_closed"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FiscalPeriodResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get Fiscal Periods",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/periods/generate": {
      "post": {
        "description": "Auto-generate 12 monthly fiscal periods for the specified fiscal year.",
        "operationId": "GlController_generateFiscalPeriods",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateFiscalPeriodsDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FiscalPeriodResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Generate Fiscal Periods",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/periods/{id}/status": {
      "patch": {
        "description": "Transition a fiscal period between open, soft_locked, and hard_closed.",
        "operationId": "GlController_updateFiscalPeriodStatus",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFiscalPeriodStatusDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FiscalPeriodResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Fiscal Period Status",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/reconciliation/subledger": {
      "get": {
        "description": "Run real-time automated verification of Trial Balance zero-sum equality and subledger parity for AR, AP, GRNI, and Perpetual Inventory.",
        "operationId": "GlController_getSubledgerReconciliation",
        "parameters": [
          {
            "name": "asOfDate",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubledgerReconciliationResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Continuous Subledger Reconciliation",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/integrity-audit": {
      "get": {
        "description": "Retrieves the most recent automated ledger verification audit findings and anomalies.",
        "operationId": "GlController_getLatestIntegrityAudit",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LedgerIntegrityAuditResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Latest Ledger Integrity Audit Report",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/integrity-audit/run": {
      "post": {
        "description": "Performs a real-time audit of sequence continuity, transactional GL parity, and hash chain invariants, updating the system integrity status.",
        "operationId": "GlController_runIntegrityAudit",
        "parameters": [],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunIntegrityAuditDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LedgerIntegrityAuditResponseDto"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LedgerIntegrityAuditResponseDto"
                }
              }
            }
          }
        },
        "summary": "Run Ledger Integrity Audit On Demand",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/integrity-audit/{eventId}": {
      "get": {
        "description": "Retrieves the audit findings and detailed anomalies for a specific integrity violation event.",
        "operationId": "GlController_getIntegrityAuditById",
        "parameters": [
          {
            "name": "eventId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LedgerIntegrityAuditResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Specific Ledger Integrity Audit Report by Event ID",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/reconciliations": {
      "get": {
        "description": "Retrieve a list of all bank reconciliations.",
        "operationId": "ReconciliationController_getReconciliations",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "summary": "Get Reconciliations",
        "tags": [
          "General Ledger"
        ]
      },
      "post": {
        "description": "Start a new bank reconciliation process.",
        "operationId": "ReconciliationController_createReconciliation",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReconciliationDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateReconciliationResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Reconciliation",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/reconciliations/{id}": {
      "get": {
        "description": "Retrieve details of a specific bank reconciliation.",
        "operationId": "ReconciliationController_getReconciliation",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReconciliationDetailResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Reconciliation",
        "tags": [
          "General Ledger"
        ]
      },
      "delete": {
        "description": "Cancel and delete an in-progress bank reconciliation.",
        "operationId": "ReconciliationController_discardReconciliation",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscardReconciliationResponseDto"
                }
              }
            }
          }
        },
        "summary": "Discard Reconciliation",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/reconciliations/{id}/unreconciled": {
      "get": {
        "description": "Retrieve unreconciled ledger lines for the bank account.",
        "operationId": "ReconciliationController_getLines",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "summary": "Get Unreconciled Lines",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/reconciliations/{id}/lines/{lineId}/toggle": {
      "post": {
        "description": "Mark a specific ledger line as cleared or uncleared.",
        "operationId": "ReconciliationController_toggleLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ToggleLineDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToggleLineResponseDto"
                }
              }
            }
          }
        },
        "summary": "Toggle Line Status",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/reconciliations/{id}/post": {
      "post": {
        "description": "Finalize and post the completed bank reconciliation.",
        "operationId": "ReconciliationController_postReconciliation",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostReconciliationResponseDto"
                }
              }
            }
          }
        },
        "summary": "Post Reconciliation",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/reconciliations/{id}/adjustments": {
      "post": {
        "description": "Create a journal entry adjustment for bank fees or interest.",
        "operationId": "ReconciliationController_createAdjustment",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAdjustmentDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAdjustmentResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Adjustment",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/bank-feeds/parse": {
      "post": {
        "description": "Parses a CSV file and returns the headers and sample rows.",
        "operationId": "BankFeedsController_parseCsv",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/FileUploadDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParseCsvResponseDto"
                }
              }
            }
          }
        },
        "summary": "Parse CSV",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/bank-feeds/import": {
      "post": {
        "description": "Imports a CSV file and creates journal entries based on rules.",
        "operationId": "BankFeedsController_importCsv",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ImportCsvDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportCsvResponseDto"
                }
              }
            }
          }
        },
        "summary": "Import CSV",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/bank-feeds/profiles": {
      "get": {
        "description": "Retrieves all mapping profiles.",
        "operationId": "BankFeedsController_getProfiles",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MappingProfileResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get Mapping Profiles",
        "tags": [
          "General Ledger"
        ]
      },
      "post": {
        "description": "Creates a new CSV mapping profile.",
        "operationId": "BankFeedsController_createProfile",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMappingProfileDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MappingProfileResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Mapping Profile",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/bank-feeds/profiles/{profileId}": {
      "put": {
        "description": "Updates an existing CSV mapping profile.",
        "operationId": "BankFeedsController_updateProfile",
        "parameters": [
          {
            "name": "profileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMappingProfileDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MappingProfileResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Mapping Profile",
        "tags": [
          "General Ledger"
        ]
      },
      "delete": {
        "description": "Deletes a CSV mapping profile.",
        "operationId": "BankFeedsController_deleteProfile",
        "parameters": [
          {
            "name": "profileId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MappingProfileResponseDto"
                }
              }
            }
          }
        },
        "summary": "Delete Mapping Profile",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/bank-feeds/rules": {
      "get": {
        "description": "Retrieves all reconciliation rules.",
        "operationId": "BankFeedsController_getRules",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReconciliationRuleResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get Rules",
        "tags": [
          "General Ledger"
        ]
      },
      "post": {
        "description": "Creates a new reconciliation rule.",
        "operationId": "BankFeedsController_createRule",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReconciliationRuleDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReconciliationRuleResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Rule",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/bank-feeds/rules/{ruleId}": {
      "put": {
        "description": "Updates an existing reconciliation rule.",
        "operationId": "BankFeedsController_updateRule",
        "parameters": [
          {
            "name": "ruleId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateReconciliationRuleDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReconciliationRuleResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Rule",
        "tags": [
          "General Ledger"
        ]
      },
      "delete": {
        "description": "Deletes a reconciliation rule.",
        "operationId": "BankFeedsController_deleteRule",
        "parameters": [
          {
            "name": "ruleId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReconciliationRuleResponseDto"
                }
              }
            }
          }
        },
        "summary": "Delete Rule",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/bank-statement/lines": {
      "get": {
        "description": "Fetch imported bank statement lines.",
        "operationId": "BankStatementController_getLines",
        "parameters": [
          {
            "name": "glAccountId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "isReconciled",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns bank statement lines",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BankStatementLineDto"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Get bank statement lines",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/bank-statement/lines/{id}/confirm-match": {
      "post": {
        "description": "Confirms a suggested match between a bank line and a journal line.",
        "operationId": "BankStatementController_confirmMatch",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BankStatementConfirmMatchDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Match confirmed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MatchConfirmedResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Confirm a smart match",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/bank-statement/lines/{id}/manual-match": {
      "post": {
        "description": "Manually links a bank line to a specific journal line.",
        "operationId": "BankStatementController_manualMatch",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BankStatementManualMatchDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Match confirmed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MatchConfirmedResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Manually match a line",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/bank-statement/lines/bulk": {
      "post": {
        "description": "Manually creates multiple bank statement lines at once.",
        "operationId": "BankStatementController_createLinesBulk",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CreateBankStatementLineDto"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Lines created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MatchConfirmedResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Create bank statement lines in bulk",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/bank-statement/match-bulk": {
      "post": {
        "description": "Links an N:M set of bank lines and journal lines together.",
        "operationId": "BankStatementController_matchBulk",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BankStatementBulkMatchDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Match confirmed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MatchConfirmedResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Bulk match bank statement lines and journal lines",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/bank-statement/auto-match": {
      "post": {
        "description": "Runs auto-matching rules and suggests smart matches.",
        "operationId": "BankStatementController_autoMatch",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutoMatchRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutoMatchResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Auto match bank statement lines",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/bank-statement/unmatch": {
      "post": {
        "description": "Breaks a match group, and reverses any rule-generated entries.",
        "operationId": "BankStatementController_unmatch",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnmatchRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankStatementSuccessResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Unmatch items",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/bank-statement/lines/{id}": {
      "delete": {
        "description": "Deletes a bank statement line that has not been reconciled.",
        "operationId": "BankStatementController_deleteLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankStatementSuccessResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Delete bank statement line",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/gl/bank-statement/match-group/{matchGroupId}": {
      "get": {
        "description": "Retrieves metadata about a match group",
        "operationId": "BankStatementController_getMatchGroup",
        "parameters": [
          {
            "name": "matchGroupId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankStatementMatchGroupResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Get match group",
        "tags": [
          "General Ledger"
        ]
      }
    },
    "/business-reports": {
      "get": {
        "description": "Returns a list of available business reports",
        "operationId": "BusinessReportsController_getReports",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BusinessReportResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "List available business reports",
        "tags": [
          "System"
        ]
      },
      "post": {
        "description": "Creates a new business report configuration",
        "operationId": "BusinessReportsController_createReport",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBusinessReportDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BusinessReportResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create a business report",
        "tags": [
          "System"
        ]
      }
    },
    "/business-reports/hooks": {
      "get": {
        "description": "Returns a list of all registered business report data source hooks",
        "operationId": "BusinessReportsController_getHooks",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "summary": "List available data source hooks",
        "tags": [
          "System"
        ]
      }
    },
    "/business-reports/{slug}/data": {
      "post": {
        "description": "Returns data for a specific business report",
        "operationId": "BusinessReportsController_runReport",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunBusinessReportDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "summary": "Fetch data for a business report",
        "tags": [
          "System"
        ]
      }
    },
    "/business-reports/{id}": {
      "get": {
        "description": "Returns the configuration for a specific business report",
        "operationId": "BusinessReportsController_getReportById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BusinessReportResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get a business report by ID",
        "tags": [
          "System"
        ]
      },
      "put": {
        "description": "Updates an existing business report configuration",
        "operationId": "BusinessReportsController_updateReport",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBusinessReportDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BusinessReportResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update a business report",
        "tags": [
          "System"
        ]
      },
      "delete": {
        "description": "Deletes an existing business report configuration",
        "operationId": "BusinessReportsController_deleteReport",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteReportResponseDto"
                }
              }
            }
          }
        },
        "summary": "Delete a business report",
        "tags": [
          "System"
        ]
      }
    },
    "/sales-orders/picking-queue": {
      "get": {
        "description": "Retrieve the paginated queue of orders ready to be picked at a specific location.",
        "operationId": "OrderPickingController_getPickingQueue",
        "parameters": [
          {
            "name": "locationId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ready",
                "partial",
                "blocked",
                "all"
              ]
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "default": 1,
              "type": "number"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PickingQueueResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Picking Queue",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/sales-orders/{id}/picking": {
      "get": {
        "description": "Retrieve the picking summary for a specific sales order.",
        "operationId": "OrderPickingController_getPickingSummary",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PickingSummaryDto"
                }
              }
            }
          }
        },
        "summary": "Get Picking Summary",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/sales-orders/{id}/picking/barcodes": {
      "get": {
        "description": "Retrieve scan-to-pick barcode payloads for all pickable lines and bins of an order.",
        "operationId": "OrderPickingController_getPickingBarcodes",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PickingBarcodeDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get Picking Barcodes",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/sales-orders/{id}/picking/lines/{lineId}": {
      "post": {
        "description": "Record a picked quantity for a specific sales order line item.",
        "operationId": "OrderPickingController_pickLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PickOrderLineDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PickingSummaryPickDto"
                }
              }
            }
          }
        },
        "summary": "Pick Order Line",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/sales-orders/{id}/picking/picks/{pickId}": {
      "delete": {
        "description": "Cancel and revert a recorded pick for a sales order.",
        "operationId": "OrderPickingController_cancelPick",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pickId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PickingSummaryPickDto"
                }
              }
            }
          }
        },
        "summary": "Cancel Pick",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/sales-orders/shipping-queue": {
      "get": {
        "description": "Retrieve the queue of orders ready to be shipped from a location.",
        "operationId": "OrderPickingController_getShippingQueue",
        "parameters": [
          {
            "name": "locationId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ShippingQueueOrderDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get Shipping Queue",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/sales-orders/{id}/shipping-context": {
      "get": {
        "description": "Retrieve shipment details and context for a sales order.",
        "operationId": "OrderPickingController_getShippingContext",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShippingContextDto"
                }
              }
            }
          }
        },
        "summary": "Get Shipping Context",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/sales-orders": {
      "get": {
        "description": "Retrieve a paginated list of sales orders globally.",
        "operationId": "OrdersController_findAll",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/OrderResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Find All Orders",
        "tags": [
          "Sales Orders"
        ]
      },
      "post": {
        "description": "Create a new sales order with or without line items.",
        "operationId": "OrdersController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Order",
        "tags": [
          "Sales Orders"
        ]
      }
    },
    "/sales-orders/{id}/tax": {
      "post": {
        "description": "Manually trigger an external tax calculation for the order.",
        "operationId": "OrdersController_triggerTaxCalculation",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Calculate Taxes",
        "tags": [
          "Sales Orders"
        ]
      }
    },
    "/sales-orders/{id}/email-document": {
      "post": {
        "description": "Generates a Document PDF and queues it to be emailed to the customer.",
        "operationId": "OrdersController_emailDocument",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailDocumentDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Email queued successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Email Document",
        "tags": [
          "Sales Orders"
        ]
      }
    },
    "/sales-orders/{id}/state": {
      "patch": {
        "description": "Update the processing state of a sales order.",
        "operationId": "OrdersController_changeState",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeOrderStateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Change Order State",
        "tags": [
          "Sales Orders"
        ]
      }
    },
    "/sales-orders/{id}/fulfill-counter": {
      "post": {
        "description": "Directly issue inventory from pickable bins at the fulfillment location, post COGS, and mark lines fulfilled over the counter without shipping.",
        "operationId": "OrdersController_fulfillCounterOrder",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FulfillCounterOrderDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CounterFulfillmentResponseDto"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CounterFulfillmentResponseDto"
                }
              }
            }
          }
        },
        "summary": "Fulfill Counter Order",
        "tags": [
          "Sales Orders"
        ]
      }
    },
    "/sales-orders/{id}/override-credit-hold": {
      "post": {
        "description": "Temporarily overrides a credit hold for this specific order.",
        "operationId": "OrdersController_overrideCreditHold",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OverrideCreditHoldDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Override Credit Hold",
        "tags": [
          "Sales Orders"
        ]
      }
    },
    "/sales-orders/{id}/archive": {
      "post": {
        "description": "Mark a sales order as archived.",
        "operationId": "OrdersController_archive",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Archive Order",
        "tags": [
          "Sales Orders"
        ]
      }
    },
    "/sales-orders/{id}/unarchive": {
      "post": {
        "description": "Restore an archived sales order.",
        "operationId": "OrdersController_unarchive",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Unarchive Order",
        "tags": [
          "Sales Orders"
        ]
      }
    },
    "/sales-orders/{id}/lines": {
      "post": {
        "description": "Add a new line item to a draft sales order.",
        "operationId": "OrdersController_addLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderLineDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Add Order Line",
        "tags": [
          "Sales Orders"
        ]
      }
    },
    "/sales-orders/{id}/lines/{lineId}": {
      "patch": {
        "description": "Modify an existing line item on a sales order.",
        "operationId": "OrdersController_updateLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrderLineDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Order Line",
        "tags": [
          "Sales Orders"
        ]
      },
      "delete": {
        "description": "Delete a line item from a sales order.",
        "operationId": "OrdersController_removeLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Remove Order Line",
        "tags": [
          "Sales Orders"
        ]
      }
    },
    "/sales-orders/{id}/post-confirmation-lines": {
      "post": {
        "description": "Add a new line item to a confirmed sales order.",
        "operationId": "OrdersController_addPostConfirmationLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderLineDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Add Post-Confirmation Line",
        "tags": [
          "Sales Orders"
        ]
      }
    },
    "/sales-orders/{id}": {
      "get": {
        "description": "Retrieve detailed information for a specific sales order.",
        "operationId": "OrdersController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Find Order",
        "tags": [
          "Sales Orders"
        ]
      },
      "patch": {
        "description": "Modify the details or metadata of an existing sales order.",
        "operationId": "OrdersController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrderDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Order",
        "tags": [
          "Sales Orders"
        ]
      }
    },
    "/sales-orders/{id}/returns": {
      "post": {
        "description": "Create a new customer return (RMA) against a sales order.",
        "operationId": "OrderReturnsController_createReturn",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReturnDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Return",
        "tags": [
          "Sales Returns"
        ]
      },
      "get": {
        "description": "Retrieve all returns associated with a specific sales order.",
        "operationId": "OrderReturnsController_findReturns",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnResponseDto"
                }
              }
            }
          }
        },
        "summary": "Find Order Returns",
        "tags": [
          "Sales Returns"
        ]
      }
    },
    "/sales-orders/{id}/returns/{returnId}": {
      "get": {
        "description": "Retrieve detailed information for a specific return.",
        "operationId": "OrderReturnsController_findReturn",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnResponseDto"
                }
              }
            }
          }
        },
        "summary": "Find Return",
        "tags": [
          "Sales Returns"
        ]
      },
      "patch": {
        "description": "Modify the details or metadata of an existing return.",
        "operationId": "OrderReturnsController_updateReturn",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateReturnDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Return",
        "tags": [
          "Sales Returns"
        ]
      }
    },
    "/sales-orders/{id}/returns/{returnId}/state": {
      "patch": {
        "description": "Update the processing state of a sales return.",
        "operationId": "OrderReturnsController_changeReturnState",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeReturnStateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnResponseDto"
                }
              }
            }
          }
        },
        "summary": "Change Return State",
        "tags": [
          "Sales Returns"
        ]
      }
    },
    "/sales-orders/{id}/returns/{returnId}/lines": {
      "post": {
        "description": "Add a new line item to a sales return.",
        "operationId": "OrderReturnsController_addReturnLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddReturnLineDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnResponseDto"
                }
              }
            }
          }
        },
        "summary": "Add Return Line",
        "tags": [
          "Sales Returns"
        ]
      }
    },
    "/sales-orders/{id}/returns/{returnId}/lines/{lineId}": {
      "patch": {
        "description": "Modify an existing line item on a sales return.",
        "operationId": "OrderReturnsController_updateReturnLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateReturnLineDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Return Line",
        "tags": [
          "Sales Returns"
        ]
      },
      "delete": {
        "description": "Delete a line item from a sales return.",
        "operationId": "OrderReturnsController_removeReturnLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnResponseDto"
                }
              }
            }
          }
        },
        "summary": "Remove Return Line",
        "tags": [
          "Sales Returns"
        ]
      }
    },
    "/sales-orders/{id}/returns/{returnId}/receive": {
      "post": {
        "description": "Process the receipt of returned goods into inventory.",
        "operationId": "OrderReturnsController_receiveReturn",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReceiveReturnDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnResponseDto"
                }
              }
            }
          }
        },
        "summary": "Receive Return",
        "tags": [
          "Sales Returns"
        ]
      }
    },
    "/sales-orders/{id}/shipments": {
      "post": {
        "description": "Create a new shipment for a sales order or transfer order.",
        "operationId": "OrderShipmentsController_createShipment",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateShipmentDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShipmentResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Shipment",
        "tags": [
          "Warehouse"
        ]
      },
      "get": {
        "description": "Retrieve all shipments associated with a specific sales order.",
        "operationId": "OrderShipmentsController_findShipments",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ShipmentResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Find Order Shipments",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/sales-orders/{id}/shipments/{shipmentId}": {
      "get": {
        "description": "Retrieve detailed information for a specific shipment.",
        "operationId": "OrderShipmentsController_findShipment",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shipmentId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShipmentResponseDto"
                }
              }
            }
          }
        },
        "summary": "Find Shipment",
        "tags": [
          "Warehouse"
        ]
      },
      "patch": {
        "description": "Modify the details of an existing shipment.",
        "operationId": "OrderShipmentsController_updateShipment",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shipmentId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateShipmentDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShipmentResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Shipment",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/sales-orders/{id}/shipments/{shipmentId}/state": {
      "patch": {
        "description": "Update the processing state of a shipment.",
        "operationId": "OrderShipmentsController_changeShipmentState",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shipmentId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeShipmentStateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShipmentResponseDto"
                }
              }
            }
          }
        },
        "summary": "Change Shipment State",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/sales-orders/{id}/shipments/{shipmentId}/cancel": {
      "post": {
        "description": "Cancel an open shipment and revert picked inventory.",
        "operationId": "OrderShipmentsController_cancelShipment",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shipmentId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShipmentResponseDto"
                }
              }
            }
          }
        },
        "summary": "Cancel Shipment",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/sales-orders/{id}/shipments/{shipmentId}/lines": {
      "post": {
        "description": "Add a new line item to a shipment.",
        "operationId": "OrderShipmentsController_addShipmentLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shipmentId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddShipmentLineDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShipmentResponseDto"
                }
              }
            }
          }
        },
        "summary": "Add Shipment Line",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/sales-orders/{id}/shipments/{shipmentId}/lines/{lineId}": {
      "patch": {
        "description": "Modify an existing line item on a shipment.",
        "operationId": "OrderShipmentsController_updateShipmentLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shipmentId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateShipmentLineDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShipmentResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Shipment Line",
        "tags": [
          "Warehouse"
        ]
      },
      "delete": {
        "description": "Delete a line item from a shipment.",
        "operationId": "OrderShipmentsController_removeShipmentLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shipmentId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShipmentResponseDto"
                }
              }
            }
          }
        },
        "summary": "Remove Shipment Line",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/shipments": {
      "get": {
        "description": "Retrieve a list of shipments globally.",
        "operationId": "GlobalShipmentsController_findAll",
        "parameters": [
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "salesOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ShipmentResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Find All Shipments",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/shipments/{id}": {
      "get": {
        "description": "Retrieve detailed information for a specific shipment.",
        "operationId": "GlobalShipmentsController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShipmentResponseDto"
                }
              }
            }
          }
        },
        "summary": "Find Shipment",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/shipments/{id}/email-document": {
      "post": {
        "description": "Generates and sends a shipment document (e.g. shipping docket) as an email attachment.",
        "operationId": "GlobalShipmentsController_emailDocument",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailDocumentDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Email queued successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Email Shipment Document",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/sales-returns": {
      "get": {
        "description": "Retrieve all sales returns across all orders, optionally filtered by state.",
        "operationId": "GlobalReturnsController_findGlobalReturns",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "stateCode",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locationId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requireCredit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GlobalReturnListResponseDto"
                }
              }
            }
          }
        },
        "summary": "Find Global Returns",
        "tags": [
          "Sales Returns"
        ]
      }
    },
    "/sales-returns/{id}": {
      "get": {
        "description": "Retrieve a specific sales return by its ID.",
        "operationId": "GlobalReturnsController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnResponseDto"
                }
              }
            }
          }
        },
        "summary": "Find Return by ID",
        "tags": [
          "Sales Returns"
        ]
      }
    },
    "/global-returns": {
      "get": {
        "description": "Retrieves a paginated list of global returns across both sales and purchase domains.",
        "operationId": "UnifiedReturnsController_findGlobalReturns",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GlobalReturnListResponseDto"
                }
              }
            }
          }
        },
        "summary": "Find Global Returns (Sales and Purchase)",
        "tags": [
          "Unified Returns"
        ]
      }
    },
    "/allocations/open": {
      "get": {
        "description": "Retrieve pending or awaiting-receipt backorders across all sales orders and work orders.",
        "operationId": "AllocationsController_getOpenDemands",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OpenDemandDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get Open Demands",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/allocations/by-po/{poId}": {
      "get": {
        "description": "Retrieve all backorder allocations linked to a specific purchase order.",
        "operationId": "AllocationsController_getAllocationsByPo",
        "parameters": [
          {
            "name": "poId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PoAllocationDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get PO Allocations",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/allocations/available-po-lines": {
      "get": {
        "description": "Find open purchase order lines for a specific product to allocate against.",
        "operationId": "AllocationsController_getAvailablePoLines",
        "parameters": [
          {
            "name": "productId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AvailablePoLineDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get Available PO Lines",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/allocations/link-po": {
      "post": {
        "description": "Manually allocate a backorder demand to an open purchase order line.",
        "operationId": "AllocationsController_linkDemandToPo",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkDemandToPoDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllocationSuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Link Demand To PO",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/allocations/resolve": {
      "post": {
        "description": "Run the MRP engine to automatically resolve backorder demands.",
        "operationId": "AllocationsController_resolveOpenDemands",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllocationResolveResponseDto"
                }
              }
            }
          }
        },
        "summary": "Resolve Open Demands",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/allocations/{id}/unlink": {
      "post": {
        "description": "Remove the link between a backorder demand and its allocated purchase order.",
        "operationId": "AllocationsController_unlinkDemand",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllocationSuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Unlink Demand",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/allocations/{id}/reallocate": {
      "post": {
        "description": "Change the fulfillment location for an open backorder demand.",
        "operationId": "AllocationsController_reallocateDemand",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReallocateDemandDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllocationSuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Reallocate Demand",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/allocations/generate-pos": {
      "post": {
        "description": "Bulk create purchase orders from open backorder demands.",
        "operationId": "AllocationsController_generatePOs",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeneratePOsDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllocationSuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Generate POs",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/allocations/generate-transfers": {
      "post": {
        "description": "Bulk create inventory transfers from open backorder demands.",
        "operationId": "AllocationsController_generateTransfers",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateTransfersDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllocationSuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Generate Transfers",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/transfers/from-demands": {
      "post": {
        "description": "Create a new transfer order from open backorder demands.",
        "operationId": "TransfersController_createTransferFromDemands",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTransferFromDemandsDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create From Demands",
        "tags": [
          "Transfer Orders"
        ]
      }
    },
    "/transfers/{id}/events": {
      "get": {
        "description": "Retrieve the event history for a specific transfer order.",
        "operationId": "TransfersController_findEvents",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TransferEventResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Find Events",
        "tags": [
          "Transfer Orders"
        ]
      }
    },
    "/transfers/{id}/picking": {
      "get": {
        "description": "Retrieve the picking summary for a transfer order.",
        "operationId": "TransfersController_getPickingSummary",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TransferPickingSummaryResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get Picking Summary",
        "tags": [
          "Transfer Orders"
        ]
      }
    },
    "/transfers/{id}/picking/lines/{lineId}": {
      "post": {
        "description": "Record a picked quantity for a transfer order line item.",
        "operationId": "TransfersController_pickLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PickLineDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferResponseDto"
                }
              }
            }
          }
        },
        "summary": "Pick Transfer Line",
        "tags": [
          "Transfer Orders"
        ]
      }
    },
    "/transfers/{id}/picking/picks/{pickId}": {
      "delete": {
        "description": "Cancel and revert a recorded pick for a transfer order.",
        "operationId": "TransfersController_cancelPick",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pickId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferResponseDto"
                }
              }
            }
          }
        },
        "summary": "Cancel Transfer Pick",
        "tags": [
          "Transfer Orders"
        ]
      }
    },
    "/transfers/{id}/ship": {
      "post": {
        "description": "Mark a transfer order as shipped and dispatch inventory.",
        "operationId": "TransfersController_shipTransferOrder",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferResponseDto"
                }
              }
            }
          }
        },
        "summary": "Ship Transfer Order",
        "tags": [
          "Transfer Orders"
        ]
      }
    },
    "/transfers/{id}/receive": {
      "post": {
        "description": "Process the receipt of a transferred inventory.",
        "operationId": "TransfersController_receiveTransferOrder",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReceiveTransferDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferResponseDto"
                }
              }
            }
          }
        },
        "summary": "Receive Transfer Order",
        "tags": [
          "Transfer Orders"
        ]
      }
    },
    "/transfers/{id}/cancel": {
      "post": {
        "description": "Cancel an open transfer order and revert any picks.",
        "operationId": "TransfersController_cancelTransferOrder",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferResponseDto"
                }
              }
            }
          }
        },
        "summary": "Cancel Transfer Order",
        "tags": [
          "Transfer Orders"
        ]
      }
    },
    "/transfers/{id}/cancel-shipment": {
      "post": {
        "description": "Cancel the active dispatched shipment of a transfer order.",
        "operationId": "TransfersController_cancelTransferOrderShipment",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferResponseDto"
                }
              }
            }
          }
        },
        "summary": "Cancel Transfer Order Shipment",
        "tags": [
          "Transfer Orders"
        ]
      }
    },
    "/transfers": {
      "get": {
        "description": "Retrieve a paginated list of transfer orders.",
        "operationId": "TransfersController_findAll",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "destinationLocationId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TransferResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Find All Transfers",
        "tags": [
          "Transfer Orders"
        ]
      },
      "post": {
        "description": "Create a new transfer order.",
        "operationId": "TransfersController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTransferOrderDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Transfer Order",
        "tags": [
          "Transfer Orders"
        ]
      }
    },
    "/transfers/{id}": {
      "get": {
        "description": "Retrieve detailed information for a specific transfer order.",
        "operationId": "TransfersController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferResponseDto"
                }
              }
            }
          }
        },
        "summary": "Find Transfer",
        "tags": [
          "Transfer Orders"
        ]
      },
      "patch": {
        "description": "Modify the details of a draft transfer order.",
        "operationId": "TransfersController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTransferOrderDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Transfer Order",
        "tags": [
          "Transfer Orders"
        ]
      }
    },
    "/transfers/{id}/shipments": {
      "get": {
        "description": "Retrieve all shipments for a specific transfer order.",
        "operationId": "TransfersController_findShipments",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ShipmentResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Find Shipments",
        "tags": [
          "Transfer Orders"
        ]
      }
    },
    "/transfers/{id}/lines": {
      "post": {
        "description": "Add a new line item to a transfer order.",
        "operationId": "TransfersController_addLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTransferOrderLineDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferResponseDto"
                }
              }
            }
          }
        },
        "summary": "Add Transfer Line",
        "tags": [
          "Transfer Orders"
        ]
      }
    },
    "/transfers/{id}/lines/{lineId}": {
      "patch": {
        "description": "Modify an existing line item on a transfer order.",
        "operationId": "TransfersController_updateLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTransferOrderLineDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Transfer Line",
        "tags": [
          "Transfer Orders"
        ]
      },
      "delete": {
        "description": "Delete a line item from a transfer order.",
        "operationId": "TransfersController_removeLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferResponseDto"
                }
              }
            }
          }
        },
        "summary": "Remove Transfer Line",
        "tags": [
          "Transfer Orders"
        ]
      }
    },
    "/tax-categories": {
      "get": {
        "description": "Retrieve a list of all tax categories.",
        "operationId": "TaxCategoriesController_findAll",
        "parameters": [
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TaxCategoryResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "List Tax Categories",
        "tags": [
          "Tax"
        ]
      },
      "post": {
        "description": "Add a new tax category to the system.",
        "operationId": "TaxCategoriesController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaxCategoryDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxCategoryResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Tax Category",
        "tags": [
          "Tax"
        ]
      }
    },
    "/tax-categories/{id}": {
      "get": {
        "description": "Retrieve detailed information about a specific tax category.",
        "operationId": "TaxCategoriesController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxCategoryResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Tax Category",
        "tags": [
          "Tax"
        ]
      },
      "patch": {
        "description": "Modify the details of an existing tax category.",
        "operationId": "TaxCategoriesController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTaxCategoryDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxCategoryResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Tax Category",
        "tags": [
          "Tax"
        ]
      },
      "delete": {
        "description": "Remove a tax category from the system.",
        "operationId": "TaxCategoriesController_remove",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxCategoryResponseDto"
                }
              }
            }
          }
        },
        "summary": "Delete Tax Category",
        "tags": [
          "Tax"
        ]
      }
    },
    "/tax-positions/mappings": {
      "get": {
        "description": "Retrieves all mappings across all tax positions. In the future this may be scoped.",
        "operationId": "TaxPositionMappingsController_findAll",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TaxPositionMappingResponseDto"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "List all tax position mappings (ignores path param for now)",
        "tags": [
          "Tax"
        ]
      }
    },
    "/tax-positions/{taxPositionId}/mappings": {
      "post": {
        "description": "Creates a mapping rule that translates a source tax category to a destination category for this position.",
        "operationId": "TaxPositionMappingsController_create",
        "parameters": [
          {
            "name": "taxPositionId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaxPositionMappingDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxPositionMappingResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Create a new mapping for a tax position",
        "tags": [
          "Tax"
        ]
      }
    },
    "/tax-positions/{taxPositionId}/mappings/{sourceTaxCategoryId}": {
      "delete": {
        "description": "Deletes a specific tax category mapping from a tax position.",
        "operationId": "TaxPositionMappingsController_remove",
        "parameters": [
          {
            "name": "taxPositionId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sourceTaxCategoryId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxPositionMappingResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Remove a mapping from a tax position",
        "tags": [
          "Tax"
        ]
      }
    },
    "/tax-positions": {
      "get": {
        "description": "Retrieves a list of all configured tax positions.",
        "operationId": "TaxPositionsController_findAll",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TaxPositionResponseDto"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "List all tax positions",
        "tags": [
          "Tax"
        ]
      },
      "post": {
        "description": "Creates a new tax position for business context tax rules.",
        "operationId": "TaxPositionsController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaxPositionDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxPositionResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Create a new tax position",
        "tags": [
          "Tax"
        ]
      }
    },
    "/tax-positions/{id}": {
      "get": {
        "description": "Retrieves a specific tax position by its unique identifier.",
        "operationId": "TaxPositionsController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxPositionResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Get a tax position by id",
        "tags": [
          "Tax"
        ]
      },
      "put": {
        "description": "Updates an existing tax position.",
        "operationId": "TaxPositionsController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTaxPositionDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxPositionResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Update a tax position",
        "tags": [
          "Tax"
        ]
      },
      "delete": {
        "description": "Deletes a tax position. This will also cascade delete any associated mappings.",
        "operationId": "TaxPositionsController_remove",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxPositionResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Delete a tax position",
        "tags": [
          "Tax"
        ]
      }
    },
    "/tax/bas-summary": {
      "get": {
        "description": "Returns the formatted ATO BAS summary for the specified date range",
        "operationId": "TaxBasController_getBasSummary",
        "parameters": [
          {
            "name": "fromDate",
            "required": false,
            "in": "query",
            "description": "Start date of the reporting period (YYYY-MM-DD)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "required": false,
            "in": "query",
            "description": "End date of the reporting period (YYYY-MM-DD)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the ATO BAS Summary layout",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BasSummaryRowDto"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Get ATO BAS Summary Report Data",
        "tags": [
          "Tax"
        ]
      }
    },
    "/sales-orders/{id}/invoice": {
      "post": {
        "description": "Create an invoice for a sales order",
        "operationId": "SalesInvoiceController_createSalesInvoice",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSalesInvoiceDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesInvoiceResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Sales Invoice",
        "tags": [
          "Sales Invoices"
        ]
      }
    },
    "/sales-orders/{id}/invoices": {
      "get": {
        "description": "Retrieve invoices for a sales order",
        "operationId": "SalesInvoiceController_getSalesInvoices",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SalesInvoiceResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get Sales Invoices",
        "tags": [
          "Sales Invoices"
        ]
      }
    },
    "/purchase-orders/{id}/invoices": {
      "get": {
        "description": "Retrieve purchase bills for a purchase order",
        "operationId": "PurchaseInvoiceController_getPurchaseBills",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PurchaseInvoiceResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get Purchase Bills",
        "tags": [
          "Purchase Invoices"
        ]
      }
    },
    "/sales-invoices/{id}": {
      "get": {
        "description": "Retrieve details for a specific sales invoice",
        "operationId": "InvoiceDetailController_getSalesInvoiceDetails",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesInvoiceResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Sales Invoice Details",
        "tags": [
          "Sales Invoices",
          "Sales Invoices"
        ]
      }
    },
    "/sales-invoices/{id}/state": {
      "patch": {
        "description": "Change the state of a sales invoice (e.g. to cancel it)",
        "operationId": "InvoiceDetailController_changeSalesInvoiceState",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeInvoiceStateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesInvoiceResponseDto"
                }
              }
            }
          }
        },
        "summary": "Change Sales Invoice State",
        "tags": [
          "Sales Invoices",
          "Sales Invoices"
        ]
      }
    },
    "/sales-invoices/{id}/admin-mark-paid": {
      "post": {
        "description": "Marks a sales invoice as paid without generating a GL entry.",
        "operationId": "InvoiceDetailController_adminMarkSalesInvoicePaid",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesInvoiceResponseDto"
                }
              }
            }
          }
        },
        "summary": "Mark Sales Invoice as Paid (Admin)",
        "tags": [
          "Sales Invoices",
          "Sales Invoices"
        ]
      }
    },
    "/sales-invoices": {
      "get": {
        "description": "Retrieve all sales invoices across orders",
        "operationId": "InvoiceDetailController_getSalesInvoicesGlobal",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "invoiceId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "balanceStatus",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/SalesInvoiceResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get All Sales Invoices",
        "tags": [
          "Sales Invoices",
          "Sales Invoices"
        ]
      }
    },
    "/purchase-invoices": {
      "get": {
        "description": "Retrieve all purchase invoices across orders",
        "operationId": "InvoiceDetailController_getPurchaseInvoicesGlobal",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "invoiceId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "balanceStatus",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PurchaseInvoiceResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get All Purchase Invoices",
        "tags": [
          "Sales Invoices",
          "Purchase Invoices"
        ]
      },
      "post": {
        "description": "Create a standalone draft purchase invoice",
        "operationId": "InvoiceDetailController_createDraftInvoice",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateStandaloneInvoiceDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseInvoiceResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Draft Invoice",
        "tags": [
          "Sales Invoices",
          "Purchase Invoices"
        ]
      }
    },
    "/purchase-invoices/{id}": {
      "get": {
        "description": "Retrieve details for a specific purchase invoice",
        "operationId": "InvoiceDetailController_getPurchaseBillDetails",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseInvoiceResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Purchase Invoice Details",
        "tags": [
          "Sales Invoices",
          "Purchase Invoices"
        ]
      },
      "patch": {
        "description": "Update a purchase invoice",
        "operationId": "InvoiceDetailController_updateInvoice",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePurchaseInvoiceDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseInvoiceResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Invoice",
        "tags": [
          "Sales Invoices",
          "Purchase Invoices"
        ]
      }
    },
    "/purchase-invoices/{id}/admin-mark-paid": {
      "post": {
        "description": "Marks a purchase invoice as paid without generating a GL entry.",
        "operationId": "InvoiceDetailController_adminMarkPurchaseInvoicePaid",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseInvoiceResponseDto"
                }
              }
            }
          }
        },
        "summary": "Mark Purchase Invoice as Paid (Admin)",
        "tags": [
          "Sales Invoices",
          "Purchase Invoices"
        ]
      }
    },
    "/purchase-invoices/{id}/post": {
      "post": {
        "description": "Post a purchase invoice",
        "operationId": "InvoiceDetailController_postInvoice",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseInvoiceResponseDto"
                }
              }
            }
          }
        },
        "summary": "Post Invoice",
        "tags": [
          "Sales Invoices",
          "Purchase Invoices"
        ]
      }
    },
    "/purchase-invoices/{id}/state": {
      "patch": {
        "description": "Change the state of a purchase invoice",
        "operationId": "InvoiceDetailController_changeInvoiceState",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeInvoiceStateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseInvoiceResponseDto"
                }
              }
            }
          }
        },
        "summary": "Change Invoice State",
        "tags": [
          "Sales Invoices",
          "Purchase Invoices"
        ]
      }
    },
    "/purchase-invoices/{id}/lines/{lineId}": {
      "patch": {
        "description": "Update a specific line item on a purchase invoice",
        "operationId": "InvoiceDetailController_updateInvoiceLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateInvoiceLineDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseInvoiceResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Invoice Line",
        "tags": [
          "Sales Invoices",
          "Purchase Invoices"
        ]
      },
      "delete": {
        "description": "Remove a line item from a purchase invoice",
        "operationId": "InvoiceDetailController_removeInvoiceLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseInvoiceResponseDto"
                }
              }
            }
          }
        },
        "summary": "Remove Invoice Line",
        "tags": [
          "Sales Invoices",
          "Purchase Invoices"
        ]
      }
    },
    "/purchase-invoices/{id}/lines": {
      "post": {
        "description": "Add a new line item to a purchase invoice",
        "operationId": "InvoiceDetailController_addInvoiceLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateInvoiceLineDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseInvoiceResponseDto"
                }
              }
            }
          }
        },
        "summary": "Add Invoice Line",
        "tags": [
          "Sales Invoices",
          "Purchase Invoices"
        ]
      }
    },
    "/purchase-invoices/lines/{lineId}/resolve": {
      "post": {
        "description": "Resolve a discrepancy on an invoice line",
        "operationId": "InvoiceDetailController_resolveInvoiceLine",
        "parameters": [
          {
            "name": "lineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveInvoiceLineDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseInvoiceResponseDto"
                }
              }
            }
          }
        },
        "summary": "Resolve Invoice Line",
        "tags": [
          "Sales Invoices",
          "Purchase Invoices"
        ]
      }
    },
    "/purchase-invoices/lines/{lineId}/unresolve": {
      "post": {
        "description": "Undo resolution of an invoice line discrepancy",
        "operationId": "InvoiceDetailController_unresolveInvoiceLine",
        "parameters": [
          {
            "name": "lineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseInvoiceResponseDto"
                }
              }
            }
          }
        },
        "summary": "Unresolve Invoice Line",
        "tags": [
          "Sales Invoices",
          "Purchase Invoices"
        ]
      }
    },
    "/purchase-invoices/{id}/auto-match": {
      "post": {
        "description": "Automatically match a purchase order",
        "operationId": "InvoiceDetailController_autoMatchPurchaseOrder",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutoMatchPurchaseOrderDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseInvoiceResponseDto"
                }
              }
            }
          }
        },
        "summary": "Auto-Match Purchase Order",
        "tags": [
          "Sales Invoices",
          "Purchase Invoices"
        ]
      }
    },
    "/settings/external-sync": {
      "get": {
        "description": "Retrieve summary counts and recent events for the external sync dashboard.",
        "operationId": "ExternalSyncController_getSyncStatus",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncStatusResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Sync Status",
        "tags": [
          "System"
        ]
      }
    },
    "/settings/external-sync/events": {
      "get": {
        "description": "Retrieve pending or processed outbox events for a specific type.",
        "operationId": "ExternalSyncController_getEventsByType",
        "parameters": [
          {
            "name": "type",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncEventsResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Events By Type",
        "tags": [
          "System"
        ]
      },
      "delete": {
        "description": "Delete all pending or failed outbox events of a given type.",
        "operationId": "ExternalSyncController_clearEventsByType",
        "parameters": [
          {
            "name": "type",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteEventsResponseDto"
                }
              }
            }
          }
        },
        "summary": "Clear Events By Type",
        "tags": [
          "System"
        ]
      }
    },
    "/sales-credit-notes": {
      "get": {
        "description": "Retrieve a list of sales credit notes.",
        "operationId": "SalesCreditNotesController_findAll",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "balanceStatus",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SalesCreditNoteResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Find Credit Notes",
        "tags": [
          "Sales Returns"
        ]
      },
      "post": {
        "description": "Create a credit note from a return.",
        "operationId": "SalesCreditNotesController_createCreditNote",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSalesCreditNoteDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created Credit Note",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesCreditNoteResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Credit Note",
        "tags": [
          "Sales Returns"
        ]
      }
    },
    "/sales-credit-notes/{id}": {
      "get": {
        "description": "Retrieve a sales credit note by ID.",
        "operationId": "SalesCreditNotesController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested credit note",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesCreditNoteResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Credit Note",
        "tags": [
          "Sales Returns"
        ]
      }
    },
    "/sales-credit-notes/{id}/post": {
      "post": {
        "description": "Post an existing credit note.",
        "operationId": "SalesCreditNotesController_postCreditNote",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Posted Credit Note",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesCreditNoteResponseDto"
                }
              }
            }
          }
        },
        "summary": "Post Credit Note",
        "tags": [
          "Sales Returns"
        ]
      }
    },
    "/global-notes": {
      "get": {
        "description": "Retrieve a unified paginated list of sales credit notes and purchase debit notes.",
        "operationId": "GlobalNotesController_findAll",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GlobalNotesListResponseDto"
                }
              }
            }
          }
        },
        "summary": "Find All Global Notes",
        "tags": [
          "Global Notes"
        ]
      }
    },
    "/enrichment/lookup": {
      "get": {
        "description": "Lookup data by field",
        "operationId": "EnrichmentController_lookup",
        "parameters": [
          {
            "name": "field",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful lookup",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnrichmentResultDto"
                }
              }
            }
          }
        },
        "summary": "Lookup data",
        "tags": [
          "System"
        ]
      },
      "post": {
        "description": "Lookup data by field using POST",
        "operationId": "EnrichmentController_lookupPost",
        "parameters": [
          {
            "name": "field",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrichmentPayloadDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful lookup",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnrichmentResultDto"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "summary": "Lookup data (POST)",
        "tags": [
          "System"
        ]
      }
    },
    "/enrichment/test": {
      "get": {
        "description": "Test provider lookup",
        "operationId": "EnrichmentController_testLookup",
        "parameters": [
          {
            "name": "provider",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Test provider lookup",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnrichmentResultDto"
                }
              }
            }
          }
        },
        "summary": "Test provider",
        "tags": [
          "System"
        ]
      },
      "post": {
        "description": "Test provider lookup using POST",
        "operationId": "EnrichmentController_testLookupPost",
        "parameters": [
          {
            "name": "provider",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrichmentPayloadDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Test provider lookup",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnrichmentResultDto"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "summary": "Test provider (POST)",
        "tags": [
          "System"
        ]
      }
    },
    "/enrichment/providers": {
      "get": {
        "description": "List of available enrichment providers",
        "operationId": "EnrichmentController_getProviders",
        "parameters": [],
        "responses": {
          "200": {
            "description": "List of providers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnrichmentProviderDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get providers",
        "tags": [
          "System"
        ]
      }
    },
    "/enrichment/config": {
      "get": {
        "description": "Get config for provider",
        "operationId": "EnrichmentController_getConfig",
        "parameters": [
          {
            "name": "provider",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get config for provider",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "summary": "Get config",
        "tags": [
          "System"
        ]
      },
      "put": {
        "description": "Update config for provider",
        "operationId": "EnrichmentController_updateConfig",
        "parameters": [
          {
            "name": "provider",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEnrichmentConfigDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update config for provider",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnrichmentConfigResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update config",
        "tags": [
          "System"
        ]
      }
    },
    "/payments": {
      "get": {
        "description": "Retrieve a list of payments with optional filters for days and allocation status.",
        "operationId": "PaymentsController_findAll",
        "parameters": [
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "allocation",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "partyId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PaymentResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Find All Payments",
        "tags": [
          "Payments"
        ]
      },
      "post": {
        "description": "Create a new payment entry.",
        "operationId": "PaymentsController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Payment",
        "tags": [
          "Payments"
        ]
      }
    },
    "/payments/run-candidates": {
      "get": {
        "description": "Fetch eligible invoices for a payment run on a target date.",
        "operationId": "PaymentsController_getPaymentRunCandidates",
        "parameters": [
          {
            "name": "targetDate",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentRunCandidateResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get Payment Run Candidates",
        "tags": [
          "Payments"
        ]
      }
    },
    "/payments/generate-run": {
      "post": {
        "description": "Generates a new payment run batch for eligible supplier invoices.",
        "operationId": "PaymentsController_generatePaymentRun",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeneratePaymentRunDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneratePaymentRunResponseDto"
                }
              }
            }
          }
        },
        "summary": "Generate Payment Run",
        "tags": [
          "Payments"
        ]
      }
    },
    "/payments/{id}": {
      "get": {
        "description": "Retrieve detailed information for a specific payment.",
        "operationId": "PaymentsController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentResponseDto"
                }
              }
            }
          }
        },
        "summary": "Find Payment",
        "tags": [
          "Payments"
        ]
      },
      "delete": {
        "description": "Permanently deletes a payment in the DRAFT state.",
        "operationId": "PaymentsController_remove",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payment successfully deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfirmRejectResponseDto"
                }
              }
            }
          }
        },
        "summary": "Remove Draft Payment",
        "tags": [
          "Payments"
        ]
      }
    },
    "/payments/{id}/submit": {
      "patch": {
        "description": "Submit a draft payment for processing.",
        "operationId": "PaymentsController_submit",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentResponseDto"
                }
              }
            }
          }
        },
        "summary": "Submit Payment",
        "tags": [
          "Payments"
        ]
      }
    },
    "/payments/{id}/allocate": {
      "patch": {
        "description": "Allocate a payment to an invoice or bill.",
        "operationId": "PaymentsController_allocate",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AllocatePaymentDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentResponseDto"
                }
              }
            }
          }
        },
        "summary": "Allocate Payment",
        "tags": [
          "Payments"
        ]
      }
    },
    "/payments/{id}/cancel": {
      "patch": {
        "description": "Cancel an open payment.",
        "operationId": "PaymentsController_cancel",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentResponseDto"
                }
              }
            }
          }
        },
        "summary": "Cancel Payment",
        "tags": [
          "Payments"
        ]
      }
    },
    "/payments/export-aba": {
      "post": {
        "description": "Export selected payments into an ABA file format.",
        "operationId": "PaymentsController_exportAba",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchPaymentActionDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportAbaResponseDto"
                }
              }
            }
          }
        },
        "summary": "Export ABA",
        "tags": [
          "Payments"
        ]
      }
    },
    "/payments/export-nacha": {
      "post": {
        "description": "Export selected payments into a NACHA ACH file format.",
        "operationId": "PaymentsController_exportNacha",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchPaymentActionDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportAbaResponseDto"
                }
              }
            }
          }
        },
        "summary": "Export NACHA",
        "tags": [
          "Payments"
        ]
      }
    },
    "/payments/confirm-exported": {
      "post": {
        "description": "Mark a batch of exported payments as confirmed.",
        "operationId": "PaymentsController_confirmExported",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchPaymentActionDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfirmRejectResponseDto"
                }
              }
            }
          }
        },
        "summary": "Confirm Exported Payments",
        "tags": [
          "Payments"
        ]
      }
    },
    "/payments/reject-exported": {
      "post": {
        "description": "Mark a batch of exported payments as rejected.",
        "operationId": "PaymentsController_rejectExported",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchPaymentActionDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfirmRejectResponseDto"
                }
              }
            }
          }
        },
        "summary": "Reject Exported Payments",
        "tags": [
          "Payments"
        ]
      }
    },
    "/payments/{id}/email-document": {
      "post": {
        "description": "Generates a Payment Document (e.g. Supplier Remittance Advice) PDF using the active template/hook and queues an email outbox message to the specified recipient.",
        "operationId": "PaymentsController_emailDocument",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailDocumentDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Email queued successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Email Payment Document / Remittance Advice",
        "tags": [
          "Payments"
        ]
      }
    },
    "/suppliers": {
      "get": {
        "description": "Retrieve a paginated list of all suppliers.",
        "operationId": "SuppliersController_findAll",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/SupplierResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List Suppliers",
        "tags": [
          "Suppliers"
        ]
      },
      "post": {
        "description": "Register a new supplier.",
        "operationId": "SuppliersController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSupplierDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupplierResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Supplier",
        "tags": [
          "Suppliers"
        ]
      }
    },
    "/suppliers/aged-balances": {
      "get": {
        "description": "Retrieve aged balances for all suppliers with outstanding invoices.",
        "operationId": "SuppliersController_getAgedBalances",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "agingBasis",
            "required": false,
            "in": "query",
            "schema": {
              "enum": [
                "invoiceDate",
                "dueDate"
              ],
              "type": "string"
            }
          },
          {
            "name": "quickFilter",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/SupplierAgedBalanceResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get Aged Balances",
        "tags": [
          "Suppliers"
        ]
      }
    },
    "/suppliers/by-product/{productId}": {
      "get": {
        "description": "Retrieve suppliers that supply a specific product.",
        "operationId": "SuppliersController_findByProduct",
        "parameters": [
          {
            "name": "productId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/SupplierResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List Product Suppliers",
        "tags": [
          "Suppliers"
        ]
      }
    },
    "/suppliers/{id}": {
      "get": {
        "description": "Retrieve detailed information for a specific supplier.",
        "operationId": "SuppliersController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupplierResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Supplier",
        "tags": [
          "Suppliers"
        ]
      },
      "patch": {
        "description": "Modify the details of an existing supplier.",
        "operationId": "SuppliersController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSupplierDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupplierResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Supplier",
        "tags": [
          "Suppliers"
        ]
      }
    },
    "/suppliers/{id}/products": {
      "get": {
        "description": "Retrieve a list of products provided by a specific supplier.",
        "operationId": "SuppliersController_findSupplierProducts",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/SupplierResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List Supplier Products",
        "tags": [
          "Suppliers"
        ]
      }
    },
    "/suppliers/{id}/archive": {
      "post": {
        "description": "Mark a supplier as archived.",
        "operationId": "SuppliersController_archive",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupplierResponseDto"
                }
              }
            }
          }
        },
        "summary": "Archive Supplier",
        "tags": [
          "Suppliers"
        ]
      }
    },
    "/suppliers/{id}/unarchive": {
      "post": {
        "description": "Restore an archived supplier to active status.",
        "operationId": "SuppliersController_unarchive",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupplierResponseDto"
                }
              }
            }
          }
        },
        "summary": "Unarchive Supplier",
        "tags": [
          "Suppliers"
        ]
      }
    },
    "/suppliers/{id}/expiries": {
      "get": {
        "description": "Retrieve expiry records for a specific supplier.",
        "operationId": "SuppliersController_findSupplierExpiries",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/SupplierResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List Expiries",
        "tags": [
          "Suppliers"
        ]
      },
      "post": {
        "description": "Add an expiry record for a specific supplier.",
        "operationId": "SuppliersController_createExpiry",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSupplierExpiryDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupplierResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Expiry",
        "tags": [
          "Suppliers"
        ]
      }
    },
    "/suppliers/{id}/expiries/{expiryId}": {
      "patch": {
        "description": "Modify an existing expiry record for a supplier.",
        "operationId": "SuppliersController_updateExpiry",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expiryId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSupplierExpiryDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupplierResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Expiry",
        "tags": [
          "Suppliers"
        ]
      },
      "delete": {
        "description": "Remove an expiry record from a supplier.",
        "operationId": "SuppliersController_deleteExpiry",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expiryId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupplierResponseDto"
                }
              }
            }
          }
        },
        "summary": "Delete Expiry",
        "tags": [
          "Suppliers"
        ]
      }
    },
    "/supplier-groups": {
      "get": {
        "description": "Retrieve a list of all supplier groups.",
        "operationId": "SupplierGroupsController_findAll",
        "parameters": [
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SupplierGroupResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "List Supplier Groups",
        "tags": [
          "Suppliers"
        ]
      },
      "post": {
        "description": "Create a new supplier group.",
        "operationId": "SupplierGroupsController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSupplierGroupDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupplierGroupResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Supplier Group",
        "tags": [
          "Suppliers"
        ]
      }
    },
    "/supplier-groups/{id}": {
      "get": {
        "description": "Retrieve detailed information for a specific supplier group.",
        "operationId": "SupplierGroupsController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupplierGroupResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Supplier Group",
        "tags": [
          "Suppliers"
        ]
      },
      "patch": {
        "description": "Modify the details of an existing supplier group.",
        "operationId": "SupplierGroupsController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSupplierGroupDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupplierGroupResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Supplier Group",
        "tags": [
          "Suppliers"
        ]
      },
      "delete": {
        "description": "Remove a supplier group from the system.",
        "operationId": "SupplierGroupsController_remove",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupplierGroupResponseDto"
                }
              }
            }
          }
        },
        "summary": "Delete Supplier Group",
        "tags": [
          "Suppliers"
        ]
      }
    },
    "/dashboard/summary": {
      "get": {
        "description": "Retrieves key metrics and statistics for the dashboard.",
        "operationId": "DashboardController_getSummary",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardSummaryDto"
                }
              }
            }
          }
        },
        "summary": "Get Summary",
        "tags": [
          "System"
        ]
      }
    },
    "/dashboard/search": {
      "get": {
        "description": "Performs a global search across multiple entity types.",
        "operationId": "DashboardController_search",
        "parameters": [
          {
            "name": "q",
            "required": true,
            "in": "query",
            "description": "Search term (minimum 2 characters)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "types",
            "required": false,
            "in": "query",
            "description": "Comma-separated entity types to filter search",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UniversalSearchResponseDto"
                }
              }
            }
          }
        },
        "summary": "Universal Search",
        "tags": [
          "System"
        ]
      }
    },
    "/dashboard/timeline": {
      "get": {
        "description": "Retrieves a chronological list of recent system events.",
        "operationId": "DashboardController_getTimeline",
        "parameters": [
          {
            "name": "types",
            "required": false,
            "in": "query",
            "description": "Comma-separated event types to include",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Maximum number of events to return",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TimelineEventDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get Timeline",
        "tags": [
          "System"
        ]
      }
    },
    "/telemetry/client-errors": {
      "post": {
        "description": "Ingests frontend application errors for monitoring.",
        "operationId": "TelemetryController_reportClientError",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientErrorDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyBodyDto"
                }
              }
            }
          },
          "204": {
            "description": ""
          }
        },
        "summary": "Report Client Error",
        "tags": [
          "System"
        ]
      }
    },
    "/health": {
      "get": {
        "description": "Returns operational readiness for container orchestration health checks.",
        "operationId": "HealthController_getHealth",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponseDto"
                }
              }
            }
          }
        },
        "summary": "System Healthcheck",
        "tags": [
          "System"
        ]
      }
    },
    "/purchase-orders": {
      "post": {
        "description": "Create a new purchase order.",
        "operationId": "PurchaseOrdersController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePurchaseOrderDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Purchase Order",
        "tags": [
          "Purchase Orders"
        ]
      },
      "get": {
        "description": "Retrieve a paginated list of purchase orders.",
        "operationId": "PurchaseOrdersController_findAll",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PurchaseOrderResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List Purchase Orders",
        "tags": [
          "Purchase Orders"
        ]
      }
    },
    "/purchase-orders/pending-lines": {
      "get": {
        "description": "Find purchase order lines pending receipt.",
        "operationId": "PurchaseOrdersController_findPendingLines",
        "parameters": [
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PurchaseOrderLineResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "List Pending Lines",
        "tags": [
          "Purchase Orders"
        ]
      }
    },
    "/purchase-orders/returnable-lines": {
      "get": {
        "description": "Find purchase order lines eligible for return.",
        "operationId": "PurchaseOrdersController_findReturnableLines",
        "parameters": [
          {
            "name": "productId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PurchaseOrderLineResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "List Returnable Lines",
        "tags": [
          "Purchase Orders"
        ]
      }
    },
    "/purchase-orders/{id}/state": {
      "patch": {
        "description": "Update the state of a purchase order.",
        "operationId": "PurchaseOrdersController_changeState",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeStateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Change Order State",
        "tags": [
          "Purchase Orders"
        ]
      }
    },
    "/purchase-orders/{id}/archive": {
      "post": {
        "description": "Archive a purchase order.",
        "operationId": "PurchaseOrdersController_archive",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Archive Purchase Order",
        "tags": [
          "Purchase Orders"
        ]
      }
    },
    "/purchase-orders/{id}/unarchive": {
      "post": {
        "description": "Restore an archived purchase order.",
        "operationId": "PurchaseOrdersController_unarchive",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Unarchive Purchase Order",
        "tags": [
          "Purchase Orders"
        ]
      }
    },
    "/purchase-orders/{id}/lines": {
      "post": {
        "description": "Add a new line item to a purchase order.",
        "operationId": "PurchaseOrdersController_addLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePurchaseOrderLineDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Add Order Line",
        "tags": [
          "Purchase Orders"
        ]
      }
    },
    "/purchase-orders/{id}/lines/{lineId}": {
      "patch": {
        "description": "Modify a specific line item on a purchase order.",
        "operationId": "PurchaseOrdersController_updateLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePurchaseOrderLineDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Order Line",
        "tags": [
          "Purchase Orders"
        ]
      },
      "delete": {
        "description": "Delete a line item from a purchase order.",
        "operationId": "PurchaseOrdersController_removeLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Remove Order Line",
        "tags": [
          "Purchase Orders"
        ]
      }
    },
    "/purchase-orders/{id}": {
      "get": {
        "description": "Retrieve detailed information about a specific purchase order.",
        "operationId": "PurchaseOrdersController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Purchase Order",
        "tags": [
          "Purchase Orders"
        ]
      },
      "patch": {
        "description": "Update an existing purchase order.",
        "operationId": "PurchaseOrdersController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePurchaseOrderDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Purchase Order",
        "tags": [
          "Purchase Orders"
        ]
      }
    },
    "/purchase-orders/{id}/email-document": {
      "post": {
        "description": "Generates a Purchase Order PDF and queues it to be emailed to the supplier.",
        "operationId": "PurchaseOrdersController_emailDocument",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailDocumentDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Email queued successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Email Purchase Order Document",
        "tags": [
          "Purchase Orders"
        ]
      }
    },
    "/purchase-orders/{id}/returns": {
      "post": {
        "description": "Create a return for a specific purchase order.",
        "operationId": "PurchaseReturnsController_createReturn",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePurchaseReturnDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseReturnResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Purchase Return",
        "tags": [
          "Purchase Returns"
        ]
      },
      "get": {
        "description": "Retrieve all returns for a specific purchase order.",
        "operationId": "PurchaseReturnsController_findReturns",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PurchaseReturnResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "List Purchase Returns",
        "tags": [
          "Purchase Returns"
        ]
      }
    },
    "/purchase-orders/{id}/returns/{returnId}": {
      "get": {
        "description": "Retrieve details for a specific return on an order.",
        "operationId": "PurchaseReturnsController_findReturn",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseReturnResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Purchase Return",
        "tags": [
          "Purchase Returns"
        ]
      }
    },
    "/purchase-orders/{id}/returns/{returnId}/stage": {
      "post": {
        "description": "Mark a purchase return as staged for shipping.",
        "operationId": "PurchaseReturnsController_stageReturn",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseReturnResponseDto"
                }
              }
            }
          }
        },
        "summary": "Stage Purchase Return",
        "tags": [
          "Purchase Returns"
        ]
      }
    },
    "/purchase-orders/{id}/returns/{returnId}/unstage": {
      "post": {
        "description": "Revert a staged purchase return back to draft state.",
        "operationId": "PurchaseReturnsController_unstageReturn",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseReturnResponseDto"
                }
              }
            }
          }
        },
        "summary": "Unstage Purchase Return",
        "tags": [
          "Purchase Returns"
        ]
      }
    },
    "/purchase-orders/{id}/returns/{returnId}/ship": {
      "post": {
        "description": "Mark a staged purchase return as shipped.",
        "operationId": "PurchaseReturnsController_shipReturn",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShipPurchaseReturnDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseReturnResponseDto"
                }
              }
            }
          }
        },
        "summary": "Ship Purchase Return",
        "tags": [
          "Purchase Returns"
        ]
      }
    },
    "/purchase-orders/{id}/returns/{returnId}/unship": {
      "post": {
        "description": "Revert a shipped purchase return back to staged state.",
        "operationId": "PurchaseReturnsController_unshipReturn",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseReturnResponseDto"
                }
              }
            }
          }
        },
        "summary": "Unship Purchase Return",
        "tags": [
          "Purchase Returns"
        ]
      }
    },
    "/purchase-orders/{id}/returns/{returnId}/cancel": {
      "post": {
        "description": "Cancel a draft or staged purchase return.",
        "operationId": "PurchaseReturnsController_cancelReturn",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseReturnResponseDto"
                }
              }
            }
          }
        },
        "summary": "Cancel Purchase Return",
        "tags": [
          "Purchase Returns"
        ]
      }
    },
    "/purchase-returns": {
      "get": {
        "description": "Retrieve a list of purchase returns based on state.",
        "operationId": "GlobalPurchaseReturnsController_getPurchaseReturns",
        "parameters": [
          {
            "name": "stateCode",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requireDebitNote",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GlobalPurchaseReturnDto"
                  }
                }
              }
            }
          }
        },
        "summary": "List Purchase Returns",
        "tags": [
          "Purchase Returns"
        ]
      }
    },
    "/purchase-returns/{id}": {
      "get": {
        "description": "Retrieve details for a specific purchase return.",
        "operationId": "GlobalPurchaseReturnsController_getPurchaseReturnById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GlobalPurchaseReturnDto"
                }
              }
            }
          }
        },
        "summary": "Get Purchase Return",
        "tags": [
          "Purchase Returns"
        ]
      }
    },
    "/purchase-returns/{id}/mark-resolved": {
      "post": {
        "description": "Marks a purchase return as resolved without issuing a debit note.",
        "operationId": "GlobalPurchaseReturnsController_markPurchaseReturnResolved",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolvePurchaseReturnDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GlobalPurchaseReturnDto"
                }
              }
            }
          }
        },
        "summary": "Mark Purchase Return as Resolved",
        "tags": [
          "Purchase Returns"
        ]
      }
    },
    "/purchase-returns/{id}/email-document": {
      "post": {
        "description": "Generates a PDF using the active purchase return template/hook and queues an email outbox message to the specified recipient.",
        "operationId": "GlobalPurchaseReturnsController_emailDocument",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailDocumentDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Email queued successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Email Purchase Return Document",
        "tags": [
          "Purchase Returns"
        ]
      }
    },
    "/purchase-debit-notes": {
      "get": {
        "description": "Retrieve a list of purchase debit notes.",
        "operationId": "PurchaseDebitNotesController_findAll",
        "parameters": [
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "balanceStatus",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PurchaseDebitNoteResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Find Debit Notes",
        "tags": [
          "Purchase Invoices"
        ]
      },
      "post": {
        "description": "Create a new purchase debit note.",
        "operationId": "PurchaseDebitNotesController_createDebitNote",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDebitNoteDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseDebitNoteResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Debit Note",
        "tags": [
          "Purchase Invoices"
        ]
      }
    },
    "/purchase-debit-notes/{id}": {
      "get": {
        "description": "Retrieve a purchase debit note by ID.",
        "operationId": "PurchaseDebitNotesController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseDebitNoteResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Debit Note",
        "tags": [
          "Purchase Invoices"
        ]
      }
    },
    "/purchase-debit-notes/{id}/post": {
      "post": {
        "description": "Post an existing debit note.",
        "operationId": "PurchaseDebitNotesController_postDebitNote",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseDebitNoteResponseDto"
                }
              }
            }
          }
        },
        "summary": "Post Debit Note",
        "tags": [
          "Purchase Invoices"
        ]
      }
    },
    "/purchase-debit-notes/{id}/email-document": {
      "post": {
        "description": "Generates a PDF using the active purchase debit note template/hook and queues an email outbox message to the specified recipient.",
        "operationId": "PurchaseDebitNotesController_emailDocument",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailDocumentDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Email queued successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Email Purchase Debit Note Document",
        "tags": [
          "Purchase Invoices"
        ]
      }
    },
    "/manufacturing/work-orders": {
      "get": {
        "description": "Get all work orders with optional filtering by days.",
        "operationId": "WorkOrdersController_findAll",
        "parameters": [
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkOrderResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "List Work Orders",
        "tags": [
          "Manufacturing / Work Orders"
        ]
      },
      "post": {
        "description": "Manually create a new Work Order.",
        "operationId": "WorkOrdersController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkOrderDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Work Order",
        "tags": [
          "Manufacturing / Work Orders"
        ]
      }
    },
    "/manufacturing/work-orders/{id}": {
      "get": {
        "description": "Get work order details including component line items.",
        "operationId": "WorkOrdersController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Work Order by ID",
        "tags": [
          "Manufacturing / Work Orders"
        ]
      },
      "patch": {
        "description": "Update a draft Work Order.",
        "operationId": "WorkOrdersController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkOrderDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Work Order",
        "tags": [
          "Manufacturing / Work Orders"
        ]
      }
    },
    "/manufacturing/work-orders/{id}/components/{componentId}": {
      "patch": {
        "description": "Update a component on a draft Work Order.",
        "operationId": "WorkOrdersController_updateComponent",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "componentId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkOrderComponentDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Work Order Component",
        "tags": [
          "Manufacturing / Work Orders"
        ]
      }
    },
    "/manufacturing/work-orders/{id}/release": {
      "post": {
        "description": "Transition Work Order from DRAFT to IN_PROGRESS and generate component picks.",
        "operationId": "WorkOrdersController_release",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderResponseDto"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Release Work Order",
        "tags": [
          "Manufacturing / Work Orders"
        ]
      }
    },
    "/manufacturing/work-orders/{id}/complete": {
      "post": {
        "description": "Transition Work Order from IN_PROGRESS to COMPLETED and record output stock.",
        "operationId": "WorkOrdersController_completeBuild",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderResponseDto"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Complete Work Order Production",
        "tags": [
          "Manufacturing / Work Orders"
        ]
      }
    },
    "/manufacturing/work-orders/{id}/cancel": {
      "post": {
        "description": "Cancel a Work Order and release component picks.",
        "operationId": "WorkOrdersController_cancel",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderResponseDto"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderResponseDto"
                }
              }
            }
          }
        },
        "summary": "Cancel Work Order",
        "tags": [
          "Manufacturing / Work Orders"
        ]
      }
    },
    "/manufacturing/work-orders/{id}/picking": {
      "get": {
        "description": "Retrieve component picking summary for a Work Order.",
        "operationId": "WorkOrdersController_getPickingSummary",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderPickingSummaryDto"
                }
              }
            }
          }
        },
        "summary": "Get Work Order Picking Summary",
        "tags": [
          "Manufacturing / Work Orders"
        ]
      }
    },
    "/manufacturing/work-orders/{id}/picking/lines/{lineId}": {
      "post": {
        "description": "Record picked component quantity into WIP bin.",
        "operationId": "WorkOrdersController_pickLine",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PickWorkOrderComponentDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderPickingSummaryDto"
                }
              }
            }
          }
        },
        "summary": "Pick Work Order Component",
        "tags": [
          "Manufacturing / Work Orders"
        ]
      }
    },
    "/manufacturing/work-orders/{id}/picking/picks/{pickId}": {
      "delete": {
        "description": "Cancel a recorded component pick and reverse stock to storage.",
        "operationId": "WorkOrdersController_cancelPick",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pickId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderPickingSummaryDto"
                }
              }
            }
          }
        },
        "summary": "Cancel Component Pick",
        "tags": [
          "Manufacturing / Work Orders"
        ]
      }
    },
    "/data-sources": {
      "get": {
        "description": "Retrieves a list of all available data sources registered in the system.",
        "operationId": "DataSourcesController_list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "List of data sources",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DataSourceItemDto"
                  }
                }
              }
            }
          }
        },
        "summary": "List all registered data sources",
        "tags": [
          "System"
        ]
      }
    },
    "/data-sources/{slug}/sample-report": {
      "get": {
        "description": "Retrieves sample data suitable for Business Reports preview.",
        "operationId": "DataSourcesController_getSampleReport",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sample report data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SampleReportDto"
                }
              }
            }
          }
        },
        "summary": "Get sample data for Business Reports (fetchData format)",
        "tags": [
          "System"
        ]
      }
    },
    "/data-sources/{slug}/sample-record": {
      "get": {
        "description": "Retrieves a sample record suitable for PDF template preview and context generation.",
        "operationId": "DataSourcesController_getSampleRecord",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sample record data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SampleRecordDto"
                }
              }
            }
          }
        },
        "summary": "Get sample data for PDF Templates (resolveData format)",
        "tags": [
          "System"
        ]
      }
    },
    "/admin/system-logs": {
      "get": {
        "description": "Retrieves tail of raw system logs for administrative monitoring.",
        "operationId": "SystemController_getSystemLogs",
        "parameters": [
          {
            "name": "service",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lines",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SystemLogResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get System Logs",
        "tags": [
          "System"
        ]
      }
    },
    "/admin/version": {
      "get": {
        "description": "Retrieves backend system environment and version data.",
        "operationId": "SystemController_getSystemVersion",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SystemVersionResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get System Version",
        "tags": [
          "System"
        ]
      }
    },
    "/inventory/locations/{id}": {
      "get": {
        "description": "Retrieve a specific warehouse location by ID, including its address details.",
        "operationId": "LocationsController_getLocation",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Location",
        "tags": [
          "Warehouse"
        ]
      },
      "patch": {
        "description": "Modify the details of an existing warehouse location.",
        "operationId": "LocationsController_updateLocation",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateLocationDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Location",
        "tags": [
          "Warehouse"
        ]
      },
      "delete": {
        "description": "Remove a warehouse location.",
        "operationId": "LocationsController_deleteLocation",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationResponseDto"
                }
              }
            }
          }
        },
        "summary": "Delete Location",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/inventory/zones": {
      "post": {
        "description": "Create a new storage zone.",
        "operationId": "LocationsController_createZone",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateZoneDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZoneResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Zone",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/inventory/zones/{id}": {
      "patch": {
        "description": "Modify the details of an existing storage zone.",
        "operationId": "LocationsController_updateZone",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateZoneDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZoneResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Zone",
        "tags": [
          "Warehouse"
        ]
      },
      "delete": {
        "description": "Remove a storage zone.",
        "operationId": "LocationsController_deleteZone",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZoneResponseDto"
                }
              }
            }
          }
        },
        "summary": "Delete Zone",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/inventory/bins/bulk": {
      "post": {
        "description": "Create multiple storage bins at once.",
        "operationId": "LocationsController_createBinsBulk",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBinBulkDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BinResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Create Bins in Bulk",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/inventory/bins/{id}": {
      "patch": {
        "description": "Modify the details of an existing storage bin.",
        "operationId": "LocationsController_updateBin",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBinDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BinResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Bin",
        "tags": [
          "Warehouse"
        ]
      },
      "delete": {
        "description": "Remove a storage bin.",
        "operationId": "LocationsController_deleteBin",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BinResponseDto"
                }
              }
            }
          }
        },
        "summary": "Delete Bin",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/setup/test-abm": {
      "post": {
        "description": "Tests connectivity to the legacy ABM database.",
        "operationId": "SetupController_testAbm",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestAbmConnectionDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestConnectionResultDto"
                }
              }
            }
          }
        },
        "summary": "Test ABM Connection",
        "tags": [
          "System"
        ]
      }
    },
    "/setup/test-odoo": {
      "post": {
        "description": "Tests connectivity to the legacy Odoo database.",
        "operationId": "SetupController_testOdoo",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestOdooConnectionDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestConnectionResultDto"
                }
              }
            }
          }
        },
        "summary": "Test Odoo Connection",
        "tags": [
          "System"
        ]
      }
    },
    "/setup/resume-state": {
      "get": {
        "description": "Retrieves the resume state for ABM data migrations.",
        "operationId": "SetupController_getResumeState",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResumeStateDto"
                }
              }
            }
          }
        },
        "summary": "Get Resume State",
        "tags": [
          "System"
        ]
      }
    },
    "/setup/resume-state-odoo": {
      "get": {
        "description": "Retrieves the resume state for Odoo data migrations.",
        "operationId": "SetupController_getResumeStateOdoo",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResumeStateDto"
                }
              }
            }
          }
        },
        "summary": "Get Odoo Resume State",
        "tags": [
          "System"
        ]
      }
    },
    "/setup/execute-elt": {
      "post": {
        "description": "Triggers a data extraction and load pipeline job.",
        "operationId": "SetupController_executeElt",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExecuteEltDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResultDto"
                }
              }
            }
          }
        },
        "summary": "Execute ELT Job",
        "tags": [
          "System"
        ]
      }
    },
    "/setup/active-job": {
      "get": {
        "description": "Returns the ID and type of the currently running job, if any.",
        "operationId": "SetupController_getActiveJob",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActiveJobDto"
                }
              }
            }
          }
        },
        "summary": "Get Active Job",
        "tags": [
          "System"
        ]
      }
    },
    "/setup/active-job/{jobId}": {
      "delete": {
        "description": "Forcibly terminates a running background job.",
        "operationId": "SetupController_stopJob",
        "parameters": [
          {
            "name": "jobId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Stop Active Job",
        "tags": [
          "System"
        ]
      }
    },
    "/setup/progress/{jobId}": {
      "get": {
        "description": "Retrieves real-time progress for a background job.",
        "operationId": "SetupController_getProgress",
        "parameters": [
          {
            "name": "jobId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobProgressDto"
                }
              }
            }
          }
        },
        "summary": "Get Job Progress",
        "tags": [
          "System"
        ]
      }
    },
    "/setup/validation": {
      "get": {
        "description": "Retrieves validation summary for migrated data.",
        "operationId": "SetupController_getValidation",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetupValidationDto"
                }
              }
            }
          }
        },
        "summary": "Get Validation State",
        "tags": [
          "System"
        ]
      }
    },
    "/setup/import-summary": {
      "get": {
        "description": "Retrieves statistical summary of all imported data.",
        "operationId": "SetupController_getImportSummary",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportSummaryDto"
                }
              }
            }
          }
        },
        "summary": "Get Import Summary",
        "tags": [
          "System"
        ]
      }
    },
    "/setup/csv-metadata": {
      "get": {
        "description": "Retrieves metadata for configured CSV imports.",
        "operationId": "SetupController_getCsvMetadata",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CsvMetadataDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get CSV Metadata",
        "tags": [
          "System"
        ]
      }
    },
    "/setup/export-csv/{tableName}": {
      "get": {
        "description": "Exports table records as a CSV file compatible with CSV import.",
        "operationId": "SetupController_exportCsv",
        "parameters": [
          {
            "name": "tableName",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "description": "Whether to include archived/inactive records",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Optional maximum number of records to export",
            "schema": {
              "minimum": 1,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "CSV file download",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          }
        },
        "summary": "Export Table as CSV",
        "tags": [
          "System"
        ]
      }
    },
    "/setup/execute-csv": {
      "post": {
        "description": "Uploads and processes a CSV file for data import.",
        "operationId": "SetupController_executeCsv",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "tableName": {
                    "type": "string"
                  },
                  "strategy": {
                    "type": "string"
                  },
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "tableName",
                  "strategy",
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResultDto"
                }
              }
            }
          }
        },
        "summary": "Execute CSV Import",
        "tags": [
          "System"
        ]
      }
    },
    "/goods-received": {
      "post": {
        "description": "Create a new goods receipt note.",
        "operationId": "GoodsReceivedController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateGoodsReceivedDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoodsReceivedResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Goods Receipt",
        "tags": [
          "Warehouse"
        ]
      },
      "get": {
        "description": "Retrieve a paginated list of goods receipts.",
        "operationId": "GoodsReceivedController_findAll",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GoodsReceivedResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List Goods Receipts",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/goods-received/lines": {
      "get": {
        "description": "Retrieve a paginated list of received goods lines.",
        "operationId": "GoodsReceivedController_findAllLines",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "putawayStatus",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locationId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/GoodsReceivedLineResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List Received Lines",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/goods-received/{id}": {
      "get": {
        "description": "Retrieve details for a specific goods receipt note.",
        "operationId": "GoodsReceivedController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoodsReceivedResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Goods Receipt",
        "tags": [
          "Warehouse"
        ]
      },
      "patch": {
        "description": "Update header fields for an existing goods receipt note.",
        "operationId": "GoodsReceivedController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGoodsReceivedDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoodsReceivedResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Goods Receipt",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/goods-received/{id}/cancel": {
      "post": {
        "description": "Cancel an existing goods receipt note.",
        "operationId": "GoodsReceivedController_cancelReception",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CancelReceptionResponseDto"
                }
              }
            }
          }
        },
        "summary": "Cancel Goods Receipt",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/goods-received/lines/{lineId}/resolve": {
      "post": {
        "description": "Resolve allocation for a received goods line.",
        "operationId": "GoodsReceivedController_resolveAllocation",
        "parameters": [
          {
            "name": "lineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveAllocationDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolveAllocationResponseDto"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolveAllocationResponseDto"
                }
              }
            }
          }
        },
        "summary": "Resolve Allocation",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/goods-received/lines/{lineId}/unresolve": {
      "post": {
        "description": "Unresolve allocation for a received goods line.",
        "operationId": "GoodsReceivedController_unresolveAllocation",
        "parameters": [
          {
            "name": "lineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoodsReceivedLineResponseDto"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoodsReceivedLineResponseDto"
                }
              }
            }
          }
        },
        "summary": "Unresolve Allocation",
        "tags": [
          "Warehouse"
        ]
      }
    },
    "/macros": {
      "post": {
        "description": "Registers a new automated macro rule.",
        "operationId": "MacrosController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMacroDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MacroResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Macro",
        "tags": [
          "System"
        ]
      },
      "get": {
        "description": "Retrieves all configured automation macros.",
        "operationId": "MacrosController_findAll",
        "parameters": [
          {
            "name": "macroType",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MacroResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "List Macros",
        "tags": [
          "System"
        ]
      }
    },
    "/macros/{id}": {
      "get": {
        "description": "Retrieves a single macro configuration by ID.",
        "operationId": "MacrosController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MacroResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Macro",
        "tags": [
          "System"
        ]
      },
      "patch": {
        "description": "Modifies an existing macro definition.",
        "operationId": "MacrosController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMacroDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MacroResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Macro",
        "tags": [
          "System"
        ]
      },
      "delete": {
        "description": "Permanently removes a macro configuration.",
        "operationId": "MacrosController_remove",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MacroResponseDto"
                }
              }
            }
          }
        },
        "summary": "Delete Macro",
        "tags": [
          "System"
        ]
      }
    },
    "/users": {
      "get": {
        "description": "Retrieves a paginated list of all system users.",
        "operationId": "UsersController_findAll",
        "parameters": [
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserResponseDto"
                  }
                }
              }
            }
          }
        },
        "summary": "List Users",
        "tags": [
          "System"
        ]
      },
      "post": {
        "description": "Provisions a new user account in the system.",
        "operationId": "UsersController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create User",
        "tags": [
          "System"
        ]
      }
    },
    "/users/{id}": {
      "get": {
        "description": "Retrieves a single user by their unique identifier.",
        "operationId": "UsersController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get User",
        "tags": [
          "System"
        ]
      },
      "patch": {
        "description": "Modifies an existing user profile or permissions.",
        "operationId": "UsersController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update User",
        "tags": [
          "System"
        ]
      },
      "delete": {
        "description": "Permanently removes a user from the system.",
        "operationId": "UsersController_remove",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponseDto"
                }
              }
            }
          }
        },
        "summary": "Delete User",
        "tags": [
          "System"
        ]
      }
    },
    "/users/{id}/toggle-active": {
      "patch": {
        "description": "Activates or deactivates a user account.",
        "operationId": "UsersController_toggleActive",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponseDto"
                }
              }
            }
          }
        },
        "summary": "Toggle User Status",
        "tags": [
          "System"
        ]
      }
    },
    "/users/{id}/2fa/reset": {
      "post": {
        "description": "Administratively resets two-factor authentication for a user, allowing them to re-enroll.",
        "operationId": "UsersController_reset2Fa",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Reset2FaResponseDto"
                }
              }
            }
          }
        },
        "summary": "Reset User 2FA",
        "tags": [
          "System"
        ]
      }
    },
    "/discount-matrix": {
      "get": {
        "description": "Retrieve discount rules based on query filters.",
        "operationId": "DiscountMatrixController_list",
        "parameters": [
          {
            "name": "customerGroupId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ownerType",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DiscountMatrixResponseDto"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "List Rules",
        "tags": [
          "System"
        ]
      },
      "post": {
        "description": "Add a new discount rule to the matrix.",
        "operationId": "DiscountMatrixController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDiscountMatrixDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscountMatrixResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Create Rule",
        "tags": [
          "System"
        ]
      }
    },
    "/discount-matrix/resolve": {
      "get": {
        "description": "Retrieve the fully resolved discount rules for a specific customer.",
        "operationId": "DiscountMatrixController_resolve",
        "parameters": [
          {
            "name": "customerId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customerGroupId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ResolveDiscountRuleDto"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Resolve Rules",
        "tags": [
          "System"
        ]
      }
    },
    "/discount-matrix/{id}": {
      "patch": {
        "description": "Modify an existing discount rule.",
        "operationId": "DiscountMatrixController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDiscountMatrixDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscountMatrixResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Update Rule",
        "tags": [
          "System"
        ]
      },
      "delete": {
        "description": "Remove a discount rule from the matrix.",
        "operationId": "DiscountMatrixController_delete",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteDiscountMatrixResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Delete Rule",
        "tags": [
          "System"
        ]
      }
    },
    "/webhooks": {
      "get": {
        "description": "Retrieves all registered outbound webhooks.",
        "operationId": "WebhooksController_list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookResponseDto"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "List Webhooks",
        "tags": [
          "System"
        ]
      },
      "post": {
        "description": "Registers a new webhook endpoint for system events.",
        "operationId": "WebhooksController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Create Webhook",
        "tags": [
          "System"
        ]
      }
    },
    "/webhooks/events": {
      "get": {
        "description": "Retrieves all possible event types that webhooks can subscribe to.",
        "operationId": "WebhooksController_listEvents",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "List Available Events",
        "tags": [
          "System"
        ]
      }
    },
    "/webhooks/{id}": {
      "put": {
        "description": "Modifies an existing webhook configuration.",
        "operationId": "WebhooksController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWebhookDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Update Webhook",
        "tags": [
          "System"
        ]
      },
      "delete": {
        "description": "Removes a webhook subscription.",
        "operationId": "WebhooksController_remove",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteWebhookResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Delete Webhook",
        "tags": [
          "System"
        ]
      }
    },
    "/api-keys": {
      "get": {
        "description": "Retrieves all service API keys (without raw secrets).",
        "operationId": "ApiKeysController_list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyResponseDto"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "List API Keys",
        "tags": [
          "System"
        ]
      },
      "post": {
        "description": "Generates a new API key. Secret is only returned once.",
        "operationId": "ApiKeysController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreatedResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Create API Key",
        "tags": [
          "System"
        ]
      }
    },
    "/api-keys/{id}": {
      "delete": {
        "description": "Permanently deletes and revokes an API key.",
        "operationId": "ApiKeysController_revoke",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyFullResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Revoke API Key",
        "tags": [
          "System"
        ]
      }
    },
    "/events/publish": {
      "post": {
        "description": "Publishes an event to the backend message queue (outbox) to trigger workflows or webhooks.",
        "operationId": "EventsController_publish",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishEventDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The event was successfully published.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublishEventResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Publish Event",
        "tags": [
          "System"
        ]
      }
    },
    "/user-settings": {
      "get": {
        "description": "Retrieves the settings for the currently authenticated user.",
        "operationId": "UserSettingsController_getSettings",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserSettingsResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get user settings",
        "tags": [
          "System"
        ]
      },
      "patch": {
        "description": "Updates specific sections of the settings for the currently authenticated user.",
        "operationId": "UserSettingsController_updateSettings",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserSettingsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserSettingsResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update user settings",
        "tags": [
          "System"
        ]
      }
    },
    "/contacts": {
      "get": {
        "description": "Retrieve a paginated list of contacts.",
        "operationId": "ContactsController_findAll",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ContactResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "List Contacts",
        "tags": [
          "Contacts"
        ]
      },
      "post": {
        "description": "Create a new contact for a given entity.",
        "operationId": "ContactsController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateContactDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Contact",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/contacts/{id}": {
      "get": {
        "description": "Retrieve a single contact by ID.",
        "operationId": "ContactsController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Contact",
        "tags": [
          "Contacts"
        ]
      },
      "patch": {
        "description": "Update an existing contact.",
        "operationId": "ContactsController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateContactDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Contact",
        "tags": [
          "Contacts"
        ]
      },
      "delete": {
        "description": "Hard delete an existing contact.",
        "operationId": "ContactsController_remove",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Delete Contact",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/contacts/{id}/archive": {
      "post": {
        "description": "Archives a contact",
        "operationId": "ContactsController_archive",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseDto"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseDto"
                }
              }
            }
          }
        },
        "summary": "Archive Contact",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/contacts/{id}/unarchive": {
      "post": {
        "description": "Unarchives a contact",
        "operationId": "ContactsController_unarchive",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseDto"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponseDto"
                }
              }
            }
          }
        },
        "summary": "Unarchive Contact",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/delivery-addresses": {
      "post": {
        "description": "Create a new delivery address for a customer.",
        "operationId": "DeliveryAddressesController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDeliveryAddressDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created delivery address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryAddressResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create a new delivery address",
        "tags": [
          "Delivery Addresses"
        ]
      }
    },
    "/delivery-addresses/{id}": {
      "put": {
        "description": "Update an existing delivery address.",
        "operationId": "DeliveryAddressesController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDeliveryAddressDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated delivery address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryAddressResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update an existing delivery address",
        "tags": [
          "Delivery Addresses"
        ]
      },
      "delete": {
        "description": "Delete a delivery address.",
        "operationId": "DeliveryAddressesController_remove",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delivery address deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteDeliveryAddressSuccessDto"
                }
              }
            }
          }
        },
        "summary": "Delete a delivery address",
        "tags": [
          "Delivery Addresses"
        ]
      }
    },
    "/actors": {
      "post": {
        "description": "Create Actor",
        "operationId": "ActorsController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateActorDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActorResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Actor",
        "tags": [
          "Actors"
        ]
      },
      "get": {
        "description": "Get all Actors (paginated)",
        "operationId": "ActorsController_findAll",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Comma separated list of fields to include in the response (e.g. \"id,name\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ActorResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get all Actors (paginated)",
        "tags": [
          "Actors"
        ]
      }
    },
    "/actors/{id}": {
      "get": {
        "description": "Get Actor by ID",
        "operationId": "ActorsController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActorResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Actor by ID",
        "tags": [
          "Actors"
        ]
      },
      "patch": {
        "description": "Update Actor",
        "operationId": "ActorsController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateActorDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActorResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Actor",
        "tags": [
          "Actors"
        ]
      },
      "delete": {
        "description": "Delete Actor",
        "operationId": "ActorsController_remove",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Delete Actor",
        "tags": [
          "Actors"
        ]
      }
    },
    "/actors/{id}/contacts/{contactId}": {
      "patch": {
        "description": "Update Contact Link on Actor",
        "operationId": "ActorsController_updateContact",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contactId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateActorContactDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Contact Link on Actor",
        "tags": [
          "Actors"
        ]
      },
      "delete": {
        "description": "Remove Contact Link from Actor",
        "operationId": "ActorsController_removeContact",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contactId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Remove Contact Link from Actor",
        "tags": [
          "Actors"
        ]
      }
    },
    "/actors/{id}/contacts": {
      "post": {
        "description": "Link Contact to Actor",
        "operationId": "ActorsController_addContact",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateActorContactDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Link Contact to Actor",
        "tags": [
          "Actors"
        ]
      }
    },
    "/actors/{id}/archive": {
      "post": {
        "description": "Archives an actor",
        "operationId": "ActorsController_archive",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActorResponseDto"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActorResponseDto"
                }
              }
            }
          }
        },
        "summary": "Archive Actor",
        "tags": [
          "Actors"
        ]
      }
    },
    "/actors/{id}/unarchive": {
      "post": {
        "description": "Unarchives an actor",
        "operationId": "ActorsController_unarchive",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActorResponseDto"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActorResponseDto"
                }
              }
            }
          }
        },
        "summary": "Unarchive Actor",
        "tags": [
          "Actors"
        ]
      }
    },
    "/actors/{id}/notes": {
      "post": {
        "description": "Add Note to Actor",
        "operationId": "ActorsController_addNote",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateActorNoteDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActorNoteResponseDto"
                }
              }
            }
          }
        },
        "summary": "Add Note to Actor",
        "tags": [
          "Actors"
        ]
      }
    },
    "/actors/{id}/notes/{noteId}": {
      "delete": {
        "description": "Remove Note from Actor",
        "operationId": "ActorsController_removeNote",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "noteId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Remove Note from Actor",
        "tags": [
          "Actors"
        ]
      }
    },
    "/projects": {
      "post": {
        "description": "Create Project",
        "operationId": "ProjectsController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponseDto"
                }
              }
            }
          }
        },
        "summary": "Create Project",
        "tags": [
          "Projects"
        ]
      },
      "get": {
        "description": "Get all Projects",
        "operationId": "ProjectsController_findAll",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "customerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendorId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          },
          {
            "name": "purchaseOrderId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Object"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedResponse"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ProjectResponseDto"
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "summary": "Get all Projects",
        "tags": [
          "Projects"
        ]
      }
    },
    "/projects/{id}": {
      "get": {
        "description": "Get Project by ID",
        "operationId": "ProjectsController_findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get Project by ID",
        "tags": [
          "Projects"
        ]
      },
      "patch": {
        "description": "Update Project",
        "operationId": "ProjectsController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Project",
        "tags": [
          "Projects"
        ]
      },
      "delete": {
        "description": "Delete Project",
        "operationId": "ProjectsController_remove",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Delete Project",
        "tags": [
          "Projects"
        ]
      }
    },
    "/projects/{id}/archive": {
      "post": {
        "description": "Archives a project",
        "operationId": "ProjectsController_archive",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponseDto"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponseDto"
                }
              }
            }
          }
        },
        "summary": "Archive Project",
        "tags": [
          "Projects"
        ]
      }
    },
    "/projects/{id}/unarchive": {
      "post": {
        "description": "Unarchives a project",
        "operationId": "ProjectsController_unarchive",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponseDto"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponseDto"
                }
              }
            }
          }
        },
        "summary": "Unarchive Project",
        "tags": [
          "Projects"
        ]
      }
    },
    "/projects/{id}/notes": {
      "post": {
        "description": "Add Note to Project",
        "operationId": "ProjectsController_addNote",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectNoteDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectNoteResponseDto"
                }
              }
            }
          }
        },
        "summary": "Add Note to Project",
        "tags": [
          "Projects"
        ]
      }
    },
    "/projects/{id}/notes/{noteId}": {
      "delete": {
        "description": "Delete Note from Project",
        "operationId": "ProjectsController_removeNote",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "noteId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Delete Note from Project",
        "tags": [
          "Projects"
        ]
      }
    },
    "/projects/{id}/contacts": {
      "post": {
        "description": "Add Contact to Project",
        "operationId": "ProjectsController_addContact",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectContactDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Add Contact to Project",
        "tags": [
          "Projects"
        ]
      }
    },
    "/projects/{id}/contacts/{contactId}": {
      "delete": {
        "description": "Remove Contact from Project",
        "operationId": "ProjectsController_removeContact",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contactId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Remove Contact from Project",
        "tags": [
          "Projects"
        ]
      },
      "patch": {
        "description": "Update Contact Role on Project",
        "operationId": "ProjectsController_updateContact",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contactId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectContactDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Contact Role on Project",
        "tags": [
          "Projects"
        ]
      }
    },
    "/projects/{id}/actors": {
      "post": {
        "description": "Add Actor to Project",
        "operationId": "ProjectsController_addActor",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectActorDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Add Actor to Project",
        "tags": [
          "Projects"
        ]
      }
    },
    "/projects/{id}/actors/{actorId}": {
      "put": {
        "description": "Update Actor Role on Project",
        "operationId": "ProjectsController_updateActor",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "actorId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectActorDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Update Actor Role on Project",
        "tags": [
          "Projects"
        ]
      },
      "delete": {
        "description": "Remove Actor from Project",
        "operationId": "ProjectsController_removeActor",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "actorId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponseDto"
                }
              }
            }
          }
        },
        "summary": "Remove Actor from Project",
        "tags": [
          "Projects"
        ]
      }
    },
    "/crm-map": {
      "get": {
        "description": "Get CRM Graph Map Data",
        "operationId": "CrmMapController_getMap",
        "parameters": [
          {
            "name": "focalNodeId",
            "required": false,
            "in": "query",
            "description": "ID of the focal node",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "maxDistance",
            "required": false,
            "in": "query",
            "description": "Max distance from the focal node",
            "schema": {
              "minimum": 1,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmMapResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get CRM Graph Map Data",
        "tags": [
          "CRM Map"
        ]
      }
    },
    "/help/context": {
      "get": {
        "description": "Resolves the most relevant help topic and field guide for a route.",
        "operationId": "HelpController_getContext",
        "parameters": [
          {
            "name": "route",
            "required": true,
            "in": "query",
            "description": "The screen route path to resolve help for",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HelpContextResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get contextual help for the active screen route",
        "tags": [
          "Help"
        ]
      }
    },
    "/help/topics": {
      "get": {
        "description": "Returns the categorized table of contents for user manuals.",
        "operationId": "HelpController_getTopics",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HelpTopicSummaryDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Get all accessible documentation topics",
        "tags": [
          "Help"
        ]
      }
    },
    "/help/topics/{id}": {
      "get": {
        "description": "Returns the full markdown content and metadata for a specific topic.",
        "operationId": "HelpController_getTopicById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HelpTopicDto"
                }
              }
            }
          }
        },
        "summary": "Get full topic content by ID",
        "tags": [
          "Help"
        ]
      }
    },
    "/help/search": {
      "get": {
        "description": "Searches titles, tags, field definitions, and markdown content.",
        "operationId": "HelpController_search",
        "parameters": [
          {
            "name": "q",
            "required": true,
            "in": "query",
            "description": "The search query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HelpSearchResultDto"
                  }
                }
              }
            }
          }
        },
        "summary": "Search documentation topics",
        "tags": [
          "Help"
        ]
      }
    }
  },
  "info": {
    "title": "HeroBM API",
    "description": "Core API System endpoints",
    "version": "1.0",
    "contact": {}
  },
  "tags": [
    {
      "name": "System",
      "description": "System configuration, webhooks, auth, and setup"
    },
    {
      "name": "Actors",
      "description": "CRM Actors"
    },
    {
      "name": "Projects",
      "description": "Project management"
    },
    {
      "name": "CRM Map",
      "description": "CRM interactive map"
    },
    {
      "name": "Customers",
      "description": "Customer management and CRM"
    },
    {
      "name": "Contacts",
      "description": "Customer and supplier contacts"
    },
    {
      "name": "Delivery Addresses",
      "description": "Delivery locations"
    },
    {
      "name": "Products",
      "description": "Product catalog and master data"
    },
    {
      "name": "Suppliers",
      "description": "Supplier and vendor management"
    },
    {
      "name": "Sales Orders",
      "description": "Sales order processing"
    },
    {
      "name": "Sales Returns",
      "description": "Customer returns (RMA)"
    },
    {
      "name": "Sales Invoices",
      "description": "Accounts Receivable invoices"
    },
    {
      "name": "Purchase Orders",
      "description": "Purchase order processing"
    },
    {
      "name": "Purchase Returns",
      "description": "Return to vendor (RTV)"
    },
    {
      "name": "Purchase Invoices",
      "description": "Accounts Payable invoices"
    },
    {
      "name": "Transfer Orders",
      "description": "Multi-location inventory transfers"
    },
    {
      "name": "Manufacturing / Work Orders",
      "description": "Manufacturing work orders and assembly"
    },
    {
      "name": "Warehouse",
      "description": "Inventory, receiving, and fulfillment"
    },
    {
      "name": "Payments",
      "description": "Payment processing and reconciliation"
    },
    {
      "name": "General Ledger",
      "description": "Accounting, charts, and journals"
    },
    {
      "name": "Tax",
      "description": "Tax configuration and mappings"
    },
    {
      "name": "Unified Returns",
      "description": "Global queries across sales and purchase returns"
    },
    {
      "name": "Global Notes",
      "description": "Global cross-domain notes"
    },
    {
      "name": "Help",
      "description": "In-app user documentation and field guides"
    }
  ],
  "servers": [
    {
      "url": "http://localhost:3000",
      "description": "Local Development Server"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "type": "http"
      }
    },
    "schemas": {
      "LoginDto": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "maxLength": 255
          },
          "password": {
            "type": "string",
            "maxLength": 255
          }
        },
        "required": [
          "username",
          "password"
        ]
      },
      "LoginResponseDto": {
        "type": "object",
        "properties": {
          "access_token": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "string"
          },
          "twoFactorRequired": {
            "type": "boolean"
          },
          "tempToken": {
            "type": "string"
          }
        },
        "required": [
          "username",
          "role"
        ]
      },
      "Verify2FaLoginDto": {
        "type": "object",
        "properties": {
          "tempToken": {
            "type": "string",
            "maxLength": 1024
          },
          "code": {
            "type": "string",
            "maxLength": 255
          }
        },
        "required": [
          "tempToken",
          "code"
        ]
      },
      "EmptyBodyDto": {
        "type": "object",
        "properties": {}
      },
      "TwoFactorSetupResponseDto": {
        "type": "object",
        "properties": {
          "secret": {
            "type": "string"
          },
          "otpauthUrl": {
            "type": "string"
          },
          "qrCodeDataUrl": {
            "type": "string"
          },
          "backupCodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "secret",
          "otpauthUrl",
          "qrCodeDataUrl",
          "backupCodes"
        ]
      },
      "Enable2FaDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "maxLength": 255
          },
          "secret": {
            "type": "string",
            "maxLength": 1024
          }
        },
        "required": [
          "code",
          "secret"
        ]
      },
      "Enable2FaResponseDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "backupCodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "enabled",
          "backupCodes"
        ]
      },
      "Disable2FaDto": {
        "type": "object",
        "properties": {
          "password": {
            "type": "string",
            "maxLength": 255
          },
          "code": {
            "type": "string",
            "maxLength": 255
          }
        },
        "required": [
          "password",
          "code"
        ]
      },
      "Disable2FaResponseDto": {
        "type": "object",
        "properties": {
          "disabled": {
            "type": "boolean"
          }
        },
        "required": [
          "disabled"
        ]
      },
      "RegenerateBackupCodesDto": {
        "type": "object",
        "properties": {
          "password": {
            "type": "string",
            "maxLength": 255
          },
          "code": {
            "type": "string",
            "maxLength": 255
          }
        },
        "required": [
          "password",
          "code"
        ]
      },
      "RegenerateBackupCodesResponseDto": {
        "type": "object",
        "properties": {
          "backupCodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "backupCodes"
        ]
      },
      "TwoFactorStatusDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "verifiedAt": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "enabled"
        ]
      },
      "MeResponseDto": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "string"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "resource": {
                  "type": "string"
                },
                "action": {
                  "type": "string"
                },
                "effect": {
                  "type": "string"
                }
              },
              "required": [
                "resource",
                "action",
                "effect"
              ]
            }
          }
        },
        "required": [
          "username",
          "role"
        ]
      },
      "PermissionDto": {
        "type": "object",
        "properties": {
          "resource": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "effect": {
            "type": "string",
            "enum": [
              "allow",
              "deny"
            ]
          }
        },
        "required": [
          "resource",
          "action",
          "effect"
        ]
      },
      "RoleDetailsDto": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string"
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PermissionDto"
            }
          },
          "inherits": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "role",
          "permissions"
        ]
      },
      "SetRolePermissionsDto": {
        "type": "object",
        "properties": {
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PermissionDto"
            }
          },
          "inherits": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "permissions"
        ]
      },
      "RolesSuccessResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        }
      },
      "PaginatedResponse": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "number"
          },
          "page": {
            "type": "number"
          },
          "total": {
            "type": "number"
          },
          "nextCursor": {
            "type": "string"
          },
          "prevCursor": {
            "type": "string"
          }
        },
        "required": [
          "limit"
        ]
      },
      "CustomerResponseDto": {
        "type": "object",
        "properties": {
          "customerId": {
            "type": "string"
          },
          "actorId": {
            "type": "string"
          },
          "customerNumber": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "billingAddressLine1": {
            "type": "string"
          },
          "billingAddressLine2": {
            "type": "string"
          },
          "billingAddressCity": {
            "type": "string"
          },
          "billingAddressStateOrProvince": {
            "type": "string"
          },
          "billingAddressPostalCode": {
            "type": "string"
          },
          "billingAddressCountry": {
            "type": "string"
          },
          "telephone1": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "emailAddress1": {
            "type": "string"
          },
          "customerGroupId": {
            "type": "string"
          },
          "taxPositionId": {
            "type": "string"
          },
          "currencyCode": {
            "type": "string"
          },
          "customerDiscount": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "bankAccountName": {
            "type": "string"
          },
          "bankBsb": {
            "type": "string"
          },
          "bankAccountNumber": {
            "type": "string"
          },
          "businessNumber": {
            "type": "string"
          },
          "isTaxRegistered": {
            "type": "boolean"
          },
          "creditLimit": {
            "type": "string"
          },
          "isOnCreditHold": {
            "type": "boolean"
          },
          "isSalesBlocked": {
            "type": "boolean"
          },
          "salesBlockReasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "overrideCreditHoldUntil": {
            "format": "date-time",
            "type": "string"
          },
          "tradingTermsId": {
            "type": "string"
          },
          "earlyPaymentDiscount": {
            "type": "string"
          },
          "earlyPaymentDiscountDays": {
            "type": "number"
          },
          "stateCode": {
            "type": "string"
          },
          "sourceId": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string"
          },
          "modifiedOn": {
            "format": "date-time",
            "type": "string"
          },
          "parentCustomerId": {
            "type": "string",
            "nullable": true
          },
          "parentCustomerName": {
            "type": "string",
            "nullable": true
          },
          "childCustomers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomerResponseDto"
            }
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "contacts": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "deliveryAddresses": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "creditAssessment": {
            "type": "object",
            "properties": {
              "totalInvoiceBalance": {
                "type": "number"
              },
              "overdueInvoiceBalance": {
                "type": "number"
              },
              "glBalance": {
                "type": "number"
              },
              "isOverdue": {
                "type": "boolean"
              },
              "oldestOverdueInvoice": {
                "type": "string"
              },
              "oldestOverdueInvoiceId": {
                "type": "string"
              }
            },
            "required": [
              "totalInvoiceBalance",
              "overdueInvoiceBalance",
              "glBalance",
              "isOverdue"
            ]
          },
          "effectiveCreditLimit": {
            "type": "string"
          },
          "totalOutstanding": {
            "type": "number"
          },
          "uninvoicedOrdersTotal": {
            "type": "number"
          }
        },
        "required": [
          "customerId",
          "actorId",
          "customerNumber",
          "name",
          "billingAddressCountry",
          "currencyCode",
          "stateCode",
          "source"
        ]
      },
      "Object": {
        "type": "object",
        "properties": {}
      },
      "AgedBalanceResponseDto": {
        "type": "object",
        "properties": {
          "customerId": {
            "type": "string"
          },
          "customerName": {
            "type": "string"
          },
          "customerNumber": {
            "type": "string"
          },
          "current": {
            "type": "number"
          },
          "days1To30": {
            "type": "number"
          },
          "days31To60": {
            "type": "number"
          },
          "days61To90": {
            "type": "number"
          },
          "days90Plus": {
            "type": "number"
          },
          "totalOutstanding": {
            "type": "number"
          },
          "glBalance": {
            "type": "number"
          },
          "discrepancyAmount": {
            "type": "number"
          },
          "uninvoicedOrdersTotal": {
            "type": "number"
          },
          "currencyCode": {
            "type": "string"
          },
          "isOnCreditHold": {
            "type": "boolean"
          },
          "creditLimit": {
            "type": "string",
            "nullable": true
          },
          "stateCode": {
            "type": "string"
          }
        },
        "required": [
          "customerId",
          "customerName",
          "customerNumber",
          "current",
          "days1To30",
          "days31To60",
          "days61To90",
          "days90Plus",
          "totalOutstanding",
          "glBalance",
          "discrepancyAmount",
          "currencyCode",
          "isOnCreditHold",
          "creditLimit",
          "stateCode"
        ]
      },
      "CreditAssessmentResponseDto": {
        "type": "object",
        "properties": {
          "totalInvoiceBalance": {
            "type": "number"
          },
          "overdueInvoiceBalance": {
            "type": "number"
          },
          "glBalance": {
            "type": "number"
          },
          "isOverdue": {
            "type": "boolean"
          }
        },
        "required": [
          "totalInvoiceBalance",
          "overdueInvoiceBalance",
          "glBalance",
          "isOverdue"
        ]
      },
      "CreateCustomerDto": {
        "type": "object",
        "properties": {
          "actorId": {
            "type": "string",
            "format": "uuid"
          },
          "customerNumber": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "billingAddressLine1": {
            "type": "string"
          },
          "billingAddressLine2": {
            "type": "string"
          },
          "billingAddressCity": {
            "type": "string"
          },
          "billingAddressStateOrProvince": {
            "type": "string"
          },
          "billingAddressPostalCode": {
            "type": "string"
          },
          "billingAddressCountry": {
            "type": "string"
          },
          "telephone1": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "emailAddress1": {
            "type": "string",
            "format": "email"
          },
          "customerGroupId": {
            "type": "string",
            "format": "uuid"
          },
          "taxPositionId": {
            "type": "string",
            "format": "uuid"
          },
          "currencyCode": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "bankAccountName": {
            "type": "string"
          },
          "bankBsb": {
            "type": "string"
          },
          "bankAccountNumber": {
            "type": "string"
          },
          "businessNumber": {
            "type": "string"
          },
          "isTaxRegistered": {
            "type": "boolean"
          },
          "creditLimit": {
            "type": "string"
          },
          "isOnCreditHold": {
            "type": "boolean"
          },
          "tradingTermsId": {
            "type": "string",
            "format": "uuid"
          },
          "overrideCreditHoldUntil": {
            "format": "date-time",
            "type": "string"
          },
          "earlyPaymentDiscount": {
            "type": "string"
          },
          "earlyPaymentDiscountDays": {
            "type": "number"
          },
          "parentCustomerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "stateCode": {
            "type": "string"
          }
        },
        "required": [
          "customerNumber",
          "name",
          "billingAddressCountry"
        ]
      },
      "UpdateCustomerDto": {
        "type": "object",
        "properties": {
          "actorId": {
            "type": "string",
            "format": "uuid"
          },
          "customerNumber": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "billingAddressLine1": {
            "type": "string"
          },
          "billingAddressLine2": {
            "type": "string"
          },
          "billingAddressCity": {
            "type": "string"
          },
          "billingAddressStateOrProvince": {
            "type": "string"
          },
          "billingAddressPostalCode": {
            "type": "string"
          },
          "billingAddressCountry": {
            "type": "string"
          },
          "telephone1": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "emailAddress1": {
            "type": "string",
            "format": "email"
          },
          "customerGroupId": {
            "type": "string",
            "format": "uuid"
          },
          "taxPositionId": {
            "type": "string",
            "format": "uuid"
          },
          "currencyCode": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "bankAccountName": {
            "type": "string"
          },
          "bankBsb": {
            "type": "string"
          },
          "bankAccountNumber": {
            "type": "string"
          },
          "businessNumber": {
            "type": "string"
          },
          "isTaxRegistered": {
            "type": "boolean"
          },
          "creditLimit": {
            "type": "string"
          },
          "isOnCreditHold": {
            "type": "boolean"
          },
          "tradingTermsId": {
            "type": "string",
            "format": "uuid"
          },
          "overrideCreditHoldUntil": {
            "format": "date-time",
            "type": "string"
          },
          "earlyPaymentDiscount": {
            "type": "string"
          },
          "earlyPaymentDiscountDays": {
            "type": "number"
          },
          "parentCustomerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "stateCode": {
            "type": "string"
          }
        }
      },
      "EmailDocumentDto": {
        "type": "object",
        "properties": {
          "emailAddress": {
            "type": "string",
            "format": "email",
            "description": "The recipient email address"
          },
          "subject": {
            "type": "string",
            "description": "The email subject"
          },
          "body": {
            "type": "string",
            "description": "The text body for the email"
          },
          "hookSlug": {
            "type": "string",
            "description": "The hook slug for the PDF template to use (e.g. sales-order-quote)"
          },
          "customPdfText": {
            "type": "string",
            "description": "Custom text injected into the generated PDF"
          },
          "targetId": {
            "type": "string",
            "description": "The target entity ID, if different from the order ID"
          },
          "contextSlug": {
            "type": "string",
            "description": "The context slug for the report data source"
          }
        },
        "required": [
          "emailAddress",
          "subject",
          "body"
        ]
      },
      "CustomerGroupResponseDto": {
        "type": "object",
        "properties": {
          "earlyPaymentDiscount": {
            "type": "string"
          },
          "earlyPaymentDiscountDays": {
            "type": "number"
          },
          "customerGroupId": {
            "type": "string"
          },
          "groupCode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "defaultArAccountId": {
            "type": "string"
          },
          "defaultRevenueAccountId": {
            "type": "string"
          },
          "defaultCostCenterId": {
            "type": "string"
          },
          "defaultActivityId": {
            "type": "string"
          },
          "stateCode": {
            "type": "string"
          },
          "isOnCreditHold": {
            "type": "boolean"
          },
          "creditLimit": {
            "type": "string"
          },
          "tradingTermsId": {
            "type": "string"
          },
          "taxPositionId": {
            "type": "string"
          },
          "modifiedOn": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "customerGroupId",
          "groupCode",
          "name"
        ]
      },
      "CreateCustomerGroupDto": {
        "type": "object",
        "properties": {
          "earlyPaymentDiscount": {
            "type": "string"
          },
          "earlyPaymentDiscountDays": {
            "type": "number"
          },
          "stateCode": {
            "type": "string"
          },
          "groupCode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "defaultArAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "defaultRevenueAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "defaultCostCenterId": {
            "type": "string",
            "format": "uuid"
          },
          "defaultActivityId": {
            "type": "string",
            "format": "uuid"
          },
          "tradingTermsId": {
            "type": "string",
            "format": "uuid"
          },
          "taxPositionId": {
            "type": "string",
            "format": "uuid"
          },
          "creditLimit": {
            "type": "string"
          }
        },
        "required": [
          "groupCode",
          "name"
        ]
      },
      "UpdateCustomerGroupDto": {
        "type": "object",
        "properties": {
          "earlyPaymentDiscount": {
            "type": "string"
          },
          "earlyPaymentDiscountDays": {
            "type": "number"
          },
          "stateCode": {
            "type": "string"
          },
          "groupCode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "defaultArAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "defaultRevenueAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "defaultCostCenterId": {
            "type": "string",
            "format": "uuid"
          },
          "defaultActivityId": {
            "type": "string",
            "format": "uuid"
          },
          "tradingTermsId": {
            "type": "string",
            "format": "uuid"
          },
          "taxPositionId": {
            "type": "string",
            "format": "uuid"
          },
          "creditLimit": {
            "type": "string"
          }
        }
      },
      "DeleteCustomerGroupResponseDto": {
        "type": "object",
        "properties": {
          "deleted": {
            "type": "boolean"
          }
        },
        "required": [
          "deleted"
        ]
      },
      "RunHookBodyDto": {
        "type": "object",
        "properties": {
          "shipmentId": {
            "type": "string",
            "description": "Optional shipment ID for shipment/picking hooks"
          },
          "customPdfText": {
            "type": "string"
          },
          "quoteIntroText": {
            "type": "string",
            "description": "Deprecated legacy alias for customPdfText"
          }
        }
      },
      "HookDto": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "contexts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "slug",
          "name",
          "description",
          "contexts"
        ]
      },
      "HookAssignmentDto": {
        "type": "object",
        "properties": {
          "hookSlug": {
            "type": "string"
          },
          "reportId": {
            "type": "string"
          },
          "contextSlug": {
            "type": "string"
          }
        },
        "required": [
          "hookSlug",
          "reportId",
          "contextSlug"
        ]
      },
      "UpdateHookAssignmentDto": {
        "type": "object",
        "properties": {
          "reportId": {
            "type": "string"
          },
          "contextSlug": {
            "type": "string"
          }
        }
      },
      "RandomIdData": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ]
      },
      "ReportDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "template": {
            "type": "string"
          },
          "outputNamePattern": {
            "type": "string"
          },
          "contexts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "isSystem": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "slug",
          "name",
          "template",
          "isSystem"
        ]
      },
      "CreateReportDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "template": {
            "type": "string"
          },
          "outputNamePattern": {
            "type": "string"
          },
          "contexts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "name",
          "slug",
          "template"
        ]
      },
      "UpdateReportDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "template": {
            "type": "string"
          },
          "outputNamePattern": {
            "type": "string"
          },
          "contexts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PreviewReportDto": {
        "type": "object",
        "properties": {
          "template": {
            "type": "string"
          },
          "mockData": {
            "type": "object"
          },
          "hookSlug": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          }
        },
        "required": [
          "template"
        ]
      },
      "UomResponseDto": {
        "type": "object",
        "properties": {
          "uomCode": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "uomCode",
          "description"
        ]
      },
      "CreateUomDto": {
        "type": "object",
        "properties": {
          "uomCode": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "uomCode",
          "description"
        ]
      },
      "UpdateUomDto": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          }
        }
      },
      "ExchangeRateResponseDto": {
        "type": "object",
        "properties": {
          "exchangeRateId": {
            "type": "string"
          },
          "currencyCode": {
            "type": "string"
          },
          "currencyName": {
            "type": "string"
          },
          "buyRate": {
            "type": "string"
          },
          "sellRate": {
            "type": "string"
          },
          "effectiveDate": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "exchangeRateId",
          "currencyCode",
          "currencyName",
          "buyRate",
          "sellRate",
          "effectiveDate"
        ]
      },
      "CreateExchangeRateDto": {
        "type": "object",
        "properties": {
          "currencyCode": {
            "type": "string"
          },
          "currencyName": {
            "type": "string"
          },
          "buyRate": {
            "type": "string"
          },
          "sellRate": {
            "type": "string"
          },
          "effectiveDate": {
            "type": "string"
          }
        },
        "required": [
          "currencyCode",
          "currencyName",
          "buyRate",
          "sellRate"
        ]
      },
      "UpdateExchangeRateDto": {
        "type": "object",
        "properties": {
          "currencyName": {
            "type": "string"
          },
          "buyRate": {
            "type": "string"
          },
          "sellRate": {
            "type": "string"
          },
          "effectiveDate": {
            "type": "string"
          }
        }
      },
      "OrganizationResponseDto": {
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "organizationId",
          "name"
        ]
      },
      "UpdateOrganizationDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "addressLine1": {
            "type": "string"
          },
          "addressLine2": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "postCode": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "string"
          },
          "website": {
            "type": "string",
            "format": "uri"
          },
          "companyNumber": {
            "type": "string"
          },
          "taxNumber": {
            "type": "string"
          },
          "logoUrl": {
            "type": "string",
            "format": "uri"
          },
          "bankName": {
            "type": "string"
          },
          "bankAccountName": {
            "type": "string"
          },
          "bankAccountNumber": {
            "type": "string"
          },
          "bankSwiftBic": {
            "type": "string"
          },
          "bankIban": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ]
      },
      "OrderedSettingDto": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          },
          "order": {
            "type": "number"
          }
        },
        "required": [
          "value",
          "order"
        ]
      },
      "AppConfigResponseDto": {
        "type": "object",
        "properties": {
          "defaultFulfillmentLocationId": {
            "type": "string"
          },
          "apiRateLimit": {
            "type": "string"
          },
          "creditLimitBehavior": {
            "type": "object"
          },
          "taxProviderMappings": {
            "type": "object"
          },
          "enrichmentProviderMappings": {
            "type": "object"
          },
          "smtpHost": {
            "type": "string"
          },
          "smtpPort": {
            "type": "number"
          },
          "smtpUser": {
            "type": "string"
          },
          "smtpPass": {
            "type": "string"
          },
          "smtpFromAddress": {
            "type": "string"
          },
          "defaultPurchaseTaxCategoryId": {
            "type": "string"
          },
          "defaultSalesTaxCategoryId": {
            "type": "string"
          },
          "defaultCustomerTermsId": {
            "type": "string"
          },
          "defaultSupplierTermsId": {
            "type": "string"
          },
          "defaultCustomerTaxPositionId": {
            "type": "string"
          },
          "defaultSupplierTaxPositionId": {
            "type": "string"
          },
          "actorTags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderedSettingDto"
            }
          },
          "actorContactRoles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderedSettingDto"
            }
          },
          "projectContactRoles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderedSettingDto"
            }
          },
          "projectActorRoles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderedSettingDto"
            }
          },
          "projectStatuses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderedSettingDto"
            }
          },
          "projectTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderedSettingDto"
            }
          },
          "referralModes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderedSettingDto"
            }
          },
          "salesAnalysisCodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderedSettingDto"
            }
          }
        },
        "required": [
          "defaultFulfillmentLocationId",
          "apiRateLimit"
        ]
      },
      "UpdateAppConfigDto": {
        "type": "object",
        "properties": {
          "defaultFulfillmentLocationId": {
            "type": "string"
          },
          "creditLimitBehavior": {
            "type": "string",
            "enum": [
              "hard",
              "soft",
              "notify"
            ]
          },
          "defaultCustomerTermsId": {
            "type": "string"
          },
          "defaultSupplierTermsId": {
            "type": "string"
          },
          "defaultCustomerTaxPositionId": {
            "type": "string"
          },
          "defaultSupplierTaxPositionId": {
            "type": "string"
          },
          "defaultPurchaseTaxCategoryId": {
            "type": "string"
          },
          "defaultSalesTaxCategoryId": {
            "type": "string"
          },
          "smtpFromAddress": {
            "type": "string",
            "format": "email"
          },
          "smtpHost": {
            "type": "string"
          },
          "smtpPort": {
            "type": "number"
          },
          "smtpUser": {
            "type": "string"
          },
          "smtpPass": {
            "type": "string"
          },
          "apiRateLimit": {
            "type": "string"
          },
          "taxProviderMappings": {
            "type": "object"
          },
          "enrichmentProviderMappings": {
            "type": "object"
          },
          "actorTags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderedSettingDto"
            }
          },
          "actorContactRoles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderedSettingDto"
            }
          },
          "projectContactRoles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderedSettingDto"
            }
          },
          "projectActorRoles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderedSettingDto"
            }
          },
          "referralModes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderedSettingDto"
            }
          },
          "projectStatuses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderedSettingDto"
            }
          },
          "projectTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderedSettingDto"
            }
          },
          "salesAnalysisCodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderedSettingDto"
            }
          }
        }
      },
      "TradingTermResponseDto": {
        "type": "object",
        "properties": {
          "tradingTermsId": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "days": {
            "type": "number"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "tradingTermsId",
          "code",
          "description",
          "days",
          "type"
        ]
      },
      "CreateTradingTermDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "days": {
            "type": "number"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "description",
          "days",
          "type"
        ]
      },
      "UpdateTradingTermDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "days": {
            "type": "number"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "SettingsSuccessResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ]
      },
      "CostCenterResponseDto": {
        "type": "object",
        "properties": {
          "costCenterId": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          }
        },
        "required": [
          "costCenterId",
          "code",
          "name",
          "isActive"
        ]
      },
      "CreateCostCenterDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          }
        },
        "required": [
          "code",
          "name"
        ]
      },
      "UpdateCostCenterDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          }
        }
      },
      "BulkImportResultDto": {
        "type": "object",
        "properties": {
          "count": {
            "type": "number"
          },
          "updated": {
            "type": "number"
          }
        },
        "required": [
          "count",
          "updated"
        ]
      },
      "ActivityResponseDto": {
        "type": "object",
        "properties": {
          "activityId": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          }
        },
        "required": [
          "activityId",
          "code",
          "name",
          "isActive"
        ]
      },
      "CreateActivityDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          }
        },
        "required": [
          "code",
          "name"
        ]
      },
      "UpdateActivityDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          }
        }
      },
      "LicenseStatusDto": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "active",
              "warning",
              "read_only"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "trial",
              "perpetual",
              "none"
            ]
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "warningMessage": {
            "type": "string",
            "nullable": true
          },
          "systemId": {
            "type": "string",
            "nullable": true
          },
          "licenseHash": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "state",
          "type",
          "expiresAt",
          "warningMessage",
          "systemId",
          "licenseHash"
        ]
      },
      "ProductResponseDto": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string"
          },
          "productNumber": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "productType": {
            "type": "string"
          },
          "structureType": {
            "type": "string"
          },
          "barcode": {
            "type": "string",
            "nullable": true
          },
          "listPrice": {
            "type": "string"
          },
          "standardCost": {
            "type": "string"
          },
          "tradePrice": {
            "type": "string",
            "nullable": true
          },
          "priceLevel3": {
            "type": "string",
            "nullable": true
          },
          "priceLevel4": {
            "type": "string",
            "nullable": true
          },
          "purchaseTaxCategoryId": {
            "type": "string",
            "nullable": true
          },
          "salesTaxCategoryId": {
            "type": "string",
            "nullable": true
          },
          "externalTaxCode": {
            "type": "string",
            "nullable": true
          },
          "alternateProductNumber": {
            "type": "string",
            "nullable": true
          },
          "imagePath": {
            "type": "string",
            "nullable": true
          },
          "productGroupId": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "stateCode": {
            "type": "string",
            "nullable": true
          },
          "baseUom": {
            "type": "string"
          },
          "defaultSalesUomId": {
            "type": "string",
            "nullable": true
          },
          "defaultPurchaseUomId": {
            "type": "string",
            "nullable": true
          },
          "weight": {
            "type": "string",
            "nullable": true
          },
          "tenantId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "productId",
          "productNumber",
          "name",
          "productType",
          "structureType",
          "barcode",
          "listPrice",
          "standardCost",
          "tradePrice",
          "priceLevel3",
          "priceLevel4",
          "purchaseTaxCategoryId",
          "salesTaxCategoryId",
          "externalTaxCode",
          "alternateProductNumber",
          "imagePath",
          "productGroupId",
          "notes",
          "stateCode",
          "baseUom",
          "defaultSalesUomId",
          "defaultPurchaseUomId",
          "weight",
          "tenantId",
          "createdAt",
          "updatedAt"
        ]
      },
      "ProductCostSummaryResponseDto": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string",
            "description": "Product ID"
          },
          "standardCost": {
            "type": "string",
            "nullable": true,
            "description": "Standard cost per unit"
          },
          "weightedAverageCost": {
            "type": "string",
            "nullable": true,
            "description": "Weighted average cost per unit"
          },
          "listPrice": {
            "type": "string",
            "nullable": true,
            "description": "List price per unit"
          },
          "tradePrice": {
            "type": "string",
            "nullable": true,
            "description": "Trade price per unit"
          },
          "preferredSupplierCost": {
            "type": "string",
            "nullable": true,
            "description": "Preferred supplier unit cost price"
          },
          "preferredSupplierDiscount": {
            "type": "string",
            "nullable": true,
            "description": "Preferred supplier discount percentage"
          },
          "preferredSupplierVendorId": {
            "type": "string",
            "nullable": true,
            "description": "Preferred supplier vendor ID"
          },
          "preferredSupplierName": {
            "type": "string",
            "nullable": true,
            "description": "Preferred supplier vendor name"
          },
          "preferredSupplierVendorNumber": {
            "type": "string",
            "nullable": true,
            "description": "Preferred supplier vendor number"
          },
          "lastPurchasePrice": {
            "type": "string",
            "nullable": true,
            "description": "Unit price from latest purchase order line"
          },
          "lastPurchaseDate": {
            "type": "string",
            "nullable": true,
            "description": "Order date of latest purchase order"
          },
          "lastPurchaseOrderNumber": {
            "type": "string",
            "nullable": true,
            "description": "Order number of latest purchase order"
          },
          "lastPurchaseVendorName": {
            "type": "string",
            "nullable": true,
            "description": "Vendor name of latest purchase order"
          },
          "lastPurchaseOrderId": {
            "type": "string",
            "nullable": true,
            "description": "Purchase order ID of latest purchase order"
          }
        },
        "required": [
          "productId"
        ]
      },
      "CreateProductDto": {
        "type": "object",
        "properties": {
          "productNumber": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "productType": {
            "type": "object"
          },
          "structureType": {
            "type": "object"
          },
          "barcode": {
            "type": "string"
          },
          "listPrice": {
            "type": "string"
          },
          "standardCost": {
            "type": "string"
          },
          "tradePrice": {
            "type": "string"
          },
          "priceLevel3": {
            "type": "string"
          },
          "priceLevel4": {
            "type": "string"
          },
          "purchaseTaxCategoryId": {
            "type": "string",
            "format": "uuid"
          },
          "salesTaxCategoryId": {
            "type": "string",
            "format": "uuid"
          },
          "externalTaxCode": {
            "type": "string"
          },
          "alternateProductNumber": {
            "type": "string"
          },
          "imagePath": {
            "type": "string"
          },
          "productGroupId": {
            "type": "string",
            "format": "uuid"
          },
          "notes": {
            "type": "string"
          },
          "stateCode": {
            "type": "string"
          },
          "baseUom": {
            "type": "string"
          },
          "weight": {
            "type": "string"
          },
          "alternateInvoiceDescription": {
            "type": "string"
          },
          "boxQuantity": {
            "type": "string"
          },
          "defaultSalesUomId": {
            "type": "string",
            "format": "uuid"
          },
          "defaultPurchaseUomId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "productNumber",
          "name",
          "baseUom"
        ]
      },
      "UpdateProductDto": {
        "type": "object",
        "properties": {
          "productNumber": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "productType": {
            "type": "object"
          },
          "structureType": {
            "type": "object"
          },
          "barcode": {
            "type": "string"
          },
          "listPrice": {
            "type": "string"
          },
          "standardCost": {
            "type": "string"
          },
          "tradePrice": {
            "type": "string"
          },
          "priceLevel3": {
            "type": "string"
          },
          "priceLevel4": {
            "type": "string"
          },
          "purchaseTaxCategoryId": {
            "type": "string",
            "format": "uuid"
          },
          "salesTaxCategoryId": {
            "type": "string",
            "format": "uuid"
          },
          "externalTaxCode": {
            "type": "string"
          },
          "alternateProductNumber": {
            "type": "string"
          },
          "imagePath": {
            "type": "string"
          },
          "productGroupId": {
            "type": "string",
            "format": "uuid"
          },
          "notes": {
            "type": "string"
          },
          "stateCode": {
            "type": "string"
          },
          "baseUom": {
            "type": "string"
          },
          "weight": {
            "type": "string"
          },
          "alternateInvoiceDescription": {
            "type": "string"
          },
          "boxQuantity": {
            "type": "string"
          },
          "defaultSalesUomId": {
            "type": "string",
            "format": "uuid"
          },
          "defaultPurchaseUomId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "AddSupplierDto": {
        "type": "object",
        "properties": {
          "vendorId": {
            "type": "string",
            "format": "uuid"
          },
          "supplierPartNumber": {
            "type": "string"
          },
          "costPrice": {
            "type": "number",
            "minimum": 0
          },
          "effectiveFrom": {
            "type": "string"
          },
          "effectiveTo": {
            "type": "string"
          }
        },
        "required": [
          "vendorId"
        ]
      },
      "AddProductUomDto": {
        "type": "object",
        "properties": {
          "uomCode": {
            "type": "string"
          },
          "ratio": {
            "type": "string"
          },
          "barcode": {
            "type": "string"
          }
        },
        "required": [
          "uomCode",
          "ratio"
        ]
      },
      "LinkBinDto": {
        "type": "object",
        "properties": {
          "locationId": {
            "type": "string",
            "format": "uuid"
          },
          "binId": {
            "type": "string",
            "format": "uuid"
          },
          "isPrimaryPerLocation": {
            "type": "boolean"
          },
          "minQuantity": {
            "type": "string"
          },
          "maxQuantity": {
            "type": "string"
          }
        },
        "required": [
          "locationId",
          "binId"
        ]
      },
      "AddProductComponentDto": {
        "type": "object",
        "properties": {
          "childProductId": {
            "type": "string",
            "format": "uuid"
          },
          "parentQuantity": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "sequenceNumber": {
            "type": "number"
          },
          "fractionalBehavior": {
            "type": "string",
            "enum": [
              "allow_fractional",
              "round_up",
              "round_down",
              "round_nearest"
            ]
          }
        },
        "required": [
          "childProductId",
          "parentQuantity",
          "quantity"
        ]
      },
      "UpdateProductComponentDto": {
        "type": "object",
        "properties": {
          "parentQuantity": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "sequenceNumber": {
            "type": "number"
          },
          "fractionalBehavior": {
            "type": "string",
            "enum": [
              "allow_fractional",
              "round_up",
              "round_down",
              "round_nearest"
            ]
          }
        }
      },
      "ProductGroupResponseDto": {
        "type": "object",
        "properties": {
          "productGroupId": {
            "type": "string"
          },
          "groupCode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "defaultRevenueAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultExpenseAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultCostCenterId": {
            "type": "string",
            "nullable": true
          },
          "defaultActivityId": {
            "type": "string",
            "nullable": true
          },
          "purchaseTaxCategoryId": {
            "type": "string",
            "nullable": true
          },
          "salesTaxCategoryId": {
            "type": "string",
            "nullable": true
          },
          "tenantId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "productGroupId",
          "groupCode",
          "name",
          "defaultRevenueAccountId",
          "defaultExpenseAccountId",
          "defaultCostCenterId",
          "defaultActivityId",
          "purchaseTaxCategoryId",
          "salesTaxCategoryId",
          "tenantId",
          "createdAt",
          "updatedAt"
        ]
      },
      "CreateProductGroupDto": {
        "type": "object",
        "properties": {
          "groupCode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "defaultRevenueAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "defaultExpenseAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "defaultCostCenterId": {
            "type": "string",
            "format": "uuid"
          },
          "defaultActivityId": {
            "type": "string",
            "format": "uuid"
          },
          "purchaseTaxCategoryId": {
            "type": "string",
            "format": "uuid"
          },
          "salesTaxCategoryId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "groupCode",
          "name"
        ]
      },
      "UpdateProductGroupDto": {
        "type": "object",
        "properties": {
          "groupCode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "defaultRevenueAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "defaultExpenseAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "defaultCostCenterId": {
            "type": "string",
            "format": "uuid"
          },
          "defaultActivityId": {
            "type": "string",
            "format": "uuid"
          },
          "purchaseTaxCategoryId": {
            "type": "string",
            "format": "uuid"
          },
          "salesTaxCategoryId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "InventoryResponseDto": {
        "type": "object",
        "properties": {
          "inventoryLevelId": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "productNumber": {
            "type": "string"
          },
          "productName": {
            "type": "string"
          },
          "locationNo": {
            "type": "string"
          },
          "locationName": {
            "type": "string"
          },
          "quantityOnHand": {
            "type": "string"
          },
          "quantityCommitted": {
            "type": "string"
          },
          "quantityReserved": {
            "type": "string"
          },
          "quantityOnOrder": {
            "type": "string"
          },
          "quantityAvailable": {
            "type": "string"
          },
          "alternateProductNumber": {
            "type": "string",
            "nullable": true
          },
          "defaultBinNumber": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "inventoryLevelId",
          "productId",
          "productNumber",
          "productName",
          "locationNo",
          "locationName",
          "quantityOnHand",
          "quantityCommitted",
          "quantityReserved",
          "quantityOnOrder",
          "quantityAvailable"
        ]
      },
      "FindByProductIdsBulkDto": {
        "type": "object",
        "properties": {
          "productIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "locationId": {
            "type": "string"
          }
        },
        "required": [
          "productIds"
        ]
      },
      "InventoryBinResponseDto": {
        "type": "object",
        "properties": {
          "binId": {
            "type": "string"
          },
          "zoneId": {
            "type": "string"
          },
          "zoneCode": {
            "type": "string"
          },
          "binNumber": {
            "type": "string"
          },
          "binType": {
            "type": "string"
          },
          "isUnavailable": {
            "type": "boolean"
          },
          "onHand": {
            "type": "string"
          }
        },
        "required": [
          "binId",
          "binNumber",
          "onHand"
        ]
      },
      "AvailableBinDto": {
        "type": "object",
        "properties": {
          "binId": {
            "type": "string"
          },
          "binNumber": {
            "type": "string"
          },
          "binType": {
            "type": "string"
          },
          "zoneCode": {
            "type": "string"
          }
        },
        "required": [
          "binId",
          "binNumber",
          "binType"
        ]
      },
      "PutawayContextResponseDto": {
        "type": "object",
        "properties": {
          "primaryBinId": {
            "type": "string",
            "nullable": true
          },
          "primaryBinNumber": {
            "type": "string",
            "nullable": true
          },
          "currentQuantity": {
            "type": "number"
          },
          "availableBins": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AvailableBinDto"
            }
          }
        },
        "required": [
          "currentQuantity",
          "availableBins"
        ]
      },
      "InventoryLocationResponseDto": {
        "type": "object",
        "properties": {
          "locationId": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "locationId",
          "code",
          "name"
        ]
      },
      "TopographyLocationResponseDto": {
        "type": "object",
        "properties": {
          "locationId": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "zones": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "locationId",
          "code",
          "name"
        ]
      },
      "InventoryLedgerResponseDto": {
        "type": "object",
        "properties": {
          "ledgerId": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "date": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "ledgerId",
          "productId",
          "quantity",
          "date"
        ]
      },
      "InventoryEntryDetailsResponseDto": {
        "type": "object",
        "properties": {
          "entryId": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "date": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "entryId",
          "productId",
          "quantity",
          "date"
        ]
      },
      "PendingPutawayResponseDto": {
        "type": "object",
        "properties": {
          "putawayId": {
            "type": "string"
          },
          "sourceType": {
            "type": "string"
          },
          "referenceNumber": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "productName": {
            "type": "string"
          },
          "productNumber": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "putawayStatus": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string"
          },
          "sourceBinCode": {
            "type": "string"
          },
          "returnReason": {
            "type": "string"
          }
        },
        "required": [
          "putawayId",
          "sourceType",
          "referenceNumber",
          "productId",
          "productName",
          "productNumber",
          "quantity",
          "putawayStatus",
          "locationId",
          "sourceBinCode"
        ]
      },
      "PutawayLineDto": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          },
          "lineId": {
            "type": "string"
          },
          "sourceType": {
            "type": "string",
            "enum": [
              "goods_receipt",
              "sales_return",
              "transfer_receipt",
              "work_order"
            ]
          },
          "destinationBinId": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "newTotalQuantity": {
            "type": "string"
          }
        },
        "required": [
          "lineId",
          "sourceType",
          "destinationBinId",
          "quantity"
        ]
      },
      "PutawayBulkDto": {
        "type": "object",
        "properties": {
          "putaways": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PutawayLineDto"
            }
          }
        },
        "required": [
          "putaways"
        ]
      },
      "InventorySuccessResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ]
      },
      "QuarantineMoveDto": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string"
          },
          "sourceBinId": {
            "type": "string"
          },
          "targetBinId": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "sourceType": {
            "type": "string",
            "enum": [
              "goods_receipt",
              "sales_return",
              "manual"
            ]
          },
          "lineId": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "MoveStockLineDto": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string"
          },
          "sourceBinId": {
            "type": "string"
          },
          "targetBinId": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "uomCode": {
            "type": "string"
          }
        },
        "required": [
          "productId",
          "sourceBinId",
          "targetBinId",
          "quantity"
        ]
      },
      "MoveStockDto": {
        "type": "object",
        "properties": {
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MoveStockLineDto"
            }
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "lines"
        ]
      },
      "AdjustStockLineDto": {
        "type": "object",
        "properties": {
          "uomCode": {
            "type": "string"
          },
          "productId": {
            "type": "string",
            "format": "uuid"
          },
          "binId": {
            "type": "string",
            "format": "uuid"
          },
          "newQuantity": {
            "type": "string"
          }
        },
        "required": [
          "productId",
          "binId",
          "newQuantity"
        ]
      },
      "AdjustStockDto": {
        "type": "object",
        "properties": {
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdjustStockLineDto"
            }
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "lines"
        ]
      },
      "GlAccountResponseDto": {
        "type": "object",
        "properties": {
          "glAccountId": {
            "type": "string"
          },
          "accountCode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "accountType": {
            "type": "string"
          },
          "isGroup": {
            "type": "boolean"
          },
          "isActive": {
            "type": "boolean"
          },
          "parentAccountId": {
            "type": "string",
            "nullable": true
          },
          "isSystem": {
            "type": "boolean"
          }
        },
        "required": [
          "glAccountId",
          "accountCode",
          "name",
          "accountType",
          "isGroup",
          "isActive"
        ]
      },
      "CreateAccountRequestDto": {
        "type": "object",
        "properties": {
          "accountCode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "accountType": {
            "type": "string"
          },
          "parentAccountId": {
            "type": "string"
          },
          "isGroup": {
            "type": "boolean"
          },
          "isBankAccount": {
            "type": "boolean"
          },
          "currencyCode": {
            "type": "string"
          },
          "metadata": {
            "type": "object"
          }
        },
        "required": [
          "accountCode",
          "name",
          "accountType"
        ]
      },
      "UpdateAccountRequestDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "isBankAccount": {
            "type": "boolean"
          },
          "metadata": {
            "type": "object"
          }
        }
      },
      "JournalEntryResponseDto": {
        "type": "object",
        "properties": {
          "journalEntryId": {
            "type": "string"
          },
          "entryNumber": {
            "type": "string"
          }
        },
        "required": [
          "journalEntryId",
          "entryNumber"
        ]
      },
      "JournalLineDto": {
        "type": "object",
        "properties": {
          "accountCode": {
            "type": "string"
          },
          "accountId": {
            "type": "string"
          },
          "costCenterId": {
            "type": "string"
          },
          "activityId": {
            "type": "string"
          },
          "partyType": {
            "type": "object"
          },
          "partyId": {
            "type": "string",
            "nullable": true
          },
          "debit": {
            "type": "number",
            "minimum": 0
          },
          "credit": {
            "type": "number",
            "minimum": 0
          },
          "foreignDebit": {
            "type": "number",
            "minimum": 0
          },
          "foreignCredit": {
            "type": "number",
            "minimum": 0
          },
          "foreignCurrencyCode": {
            "type": "string"
          },
          "exchangeRate": {
            "type": "number"
          },
          "memo": {
            "type": "string"
          }
        },
        "required": [
          "debit",
          "credit"
        ]
      },
      "CreateJournalEntryDto": {
        "type": "object",
        "properties": {
          "journalEntryId": {
            "type": "string",
            "format": "uuid"
          },
          "sourceType": {
            "type": "string",
            "enum": [
              "manual",
              "opening_balance",
              "adjustment",
              "payroll",
              "tax_settlement"
            ],
            "description": "Type of journal entry (manual, opening_balance, adjustment, payroll, tax_settlement)",
            "default": "manual"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalLineDto"
            }
          },
          "memo": {
            "type": "string"
          },
          "entryDate": {
            "type": "string"
          },
          "actor": {
            "type": "string"
          }
        },
        "required": [
          "lines"
        ]
      },
      "TrialBalanceResponseDto": {
        "type": "object",
        "properties": {
          "accountCode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "accountType": {
            "type": "string"
          },
          "isGroup": {
            "type": "boolean"
          },
          "openingBalance": {
            "type": "number"
          },
          "periodDebit": {
            "type": "number"
          },
          "periodCredit": {
            "type": "number"
          },
          "closingBalance": {
            "type": "number"
          },
          "ytdDebit": {
            "type": "number"
          },
          "ytdCredit": {
            "type": "number"
          },
          "ytdBalance": {
            "type": "number"
          }
        },
        "required": [
          "accountCode",
          "name",
          "accountType",
          "isGroup",
          "openingBalance",
          "periodDebit",
          "periodCredit",
          "closingBalance",
          "ytdDebit",
          "ytdCredit",
          "ytdBalance"
        ]
      },
      "CashFlowPeriodDto": {
        "type": "object",
        "properties": {
          "startDate": {
            "type": "string"
          },
          "endDate": {
            "type": "string"
          },
          "periodName": {
            "type": "string"
          },
          "fiscalYear": {
            "type": "number"
          },
          "periodNumber": {
            "type": "number"
          }
        },
        "required": [
          "startDate",
          "endDate"
        ]
      },
      "CashFlowLineItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "category": {
            "type": "string",
            "enum": [
              "operating",
              "investing",
              "financing"
            ]
          },
          "amount": {
            "type": "number"
          },
          "accountCodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "name",
          "category",
          "amount"
        ]
      },
      "CashFlowSectionDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CashFlowLineItemDto"
            }
          },
          "netCash": {
            "type": "number"
          }
        },
        "required": [
          "title",
          "lines",
          "netCash"
        ]
      },
      "CashFlowReconciliationDto": {
        "type": "object",
        "properties": {
          "beginningCash": {
            "type": "number"
          },
          "netChangeInCash": {
            "type": "number"
          },
          "endingCash": {
            "type": "number"
          },
          "glCashBalance": {
            "type": "number"
          },
          "drift": {
            "type": "number"
          },
          "isReconciled": {
            "type": "boolean"
          }
        },
        "required": [
          "beginningCash",
          "netChangeInCash",
          "endingCash",
          "glCashBalance",
          "drift",
          "isReconciled"
        ]
      },
      "CashFlowStatementResponseDto": {
        "type": "object",
        "properties": {
          "period": {
            "$ref": "#/components/schemas/CashFlowPeriodDto"
          },
          "operatingActivities": {
            "$ref": "#/components/schemas/CashFlowSectionDto"
          },
          "investingActivities": {
            "$ref": "#/components/schemas/CashFlowSectionDto"
          },
          "financingActivities": {
            "$ref": "#/components/schemas/CashFlowSectionDto"
          },
          "reconciliation": {
            "$ref": "#/components/schemas/CashFlowReconciliationDto"
          },
          "comparativePeriod": {
            "$ref": "#/components/schemas/CashFlowStatementResponseDto"
          }
        },
        "required": [
          "period",
          "operatingActivities",
          "investingActivities",
          "financingActivities",
          "reconciliation"
        ]
      },
      "CashFlowDrilldownItemDto": {
        "type": "object",
        "properties": {
          "journalEntryId": {
            "type": "string"
          },
          "entryNumber": {
            "type": "string"
          },
          "entryDate": {
            "type": "string"
          },
          "sourceType": {
            "type": "string"
          },
          "memo": {
            "type": "string"
          },
          "partyType": {
            "type": "string"
          },
          "partyName": {
            "type": "string"
          },
          "accountCode": {
            "type": "string"
          },
          "accountName": {
            "type": "string"
          },
          "allocatedCash": {
            "type": "number"
          }
        },
        "required": [
          "journalEntryId",
          "entryNumber",
          "entryDate",
          "sourceType",
          "memo",
          "accountCode",
          "accountName",
          "allocatedCash"
        ]
      },
      "CashFlowDrilldownResponseDto": {
        "type": "object",
        "properties": {
          "lineId": {
            "type": "string"
          },
          "lineName": {
            "type": "string"
          },
          "category": {
            "type": "string",
            "enum": [
              "operating",
              "investing",
              "financing"
            ]
          },
          "totalAmount": {
            "type": "number"
          },
          "transactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CashFlowDrilldownItemDto"
            }
          }
        },
        "required": [
          "lineId",
          "lineName",
          "category",
          "totalAmount",
          "transactions"
        ]
      },
      "GlEntryResponseDto": {
        "type": "object",
        "properties": {
          "journalEntryId": {
            "type": "string"
          },
          "entryNumber": {
            "type": "string"
          },
          "entryDate": {
            "type": "string"
          },
          "entryMemo": {
            "type": "string",
            "nullable": true
          },
          "sourceType": {
            "type": "string",
            "nullable": true
          },
          "sourceId": {
            "type": "string",
            "nullable": true
          },
          "accountCode": {
            "type": "string"
          },
          "accountName": {
            "type": "string"
          },
          "partyType": {
            "type": "string",
            "nullable": true
          },
          "partyId": {
            "type": "string",
            "nullable": true
          },
          "debit": {
            "type": "string"
          },
          "credit": {
            "type": "string"
          },
          "lineMemo": {
            "type": "string",
            "nullable": true
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          },
          "createdOn": {
            "type": "object"
          },
          "runningBalance": {
            "type": "number",
            "nullable": true
          }
        }
      },
      "GlAccountSummaryDto": {
        "type": "object",
        "properties": {
          "accountCode": {
            "type": "string"
          },
          "accountName": {
            "type": "string"
          },
          "accountType": {
            "type": "string"
          },
          "openingBalance": {
            "type": "number"
          },
          "periodDebit": {
            "type": "number"
          },
          "periodCredit": {
            "type": "number"
          },
          "netMovement": {
            "type": "number"
          },
          "closingBalance": {
            "type": "number"
          }
        }
      },
      "GeneralLedgerResponseDto": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GlEntryResponseDto"
            }
          },
          "page": {
            "type": "number"
          },
          "limit": {
            "type": "number"
          },
          "total": {
            "type": "number"
          },
          "accountSummary": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/GlAccountSummaryDto"
              }
            ]
          }
        }
      },
      "SettingsResponseDto": {
        "type": "object",
        "properties": {
          "settingsId": {
            "type": "string"
          },
          "accountMetadataSchema": {
            "nullable": true,
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "fiscalYearStartMonth": {
            "type": "number"
          },
          "bankMatchDateToleranceDays": {
            "type": "number"
          },
          "defaultArAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultApAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultRevenueAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultCogsAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultSalesTaxAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultPurchaseTaxAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultExpenseAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultInventoryAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultGrniAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultShrinkageAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultPpvAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultFeeRevenueAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultDiscountsReceivedAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultDiscountsGivenAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultOtcCashAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultOtcCardAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultCostCenterId": {
            "type": "string",
            "nullable": true
          },
          "defaultActivityId": {
            "type": "string",
            "nullable": true
          },
          "realisedFxGainAccountId": {
            "type": "string",
            "nullable": true
          },
          "realisedFxLossAccountId": {
            "type": "string",
            "nullable": true
          },
          "unrealisedFxGainAccountId": {
            "type": "string",
            "nullable": true
          },
          "unrealisedFxLossAccountId": {
            "type": "string",
            "nullable": true
          },
          "baseCurrency": {
            "type": "string"
          },
          "supportedBatchPaymentFormats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "revenueRoutingPrecedence": {
            "type": "string"
          },
          "expenseRoutingPrecedence": {
            "type": "string"
          }
        }
      },
      "UpdateGlSettingsDto": {
        "type": "object",
        "properties": {
          "accountMetadataSchema": {
            "nullable": true,
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "fiscalYearStartMonth": {
            "type": "number"
          },
          "bankMatchDateToleranceDays": {
            "type": "number"
          },
          "defaultArAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultApAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultRevenueAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultCogsAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultSalesTaxAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultPurchaseTaxAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultExpenseAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultInventoryAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultGrniAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultShrinkageAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultPpvAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultFeeRevenueAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultDiscountsReceivedAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultDiscountsGivenAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultOtcCashAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultOtcCardAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultCostCenterId": {
            "type": "string",
            "nullable": true
          },
          "defaultActivityId": {
            "type": "string",
            "nullable": true
          },
          "realisedFxGainAccountId": {
            "type": "string",
            "nullable": true
          },
          "realisedFxLossAccountId": {
            "type": "string",
            "nullable": true
          },
          "unrealisedFxGainAccountId": {
            "type": "string",
            "nullable": true
          },
          "unrealisedFxLossAccountId": {
            "type": "string",
            "nullable": true
          },
          "baseCurrency": {
            "type": "string"
          },
          "supportedBatchPaymentFormats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "revenueRoutingPrecedence": {
            "type": "string"
          },
          "expenseRoutingPrecedence": {
            "type": "string"
          }
        }
      },
      "FxRevalCandidatesResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "revaluationDate": {
            "type": "string"
          },
          "candidates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalLineDto"
            }
          }
        },
        "required": [
          "success",
          "revaluationDate",
          "candidates"
        ]
      },
      "CommitFxRevaluationDto": {
        "type": "object",
        "properties": {
          "revaluationDate": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalLineDto"
            }
          }
        },
        "required": [
          "revaluationDate",
          "lines"
        ]
      },
      "FxRevalCommitResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "revaluationDate": {
            "type": "string"
          },
          "entriesGenerated": {
            "type": "number"
          }
        },
        "required": [
          "success",
          "revaluationDate",
          "entriesGenerated"
        ]
      },
      "SuccessMessageResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "success"
        ]
      },
      "ChartFileDto": {
        "type": "object",
        "properties": {
          "filename": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "countryCode": {
            "type": "string"
          }
        },
        "required": [
          "filename",
          "name"
        ]
      },
      "SeedRequestDto": {
        "type": "object",
        "properties": {
          "filename": {
            "type": "string",
            "description": "Predefined preset filename (e.g. au_standard.json)"
          },
          "data": {
            "type": "object",
            "description": "Direct ERPNext-compatible Chart of Accounts JSON data payload"
          }
        }
      },
      "SettingsFileDto": {
        "type": "object",
        "properties": {
          "filename": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "countryCode": {
            "type": "string"
          }
        },
        "required": [
          "filename",
          "name"
        ]
      },
      "SeedTaxRequestDto": {
        "type": "object",
        "properties": {
          "filename": {
            "type": "string"
          }
        },
        "required": [
          "filename"
        ]
      },
      "FiscalPeriodResponseDto": {
        "type": "object",
        "properties": {
          "periodId": {
            "type": "string"
          },
          "periodName": {
            "type": "string"
          },
          "fiscalYear": {
            "type": "number"
          },
          "periodNumber": {
            "type": "number"
          },
          "startDate": {
            "type": "string"
          },
          "endDate": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "soft_locked",
              "hard_closed"
            ]
          },
          "lockedBy": {
            "type": "string",
            "nullable": true
          },
          "lockedAt": {
            "type": "string",
            "nullable": true
          },
          "closedBy": {
            "type": "string",
            "nullable": true
          },
          "closedAt": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "createdOn": {
            "type": "string",
            "nullable": true
          },
          "modifiedOn": {
            "type": "string",
            "nullable": true
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "periodId",
          "periodName",
          "fiscalYear",
          "periodNumber",
          "startDate",
          "endDate",
          "status"
        ]
      },
      "GenerateFiscalPeriodsDto": {
        "type": "object",
        "properties": {
          "fiscalYear": {
            "type": "number",
            "description": "Fiscal year e.g. 2026",
            "example": 2026
          }
        },
        "required": [
          "fiscalYear"
        ]
      },
      "UpdateFiscalPeriodStatusDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "open",
              "soft_locked",
              "hard_closed"
            ]
          },
          "notes": {
            "type": "string"
          }
        },
        "required": [
          "status"
        ]
      },
      "TrialBalanceZeroSumDto": {
        "type": "object",
        "properties": {
          "totalDebit": {
            "type": "number"
          },
          "totalCredit": {
            "type": "number"
          },
          "netDifference": {
            "type": "number"
          },
          "isBalanced": {
            "type": "boolean"
          }
        },
        "required": [
          "totalDebit",
          "totalCredit",
          "netDifference",
          "isBalanced"
        ]
      },
      "SubledgerParityItemDto": {
        "type": "object",
        "properties": {
          "controlAccountCode": {
            "type": "string"
          },
          "controlAccountName": {
            "type": "string"
          },
          "subledgerBalance": {
            "type": "number"
          },
          "glBalance": {
            "type": "number"
          },
          "drift": {
            "type": "number"
          },
          "isMatched": {
            "type": "boolean"
          }
        },
        "required": [
          "controlAccountCode",
          "controlAccountName",
          "subledgerBalance",
          "glBalance",
          "drift",
          "isMatched"
        ]
      },
      "SubledgerReconciliationResponseDto": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "string"
          },
          "isOverallBalanced": {
            "type": "boolean"
          },
          "trialBalanceZeroSum": {
            "$ref": "#/components/schemas/TrialBalanceZeroSumDto"
          },
          "accountsReceivable": {
            "$ref": "#/components/schemas/SubledgerParityItemDto"
          },
          "accountsPayable": {
            "$ref": "#/components/schemas/SubledgerParityItemDto"
          },
          "goodsReceivedNotInvoiced": {
            "$ref": "#/components/schemas/SubledgerParityItemDto"
          },
          "perpetualInventory": {
            "$ref": "#/components/schemas/SubledgerParityItemDto"
          }
        },
        "required": [
          "timestamp",
          "isOverallBalanced",
          "trialBalanceZeroSum",
          "accountsReceivable",
          "accountsPayable",
          "goodsReceivedNotInvoiced",
          "perpetualInventory"
        ]
      },
      "AnomalyDetailDto": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "invoiceNumber": {
            "type": "string"
          },
          "invoiceId": {
            "type": "string"
          },
          "journalEntryId": {
            "type": "string"
          },
          "entryNumber": {
            "type": "string"
          },
          "details": {
            "type": "object"
          }
        },
        "required": [
          "type"
        ]
      },
      "LedgerIntegrityAuditResponseDto": {
        "type": "object",
        "properties": {
          "hasAudit": {
            "type": "boolean"
          },
          "eventId": {
            "type": "string",
            "nullable": true
          },
          "entityDisplayName": {
            "type": "string",
            "nullable": true
          },
          "createdOn": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "anomaliesCount": {
            "type": "number"
          },
          "anomalies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnomalyDetailDto"
            }
          },
          "auditedAt": {
            "type": "string",
            "nullable": true
          },
          "verifiedInvoicesCount": {
            "type": "number"
          },
          "verifiedJournalsCount": {
            "type": "number"
          }
        },
        "required": [
          "hasAudit",
          "anomaliesCount",
          "anomalies"
        ]
      },
      "RunIntegrityAuditDto": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "description": "Optional trigger reason or actor note"
          }
        }
      },
      "CreateReconciliationDto": {
        "type": "object",
        "properties": {
          "glAccountId": {
            "type": "string"
          },
          "statementDate": {
            "type": "string"
          },
          "statementBalance": {
            "type": "number"
          },
          "createdBy": {
            "type": "string"
          }
        },
        "required": [
          "glAccountId",
          "statementDate",
          "statementBalance"
        ]
      },
      "CreateReconciliationResponseDto": {
        "type": "object",
        "properties": {
          "reconciliationId": {
            "type": "string"
          }
        },
        "required": [
          "reconciliationId"
        ]
      },
      "ReconciliationDetailResponseDto": {
        "type": "object",
        "properties": {
          "reconciliationId": {
            "type": "string"
          },
          "glAccountId": {
            "type": "string"
          },
          "accountName": {
            "type": "string"
          },
          "statementDate": {
            "type": "string"
          },
          "statementBalance": {
            "type": "number"
          },
          "status": {
            "type": "string"
          },
          "openingBalance": {
            "type": "number"
          },
          "clearedBalance": {
            "type": "number"
          },
          "variance": {
            "type": "number"
          }
        },
        "required": [
          "reconciliationId",
          "glAccountId",
          "accountName",
          "statementDate",
          "statementBalance",
          "status",
          "openingBalance",
          "clearedBalance",
          "variance"
        ]
      },
      "ToggleLineDto": {
        "type": "object",
        "properties": {
          "isCleared": {
            "type": "boolean"
          },
          "amount": {
            "type": "number"
          }
        },
        "required": [
          "isCleared"
        ]
      },
      "ToggleLineResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ]
      },
      "PostReconciliationResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ]
      },
      "DiscardReconciliationResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ]
      },
      "CreateAdjustmentDto": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "type": {
            "type": "object"
          },
          "offsetAccountId": {
            "type": "string"
          },
          "memo": {
            "type": "string"
          }
        },
        "required": [
          "date",
          "amount",
          "type",
          "offsetAccountId",
          "memo"
        ]
      },
      "CreateAdjustmentResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "journalEntryId": {
            "type": "string"
          },
          "journalLineId": {
            "type": "string"
          }
        },
        "required": [
          "success",
          "journalEntryId"
        ]
      },
      "FileUploadDto": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "description": "The CSV file to upload"
          }
        }
      },
      "ParseCsvResponseDto": {
        "type": "object",
        "properties": {
          "headers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sampleRows": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "headers",
          "sampleRows"
        ]
      },
      "ImportCsvDto": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "description": "The CSV file to import"
          },
          "glAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "profileId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "glAccountId",
          "profileId"
        ]
      },
      "ImportCsvResponseDto": {
        "type": "object",
        "properties": {
          "autoMatchedCount": {
            "type": "number"
          },
          "smartMatchedCount": {
            "type": "number"
          },
          "unmatchedCount": {
            "type": "number"
          }
        },
        "required": [
          "autoMatchedCount",
          "smartMatchedCount",
          "unmatchedCount"
        ]
      },
      "MappingProfileResponseDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "dateColumn": {
            "type": "string"
          },
          "amountColumn": {
            "type": "string"
          },
          "debitColumn": {
            "type": "string"
          },
          "creditColumn": {
            "type": "string"
          },
          "descriptionColumn": {
            "type": "string"
          },
          "typeColumn": {
            "type": "string"
          },
          "payeeColumn": {
            "type": "string"
          },
          "referenceColumn": {
            "type": "string"
          },
          "headerRows": {
            "type": "number"
          },
          "profileId": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "dateColumn",
          "descriptionColumn",
          "headerRows",
          "profileId"
        ]
      },
      "CreateMappingProfileDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "dateColumn": {
            "type": "string"
          },
          "amountColumn": {
            "type": "string"
          },
          "debitColumn": {
            "type": "string"
          },
          "creditColumn": {
            "type": "string"
          },
          "descriptionColumn": {
            "type": "string"
          },
          "typeColumn": {
            "type": "string"
          },
          "payeeColumn": {
            "type": "string"
          },
          "referenceColumn": {
            "type": "string"
          },
          "headerRows": {
            "type": "number"
          }
        },
        "required": [
          "name",
          "dateColumn",
          "descriptionColumn",
          "headerRows"
        ]
      },
      "UpdateMappingProfileDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "dateColumn": {
            "type": "string"
          },
          "amountColumn": {
            "type": "string"
          },
          "debitColumn": {
            "type": "string"
          },
          "creditColumn": {
            "type": "string"
          },
          "descriptionColumn": {
            "type": "string"
          },
          "typeColumn": {
            "type": "string"
          },
          "payeeColumn": {
            "type": "string"
          },
          "referenceColumn": {
            "type": "string"
          },
          "headerRows": {
            "type": "number"
          }
        }
      },
      "ReconciliationRuleResponseDto": {
        "type": "object",
        "properties": {
          "glAccountIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "conditionType": {
            "type": "string"
          },
          "conditionValue": {
            "type": "string"
          },
          "typeCondition": {
            "type": "string"
          },
          "payeeConditionType": {
            "type": "string"
          },
          "payeeConditionValue": {
            "type": "string"
          },
          "ruleId": {
            "type": "string"
          },
          "amountMin": {
            "type": "number"
          },
          "amountMax": {
            "type": "number"
          },
          "targetGlAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "costCenterId": {
            "type": "string",
            "format": "uuid"
          },
          "activityId": {
            "type": "string",
            "format": "uuid"
          },
          "partyType": {
            "type": "string"
          },
          "partyId": {
            "type": "string"
          },
          "memo": {
            "type": "string"
          },
          "priority": {
            "type": "number"
          }
        },
        "required": [
          "ruleId",
          "targetGlAccountId"
        ]
      },
      "CreateReconciliationRuleDto": {
        "type": "object",
        "properties": {
          "glAccountIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "conditionType": {
            "type": "string"
          },
          "conditionValue": {
            "type": "string"
          },
          "typeCondition": {
            "type": "string"
          },
          "payeeConditionType": {
            "type": "string"
          },
          "payeeConditionValue": {
            "type": "string"
          },
          "amountMin": {
            "type": "number"
          },
          "amountMax": {
            "type": "number"
          },
          "targetGlAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "costCenterId": {
            "type": "string",
            "format": "uuid"
          },
          "activityId": {
            "type": "string",
            "format": "uuid"
          },
          "partyType": {
            "type": "string"
          },
          "partyId": {
            "type": "string"
          },
          "memo": {
            "type": "string"
          },
          "priority": {
            "type": "number"
          }
        },
        "required": [
          "targetGlAccountId"
        ]
      },
      "UpdateReconciliationRuleDto": {
        "type": "object",
        "properties": {
          "glAccountIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "conditionType": {
            "type": "string"
          },
          "conditionValue": {
            "type": "string"
          },
          "typeCondition": {
            "type": "string"
          },
          "payeeConditionType": {
            "type": "string"
          },
          "payeeConditionValue": {
            "type": "string"
          },
          "amountMin": {
            "type": "number"
          },
          "amountMax": {
            "type": "number"
          },
          "targetGlAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "costCenterId": {
            "type": "string",
            "format": "uuid"
          },
          "activityId": {
            "type": "string",
            "format": "uuid"
          },
          "partyType": {
            "type": "string"
          },
          "partyId": {
            "type": "string"
          },
          "memo": {
            "type": "string"
          },
          "priority": {
            "type": "number"
          }
        }
      },
      "MatchedJournalLineDto": {
        "type": "object",
        "properties": {
          "debit": {
            "type": "number"
          },
          "credit": {
            "type": "number"
          },
          "memo": {
            "type": "string",
            "nullable": true
          },
          "entryDate": {
            "type": "string",
            "format": "date"
          },
          "isReconciled": {
            "type": "boolean"
          }
        },
        "required": [
          "debit",
          "credit",
          "entryDate",
          "isReconciled"
        ]
      },
      "BankStatementLineDto": {
        "type": "object",
        "properties": {
          "lineId": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "reference": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "payee": {
            "type": "string",
            "nullable": true
          },
          "isReconciled": {
            "type": "boolean"
          },
          "matchedJournalLineId": {
            "type": "string",
            "nullable": true
          },
          "matchedJournalLine": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/MatchedJournalLineDto"
              }
            ]
          },
          "matchGroupId": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "lineId",
          "date",
          "description",
          "amount",
          "isReconciled"
        ]
      },
      "BankStatementConfirmMatchDto": {
        "type": "object",
        "properties": {
          "reconciliationId": {
            "type": "string",
            "description": "Optional reconciliation ID to link the matched ledger line to"
          }
        }
      },
      "MatchConfirmedResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the match was successful"
          }
        },
        "required": [
          "success"
        ]
      },
      "BankStatementManualMatchDto": {
        "type": "object",
        "properties": {
          "journalLineId": {
            "type": "string",
            "description": "The journal line ID to link against"
          },
          "reconciliationId": {
            "type": "string",
            "description": "Optional reconciliation ID to link the matched ledger line to"
          }
        },
        "required": [
          "journalLineId"
        ]
      },
      "CreateBankStatementLineDto": {
        "type": "object",
        "properties": {
          "glAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "description": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "reference": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "payee": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "glAccountId",
          "date",
          "description",
          "amount"
        ]
      },
      "BankStatementBulkMatchDto": {
        "type": "object",
        "properties": {
          "bankLineIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "journalLineIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reconciliationId": {
            "type": "string",
            "description": "Reconciliation ID to link the lines to"
          }
        },
        "required": [
          "bankLineIds",
          "journalLineIds",
          "reconciliationId"
        ]
      },
      "AutoMatchRequestDto": {
        "type": "object",
        "properties": {
          "glAccountId": {
            "type": "string"
          },
          "reconciliationId": {
            "type": "string"
          },
          "dryRun": {
            "type": "boolean"
          },
          "ignoredStatementLineIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "glAccountId"
        ]
      },
      "AutoMatchSmartMatchDto": {
        "type": "object",
        "properties": {
          "bankLineIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "journalLineIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "confidence": {
            "type": "string",
            "enum": [
              "high",
              "medium"
            ]
          },
          "date": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          }
        },
        "required": [
          "bankLineIds",
          "journalLineIds",
          "confidence",
          "date",
          "description",
          "amount"
        ]
      },
      "AutoMatchProposedRuleMatchDto": {
        "type": "object",
        "properties": {
          "bankLineId": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "ruleId": {
            "type": "string"
          },
          "targetGlAccountId": {
            "type": "string"
          }
        },
        "required": [
          "bankLineId",
          "date",
          "description",
          "amount",
          "ruleId",
          "targetGlAccountId"
        ]
      },
      "AutoMatchResponseDto": {
        "type": "object",
        "properties": {
          "autoMatchedCount": {
            "type": "number"
          },
          "smartMatchedCount": {
            "type": "number"
          },
          "unmatchedCount": {
            "type": "number"
          },
          "smartMatches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AutoMatchSmartMatchDto"
            }
          },
          "proposedRuleMatches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AutoMatchProposedRuleMatchDto"
            }
          }
        },
        "required": [
          "autoMatchedCount",
          "smartMatchedCount",
          "unmatchedCount",
          "smartMatches"
        ]
      },
      "UnmatchRequestDto": {
        "type": "object",
        "properties": {
          "matchGroupId": {
            "type": "string"
          }
        },
        "required": [
          "matchGroupId"
        ]
      },
      "BankStatementSuccessResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ]
      },
      "BankStatementMatchGroupResponseDto": {
        "type": "object",
        "properties": {
          "matchGroupId": {
            "type": "string"
          },
          "matchType": {
            "type": "string"
          },
          "ruleName": {
            "type": "string",
            "nullable": true
          },
          "createdBy": {
            "type": "string"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "bankLines": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "ledgerLines": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "matchGroupId",
          "matchType",
          "createdBy",
          "createdOn"
        ]
      },
      "BusinessReportResponseDto": {
        "type": "object",
        "properties": {
          "reportId": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "dataSourceHook": {
            "type": "string"
          },
          "uiConfig": {
            "type": "object"
          },
          "isSystem": {
            "type": "boolean"
          }
        },
        "required": [
          "reportId",
          "slug",
          "name",
          "dataSourceHook",
          "isSystem"
        ]
      },
      "RunBusinessReportDto": {
        "type": "object",
        "properties": {
          "filters": {
            "type": "object",
            "description": "Filter configuration object"
          }
        }
      },
      "CreateBusinessReportDto": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The unique slug of the report configuration"
          },
          "name": {
            "type": "string",
            "description": "The name of the report"
          },
          "description": {
            "type": "string",
            "description": "Description of the report"
          },
          "dataSourceHook": {
            "type": "string",
            "description": "The data source hook"
          },
          "uiConfig": {
            "type": "object",
            "description": "UI configuration as JSON object"
          }
        },
        "required": [
          "slug",
          "name",
          "dataSourceHook"
        ]
      },
      "UpdateBusinessReportDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the report"
          },
          "description": {
            "type": "string",
            "description": "Description of the report"
          },
          "dataSourceHook": {
            "type": "string",
            "description": "The data source hook"
          },
          "uiConfig": {
            "type": "object",
            "description": "UI configuration as JSON object"
          }
        }
      },
      "DeleteReportResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ]
      },
      "PickingQueueOrderDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "orderNumber": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "customerName": {
            "type": "string"
          },
          "customerOrderNumber": {
            "type": "string",
            "nullable": true
          },
          "stateCode": {
            "type": "string"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "currencyCode": {
            "type": "string",
            "nullable": true
          },
          "isCreditBlocked": {
            "type": "boolean"
          },
          "type": {
            "type": "string"
          },
          "pickabilityStatus": {
            "type": "string"
          },
          "hasAllocation": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "orderNumber",
          "customerName",
          "stateCode",
          "createdOn",
          "createdBy",
          "isCreditBlocked",
          "pickabilityStatus",
          "hasAllocation"
        ]
      },
      "PickingQueueMetaDto": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number"
          },
          "page": {
            "type": "number"
          },
          "limit": {
            "type": "number"
          },
          "totalPages": {
            "type": "number"
          },
          "readyCount": {
            "type": "number"
          },
          "partialCount": {
            "type": "number"
          },
          "blockedCount": {
            "type": "number"
          }
        },
        "required": [
          "total",
          "page",
          "limit",
          "totalPages",
          "readyCount",
          "partialCount",
          "blockedCount"
        ]
      },
      "PickingQueueResponseDto": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PickingQueueOrderDto"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/PickingQueueMetaDto"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "PickingSummaryAvailableBinDto": {
        "type": "object",
        "properties": {
          "binId": {
            "type": "string"
          },
          "binName": {
            "type": "string"
          },
          "onHand": {
            "type": "string"
          }
        },
        "required": [
          "binId",
          "binName",
          "onHand"
        ]
      },
      "PickingSummaryLineDto": {
        "type": "object",
        "properties": {
          "salesOrderLineId": {
            "type": "string"
          },
          "lineNumber": {
            "type": "number"
          },
          "productId": {
            "type": "string"
          },
          "productNumber": {
            "type": "string"
          },
          "productType": {
            "type": "string"
          },
          "productDescription": {
            "type": "string"
          },
          "locationName": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "quantityPicked": {
            "type": "string"
          },
          "quantityShipped": {
            "type": "string"
          },
          "remaining": {
            "type": "string"
          },
          "isFullyPicked": {
            "type": "boolean"
          },
          "isPhysical": {
            "type": "boolean"
          },
          "onHand": {
            "type": "string"
          },
          "availableBins": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PickingSummaryAvailableBinDto"
            }
          },
          "hasAllocation": {
            "type": "boolean"
          }
        },
        "required": [
          "salesOrderLineId",
          "lineNumber",
          "productId",
          "productNumber",
          "productDescription",
          "locationName",
          "quantity",
          "quantityPicked",
          "quantityShipped",
          "remaining",
          "isFullyPicked",
          "isPhysical",
          "onHand",
          "availableBins",
          "hasAllocation"
        ]
      },
      "PickingSummaryPickDto": {
        "type": "object",
        "properties": {
          "pickId": {
            "type": "string"
          },
          "salesOrderId": {
            "type": "string"
          },
          "salesOrderLineId": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "binId": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "string"
          },
          "stateCode": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string"
          },
          "modifiedOn": {
            "format": "date-time",
            "type": "string"
          },
          "binName": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "pickId",
          "salesOrderId",
          "salesOrderLineId",
          "productId",
          "quantity",
          "stateCode",
          "createdBy",
          "createdOn",
          "modifiedOn"
        ]
      },
      "PickingSummaryDto": {
        "type": "object",
        "properties": {
          "isCreditBlocked": {
            "type": "boolean"
          },
          "totalLines": {
            "type": "number"
          },
          "fullyPickedLines": {
            "type": "number"
          },
          "isFullyPicked": {
            "type": "boolean"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PickingSummaryLineDto"
            }
          },
          "picks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PickingSummaryPickDto"
            }
          }
        },
        "required": [
          "totalLines",
          "fullyPickedLines",
          "isFullyPicked",
          "lines",
          "picks"
        ]
      },
      "PickingBarcodeDto": {
        "type": "object",
        "properties": {
          "salesOrderId": {
            "type": "string"
          },
          "salesOrderLineId": {
            "type": "string"
          },
          "lineNumber": {
            "type": "number"
          },
          "productId": {
            "type": "string"
          },
          "productNumber": {
            "type": "string"
          },
          "productDescription": {
            "type": "string"
          },
          "binId": {
            "type": "string"
          },
          "binName": {
            "type": "string"
          },
          "quantityToPick": {
            "type": "string"
          },
          "barcodePayload": {
            "type": "string"
          }
        },
        "required": [
          "salesOrderId",
          "salesOrderLineId",
          "lineNumber",
          "productId",
          "productNumber",
          "productDescription",
          "binId",
          "binName",
          "quantityToPick",
          "barcodePayload"
        ]
      },
      "PickOrderLineDto": {
        "type": "object",
        "properties": {
          "binId": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "type": "string"
          }
        },
        "required": [
          "binId",
          "quantity"
        ]
      },
      "ShippingQueueOrderDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "orderNumber": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "customerName": {
            "type": "string"
          },
          "customerOrderNumber": {
            "type": "string",
            "nullable": true
          },
          "stateCode": {
            "type": "string"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "currencyCode": {
            "type": "string",
            "nullable": true
          },
          "isCreditBlocked": {
            "type": "boolean"
          },
          "shippabilityStatus": {
            "type": "string"
          },
          "totalShippableLines": {
            "type": "number"
          },
          "totalLines": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "orderNumber",
          "customerName",
          "stateCode",
          "createdOn",
          "createdBy",
          "isCreditBlocked",
          "shippabilityStatus",
          "totalShippableLines",
          "totalLines"
        ]
      },
      "ShippingContextLineDto": {
        "type": "object",
        "properties": {
          "salesOrderLineId": {
            "type": "string"
          },
          "lineNumber": {
            "type": "number"
          },
          "productId": {
            "type": "string"
          },
          "productNumber": {
            "type": "string"
          },
          "productDescription": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "quantityPicked": {
            "type": "string"
          },
          "quantityShipped": {
            "type": "string"
          },
          "isPhysical": {
            "type": "boolean"
          },
          "availableToShip": {
            "type": "string"
          }
        },
        "required": [
          "salesOrderLineId",
          "lineNumber",
          "productId",
          "productNumber",
          "productDescription",
          "quantity",
          "quantityPicked",
          "quantityShipped",
          "isPhysical",
          "availableToShip"
        ]
      },
      "ShipmentLineResponseDto": {
        "type": "object",
        "properties": {
          "shipmentLineId": {
            "type": "string"
          },
          "shipmentId": {
            "type": "string"
          },
          "orderLineId": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          }
        },
        "required": [
          "shipmentLineId",
          "shipmentId",
          "orderLineId",
          "productId",
          "quantity"
        ]
      },
      "ShipmentResponseDto": {
        "type": "object",
        "properties": {
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShipmentLineResponseDto"
            }
          },
          "shipmentId": {
            "type": "string"
          },
          "shipmentNumber": {
            "type": "string"
          },
          "orderId": {
            "type": "string"
          },
          "stateCode": {
            "type": "string"
          },
          "trackingNumber": {
            "type": "string"
          },
          "carrierId": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string"
          },
          "deliveryName": {
            "type": "string"
          },
          "deliveryPhone": {
            "type": "string"
          },
          "deliveryAddressLine1": {
            "type": "string"
          },
          "deliveryAddressLine2": {
            "type": "string"
          },
          "deliveryCity": {
            "type": "string"
          },
          "deliveryState": {
            "type": "string"
          },
          "deliveryPostalCode": {
            "type": "string"
          },
          "deliveryCountry": {
            "type": "string"
          },
          "shippingNotes": {
            "type": "string"
          }
        },
        "required": [
          "shipmentId",
          "shipmentNumber",
          "orderId",
          "stateCode"
        ]
      },
      "ShippingContextDto": {
        "type": "object",
        "properties": {
          "isCreditBlocked": {
            "type": "boolean"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShippingContextLineDto"
            }
          },
          "shipments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShipmentResponseDto"
            }
          }
        },
        "required": [
          "lines",
          "shipments"
        ]
      },
      "OrderResponseDto": {
        "type": "object",
        "properties": {
          "salesOrderId": {
            "type": "string"
          },
          "orderNumber": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "customerId": {
            "type": "string"
          },
          "customerOrderNumber": {
            "type": "string",
            "nullable": true
          },
          "fulfillmentLocationId": {
            "type": "string"
          },
          "stateCode": {
            "type": "string"
          },
          "currencyCode": {
            "type": "string"
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "customFields": {
            "type": "object",
            "nullable": true
          },
          "discrepanciesAcknowledged": {
            "type": "boolean"
          },
          "taxProvider": {
            "type": "string",
            "nullable": true
          },
          "sourceId": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string"
          },
          "isCreditBlocked": {
            "type": "boolean"
          },
          "creditHoldOverrideAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          },
          "createdOn": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "modifiedOn": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "productQuantity": {
            "type": "number"
          },
          "productQuantityShipped": {
            "type": "number"
          }
        },
        "required": [
          "salesOrderId",
          "orderNumber",
          "customerId",
          "fulfillmentLocationId",
          "stateCode",
          "currencyCode",
          "discrepanciesAcknowledged",
          "source"
        ]
      },
      "CreateOrderLineDtoLineType": {
        "type": "string",
        "enum": [
          "Product",
          "Comment"
        ]
      },
      "CreateOrderLineDto": {
        "type": "object",
        "properties": {
          "lineType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateOrderLineDtoLineType"
              }
            ]
          },
          "productId": {
            "type": "string"
          },
          "productDescription": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "pricePerUnit": {
            "type": "string"
          },
          "unitCost": {
            "type": "string"
          },
          "discountPercentage": {
            "type": "string"
          },
          "taxCategoryId": {
            "type": "string"
          },
          "tax": {
            "type": "string"
          },
          "unitOfMeasure": {
            "type": "string"
          },
          "fulfillmentLocationId": {
            "type": "string"
          }
        },
        "required": [
          "quantity",
          "pricePerUnit"
        ]
      },
      "OrderCustomFieldsDto": {
        "type": "object",
        "properties": {
          "analysisCode": {
            "type": "string"
          },
          "dispatchContactId": {
            "type": "string"
          }
        }
      },
      "CreateOrderDto": {
        "type": "object",
        "properties": {
          "salesOrderId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "customerOrderNumber": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "fulfillmentLocationId": {
            "type": "string"
          },
          "shippingNotes": {
            "type": "string"
          },
          "deliveryCompanyName": {
            "type": "string"
          },
          "deliveryName": {
            "type": "string"
          },
          "deliveryPhone": {
            "type": "string"
          },
          "deliveryAddressLine1": {
            "type": "string"
          },
          "deliveryAddressLine2": {
            "type": "string"
          },
          "deliveryCity": {
            "type": "string"
          },
          "deliveryState": {
            "type": "string"
          },
          "deliveryPostalCode": {
            "type": "string"
          },
          "deliveryCountry": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateOrderLineDto"
            }
          },
          "customFields": {
            "$ref": "#/components/schemas/OrderCustomFieldsDto"
          }
        },
        "required": [
          "salesOrderId",
          "customerId",
          "lines"
        ]
      },
      "ChangeOrderStateDto": {
        "type": "object",
        "properties": {
          "discrepanciesAcknowledged": {
            "type": "boolean"
          },
          "stateCode": {
            "type": "string"
          },
          "generateBackorders": {
            "type": "boolean"
          }
        },
        "required": [
          "stateCode"
        ]
      },
      "FulfillCounterLineDto": {
        "type": "object",
        "properties": {
          "salesOrderLineId": {
            "type": "string",
            "format": "uuid",
            "description": "Sales order line ID to fulfill"
          },
          "quantityToFulfill": {
            "type": "string",
            "description": "Quantity to fulfill over the counter"
          },
          "binId": {
            "type": "string",
            "format": "uuid",
            "description": "Optional specific bin ID to issue stock from"
          }
        },
        "required": [
          "salesOrderLineId",
          "quantityToFulfill"
        ]
      },
      "FulfillCounterOrderDto": {
        "type": "object",
        "properties": {
          "lines": {
            "description": "Specific lines and quantities to fulfill. If omitted, fulfills all unfulfilled lines up to available stock.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FulfillCounterLineDto"
            }
          },
          "allowPartialFulfillment": {
            "type": "boolean",
            "description": "Allow partial fulfillment if stock on hand is less than requested quantity"
          },
          "notes": {
            "type": "string",
            "description": "Optional fulfillment or handover notes"
          }
        }
      },
      "CounterFulfilledLineDto": {
        "type": "object",
        "properties": {
          "salesOrderLineId": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "quantityFulfilled": {
            "type": "string"
          },
          "binId": {
            "type": "string"
          },
          "binNumber": {
            "type": "string"
          }
        },
        "required": [
          "salesOrderLineId",
          "quantityFulfilled"
        ]
      },
      "CounterFulfillmentResponseDto": {
        "type": "object",
        "properties": {
          "salesOrderId": {
            "type": "string"
          },
          "orderNumber": {
            "type": "string"
          },
          "stateCode": {
            "type": "string"
          },
          "fulfilledLines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CounterFulfilledLineDto"
            }
          },
          "cogsAmount": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "salesOrderId",
          "orderNumber",
          "stateCode",
          "fulfilledLines",
          "cogsAmount"
        ]
      },
      "OverrideCreditHoldDto": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "description": "Reason for overriding the credit hold"
          }
        },
        "required": [
          "reason"
        ]
      },
      "UpdateOrderLineDtoLineType": {
        "type": "string",
        "enum": [
          "Product",
          "Comment"
        ]
      },
      "UpdateOrderLineDto": {
        "type": "object",
        "properties": {
          "lineType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UpdateOrderLineDtoLineType"
              }
            ]
          },
          "orderLineId": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "type": "string"
          },
          "pricePerUnit": {
            "type": "string"
          },
          "unitCost": {
            "type": "string"
          },
          "discountPercentage": {
            "type": "string"
          },
          "taxCategoryId": {
            "type": "string"
          },
          "tax": {
            "type": "string"
          },
          "productDescription": {
            "type": "string"
          },
          "unitOfMeasure": {
            "type": "string"
          },
          "fulfillmentLocationId": {
            "type": "string"
          }
        }
      },
      "UpdateOrderDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "customerOrderNumber": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "fulfillmentLocationId": {
            "type": "string"
          },
          "shippingNotes": {
            "type": "string"
          },
          "deliveryCompanyName": {
            "type": "string"
          },
          "deliveryName": {
            "type": "string"
          },
          "deliveryPhone": {
            "type": "string"
          },
          "deliveryAddressLine1": {
            "type": "string"
          },
          "deliveryAddressLine2": {
            "type": "string"
          },
          "deliveryCity": {
            "type": "string"
          },
          "deliveryState": {
            "type": "string"
          },
          "deliveryPostalCode": {
            "type": "string"
          },
          "deliveryCountry": {
            "type": "string"
          },
          "customFields": {
            "$ref": "#/components/schemas/OrderCustomFieldsDto"
          }
        }
      },
      "CreateReturnLineDto": {
        "type": "object",
        "properties": {
          "salesOrderLineId": {
            "type": "string"
          },
          "quantityReturned": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "resolution": {
            "type": "string",
            "enum": [
              "refund",
              "replace"
            ]
          },
          "returnFee": {
            "type": "string"
          }
        },
        "required": [
          "salesOrderLineId",
          "quantityReturned"
        ]
      },
      "CreateReturnDto": {
        "type": "object",
        "properties": {
          "notes": {
            "type": "string"
          },
          "locationId": {
            "type": "string",
            "format": "uuid"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateReturnLineDto"
            }
          }
        },
        "required": [
          "lines"
        ]
      },
      "ReturnLineResponseDto": {
        "type": "object",
        "properties": {
          "lineId": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "quantityReturned": {
            "type": "string"
          },
          "pricePerUnit": {
            "type": "string"
          },
          "discountPercentage": {
            "type": "string"
          },
          "taxRate": {
            "type": "string"
          },
          "returnFee": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "resolution": {
            "type": "string"
          }
        },
        "required": [
          "lineId",
          "description",
          "quantityReturned",
          "pricePerUnit",
          "discountPercentage",
          "taxRate",
          "returnFee"
        ]
      },
      "ReturnResponseDto": {
        "type": "object",
        "properties": {
          "returnId": {
            "type": "string"
          },
          "returnNumber": {
            "type": "string"
          },
          "stateCode": {
            "type": "string"
          },
          "orderNumber": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "customerNumber": {
            "type": "string"
          },
          "customerName": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "locationName": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnLineResponseDto"
            }
          }
        },
        "required": [
          "returnId",
          "returnNumber",
          "stateCode",
          "lines"
        ]
      },
      "UpdateReturnDto": {
        "type": "object",
        "properties": {
          "notes": {
            "type": "string"
          },
          "locationId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "ChangeReturnStateDto": {
        "type": "object",
        "properties": {
          "stateCode": {
            "type": "string"
          },
          "locationId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "stateCode"
        ]
      },
      "AddReturnLineDto": {
        "type": "object",
        "properties": {
          "salesOrderLineId": {
            "type": "string"
          },
          "quantityReturned": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "returnFee": {
            "type": "string"
          },
          "resolution": {
            "type": "string",
            "enum": [
              "refund",
              "replace"
            ]
          }
        },
        "required": [
          "salesOrderLineId",
          "quantityReturned"
        ]
      },
      "UpdateReturnLineDto": {
        "type": "object",
        "properties": {
          "quantityReturned": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "returnFee": {
            "type": "string"
          },
          "resolution": {
            "type": "string",
            "enum": [
              "refund",
              "replace"
            ]
          }
        }
      },
      "ReceiveReturnLineDto": {
        "type": "object",
        "properties": {
          "returnLineId": {
            "type": "string"
          },
          "quantityReceived": {
            "type": "string"
          }
        },
        "required": [
          "returnLineId",
          "quantityReceived"
        ]
      },
      "ReceiveReturnDto": {
        "type": "object",
        "properties": {
          "locationId": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReceiveReturnLineDto"
            }
          }
        },
        "required": [
          "locationId",
          "lines"
        ]
      },
      "CreateShipmentLineDto": {
        "type": "object",
        "properties": {
          "salesOrderLineId": {
            "type": "string"
          },
          "quantityShipped": {
            "type": "string"
          }
        },
        "required": [
          "salesOrderLineId",
          "quantityShipped"
        ]
      },
      "CreateShipmentDto": {
        "type": "object",
        "properties": {
          "notes": {
            "type": "string"
          },
          "deliveryCompanyName": {
            "type": "string"
          },
          "trackingNumber": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateShipmentLineDto"
            }
          }
        },
        "required": [
          "lines"
        ]
      },
      "UpdateShipmentDto": {
        "type": "object",
        "properties": {
          "notes": {
            "type": "string"
          },
          "deliveryCompanyName": {
            "type": "string"
          },
          "trackingNumber": {
            "type": "string"
          }
        }
      },
      "ChangeShipmentStateDto": {
        "type": "object",
        "properties": {
          "stateCode": {
            "type": "string"
          }
        },
        "required": [
          "stateCode"
        ]
      },
      "AddShipmentLineDto": {
        "type": "object",
        "properties": {
          "salesOrderLineId": {
            "type": "string"
          },
          "quantityShipped": {
            "type": "string"
          }
        },
        "required": [
          "salesOrderLineId",
          "quantityShipped"
        ]
      },
      "UpdateShipmentLineDto": {
        "type": "object",
        "properties": {
          "quantityShipped": {
            "type": "string"
          }
        }
      },
      "GlobalReturnListResponseDto": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnResponseDto"
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "total": {
                "type": "number"
              }
            }
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "OpenDemandLocationAvailabilityDto": {
        "type": "object",
        "properties": {
          "locationId": {
            "type": "string"
          },
          "locationName": {
            "type": "string"
          },
          "availableQty": {
            "type": "number"
          }
        },
        "required": [
          "locationId",
          "locationName",
          "availableQty"
        ]
      },
      "OpenDemandDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "salesOrderId": {
            "type": "string",
            "nullable": true
          },
          "demandWorkOrderId": {
            "type": "string",
            "nullable": true
          },
          "workOrderComponentId": {
            "type": "string",
            "nullable": true
          },
          "demandType": {
            "type": "string",
            "nullable": true
          },
          "orderNumber": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "productName": {
            "type": "string"
          },
          "productDescription": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "number"
          },
          "createdOn": {
            "type": "string"
          },
          "vendorId": {
            "type": "string",
            "nullable": true
          },
          "vendorName": {
            "type": "string",
            "nullable": true
          },
          "costPrice": {
            "type": "number",
            "nullable": true
          },
          "currencyCode": {
            "type": "string",
            "nullable": true
          },
          "locationId": {
            "type": "string",
            "nullable": true
          },
          "locationName": {
            "type": "string",
            "nullable": true
          },
          "purchaseOrderId": {
            "type": "string",
            "nullable": true
          },
          "purchaseOrderNumber": {
            "type": "string",
            "nullable": true
          },
          "purchaseOrderState": {
            "type": "string",
            "nullable": true
          },
          "transferOrderId": {
            "type": "string",
            "nullable": true
          },
          "transferOrderNumber": {
            "type": "string",
            "nullable": true
          },
          "transferOrderState": {
            "type": "string",
            "nullable": true
          },
          "availableElsewhere": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OpenDemandLocationAvailabilityDto"
            }
          }
        },
        "required": [
          "id",
          "orderNumber",
          "productId",
          "productName",
          "quantity",
          "createdOn",
          "availableElsewhere"
        ]
      },
      "PoAllocationDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "salesOrderId": {
            "type": "string",
            "nullable": true
          },
          "demandWorkOrderId": {
            "type": "string",
            "nullable": true
          },
          "workOrderComponentId": {
            "type": "string",
            "nullable": true
          },
          "demandType": {
            "type": "string",
            "nullable": true
          },
          "orderNumber": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "productName": {
            "type": "string"
          },
          "quantity": {
            "type": "number"
          },
          "createdOn": {
            "type": "string"
          },
          "purchaseOrderLineId": {
            "type": "string",
            "nullable": true
          },
          "stateCode": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "orderNumber",
          "productId",
          "productName",
          "quantity",
          "createdOn",
          "stateCode"
        ]
      },
      "AvailablePoLineDto": {
        "type": "object",
        "properties": {
          "purchaseOrderId": {
            "type": "string"
          },
          "purchaseOrderLineId": {
            "type": "string"
          },
          "orderNumber": {
            "type": "string"
          },
          "stateCode": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "vendorId": {
            "type": "string"
          },
          "vendorName": {
            "type": "string"
          },
          "deliveryLocationId": {
            "type": "string"
          },
          "locationName": {
            "type": "string"
          },
          "availableQty": {
            "type": "number"
          }
        },
        "required": [
          "purchaseOrderId",
          "purchaseOrderLineId",
          "orderNumber",
          "stateCode",
          "quantity",
          "vendorId",
          "vendorName",
          "deliveryLocationId",
          "locationName",
          "availableQty"
        ]
      },
      "LinkDemandToPoDto": {
        "type": "object",
        "properties": {
          "demandId": {
            "type": "string",
            "format": "uuid"
          },
          "purchaseOrderLineId": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "type": "string"
          }
        },
        "required": [
          "demandId",
          "purchaseOrderLineId",
          "quantity"
        ]
      },
      "AllocationSuccessResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ]
      },
      "AllocationResolveResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "success"
        ]
      },
      "ReallocateDemandDto": {
        "type": "object",
        "properties": {
          "locationId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "locationId"
        ]
      },
      "GeneratePoLineDto": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "type": "string"
          },
          "pricePerUnit": {
            "type": "string"
          },
          "backorderIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "productId",
          "quantity",
          "pricePerUnit"
        ]
      },
      "GeneratePoDto": {
        "type": "object",
        "properties": {
          "vendorId": {
            "type": "string",
            "format": "uuid"
          },
          "currencyCode": {
            "type": "string"
          },
          "deliveryLocationId": {
            "type": "string",
            "format": "uuid"
          },
          "soNumbers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GeneratePoLineDto"
            }
          }
        },
        "required": [
          "vendorId",
          "lines"
        ]
      },
      "GeneratePOsDto": {
        "type": "object",
        "properties": {
          "pos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GeneratePoDto"
            }
          }
        },
        "required": [
          "pos"
        ]
      },
      "GenerateTransfersDto": {
        "type": "object",
        "properties": {
          "transfers": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "CreateTransferFromDemandsDto": {
        "type": "object",
        "properties": {
          "sourceLocationId": {
            "type": "string"
          },
          "backorderIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "sourceLocationId",
          "backorderIds"
        ]
      },
      "TransferLineResponseDto": {
        "type": "object",
        "properties": {
          "transferOrderLineId": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "productNumber": {
            "type": "string"
          },
          "productDescription": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "quantityShipped": {
            "type": "string"
          },
          "quantityReceived": {
            "type": "string"
          }
        },
        "required": [
          "transferOrderLineId",
          "productId",
          "quantity"
        ]
      },
      "TransferEventResponseDto": {
        "type": "object",
        "properties": {
          "eventId": {
            "type": "string"
          },
          "eventType": {
            "type": "string"
          },
          "payload": {
            "type": "object"
          },
          "actor": {
            "type": "string"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "eventId",
          "eventType",
          "createdOn"
        ]
      },
      "TransferResponseDto": {
        "type": "object",
        "properties": {
          "transferOrderId": {
            "type": "string"
          },
          "orderNumber": {
            "type": "string"
          },
          "stateCode": {
            "type": "string"
          },
          "sourceLocationId": {
            "type": "string"
          },
          "sourceLocationName": {
            "type": "string"
          },
          "destinationLocationId": {
            "type": "string"
          },
          "destinationLocationName": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "shippingNotes": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransferLineResponseDto"
            }
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransferEventResponseDto"
            }
          }
        },
        "required": [
          "transferOrderId",
          "orderNumber",
          "stateCode",
          "sourceLocationId",
          "destinationLocationId",
          "createdOn"
        ]
      },
      "TransferPickingSummaryResponseDto": {
        "type": "object",
        "properties": {
          "lineId": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "orderedQuantity": {
            "type": "string"
          },
          "pickedQuantity": {
            "type": "string"
          }
        },
        "required": [
          "lineId",
          "productId",
          "orderedQuantity",
          "pickedQuantity"
        ]
      },
      "PickLineDto": {
        "type": "object",
        "properties": {
          "binId": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          }
        },
        "required": [
          "binId",
          "quantity"
        ]
      },
      "ReceiveTransferLineDto": {
        "type": "object",
        "properties": {
          "transferOrderLineId": {
            "type": "string"
          },
          "quantityReceived": {
            "type": "string"
          }
        },
        "required": [
          "transferOrderLineId",
          "quantityReceived"
        ]
      },
      "ReceiveTransferDto": {
        "type": "object",
        "properties": {
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReceiveTransferLineDto"
            }
          }
        },
        "required": [
          "lines"
        ]
      },
      "CreateTransferOrderLineDto": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          }
        },
        "required": [
          "productId",
          "quantity"
        ]
      },
      "CreateTransferOrderDto": {
        "type": "object",
        "properties": {
          "sourceLocationId": {
            "type": "string"
          },
          "destinationLocationId": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "shippingNotes": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateTransferOrderLineDto"
            }
          }
        },
        "required": [
          "sourceLocationId",
          "destinationLocationId",
          "lines"
        ]
      },
      "UpdateTransferOrderDto": {
        "type": "object",
        "properties": {
          "sourceLocationId": {
            "type": "string"
          },
          "destinationLocationId": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "shippingNotes": {
            "type": "string"
          }
        }
      },
      "UpdateTransferOrderLineDto": {
        "type": "object",
        "properties": {
          "quantity": {
            "type": "string"
          }
        }
      },
      "TaxCategoryResponseDto": {
        "type": "object",
        "properties": {
          "taxCategoryId": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "rate": {
            "type": "string"
          }
        },
        "required": [
          "taxCategoryId",
          "code",
          "title",
          "type"
        ]
      },
      "CreateTaxCategoryDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "object"
          },
          "rate": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "title",
          "type"
        ]
      },
      "UpdateTaxCategoryDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "object"
          },
          "rate": {
            "type": "string"
          }
        }
      },
      "TaxPositionMappingResponseDto": {
        "type": "object",
        "properties": {
          "taxPositionId": {
            "type": "string"
          },
          "sourceTaxCategoryId": {
            "type": "string"
          },
          "destinationTaxCategoryId": {
            "type": "string"
          }
        },
        "required": [
          "taxPositionId",
          "sourceTaxCategoryId",
          "destinationTaxCategoryId"
        ]
      },
      "CreateTaxPositionMappingDto": {
        "type": "object",
        "properties": {
          "sourceTaxCategoryId": {
            "type": "string",
            "maxLength": 255
          },
          "destinationTaxCategoryId": {
            "type": "string",
            "maxLength": 255
          }
        },
        "required": [
          "sourceTaxCategoryId",
          "destinationTaxCategoryId"
        ]
      },
      "TaxPositionResponseDto": {
        "type": "object",
        "properties": {
          "taxPositionId": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "taxPositionId",
          "code",
          "title"
        ]
      },
      "CreateTaxPositionDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "maxLength": 255
          },
          "title": {
            "type": "string",
            "maxLength": 255
          }
        },
        "required": [
          "code",
          "title"
        ]
      },
      "UpdateTaxPositionDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "maxLength": 255
          },
          "title": {
            "type": "string",
            "maxLength": 255
          }
        }
      },
      "BasSummaryRowDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "description",
          "amount"
        ]
      },
      "CreateSalesInvoiceLineDto": {
        "type": "object",
        "properties": {
          "salesOrderLineId": {
            "type": "string",
            "format": "uuid"
          },
          "quantityToInvoice": {
            "type": "number"
          }
        },
        "required": [
          "salesOrderLineId",
          "quantityToInvoice"
        ]
      },
      "CreateSalesInvoiceDto": {
        "type": "object",
        "properties": {
          "notes": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateSalesInvoiceLineDto"
            }
          }
        }
      },
      "InvoiceLineResponseDto": {
        "type": "object",
        "properties": {
          "lineId": {
            "type": "string"
          },
          "invoiceId": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "quantityInvoiced": {
            "type": "string"
          },
          "pricePerUnit": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "productNumber": {
            "type": "string"
          },
          "glAccountId": {
            "type": "string"
          },
          "matchStatus": {
            "type": "string"
          },
          "purchaseOrderId": {
            "type": "string"
          },
          "purchaseOrderNumber": {
            "type": "string"
          },
          "purchaseOrderLineId": {
            "type": "string"
          }
        },
        "required": [
          "lineId",
          "invoiceId",
          "description",
          "quantityInvoiced",
          "pricePerUnit",
          "amount",
          "matchStatus"
        ]
      },
      "SalesInvoiceResponseDto": {
        "type": "object",
        "properties": {
          "invoiceId": {
            "type": "string"
          },
          "invoiceNumber": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "customerName": {
            "type": "string"
          },
          "customerOrderNumber": {
            "type": "string"
          },
          "totalAmount": {
            "type": "string"
          },
          "outstandingAmount": {
            "type": "string"
          },
          "taxAmount": {
            "type": "string"
          },
          "currencyCode": {
            "type": "string"
          },
          "stateCode": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "salesOrderId": {
            "type": "string"
          },
          "earlyPaymentDiscount": {
            "type": "string"
          },
          "earlyPaymentDiscountDays": {
            "type": "number"
          },
          "createdBy": {
            "type": "string"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string"
          },
          "invoiceDate": {
            "format": "date-time",
            "type": "string"
          },
          "dueDate": {
            "format": "date-time",
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceLineResponseDto"
            }
          },
          "allocations": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "termsDescription": {
            "type": "string"
          }
        },
        "required": [
          "invoiceId",
          "invoiceNumber",
          "customerId",
          "customerName",
          "totalAmount",
          "outstandingAmount",
          "taxAmount",
          "currencyCode",
          "stateCode",
          "createdBy",
          "createdOn",
          "lines"
        ]
      },
      "PurchaseInvoiceResponseDto": {
        "type": "object",
        "properties": {
          "invoiceId": {
            "type": "string"
          },
          "invoiceNumber": {
            "type": "string"
          },
          "vendorId": {
            "type": "string"
          },
          "vendorName": {
            "type": "string"
          },
          "supplierInvoiceNumber": {
            "type": "string"
          },
          "totalAmount": {
            "type": "string"
          },
          "outstandingAmount": {
            "type": "string"
          },
          "taxAmount": {
            "type": "string"
          },
          "currencyCode": {
            "type": "string"
          },
          "stateCode": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "purchaseOrderId": {
            "type": "string"
          },
          "earlyPaymentDiscount": {
            "type": "string"
          },
          "earlyPaymentDiscountDays": {
            "type": "number"
          },
          "createdBy": {
            "type": "string"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string"
          },
          "invoiceDate": {
            "format": "date-time",
            "type": "string"
          },
          "dueDate": {
            "format": "date-time",
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceLineResponseDto"
            }
          },
          "allocations": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "invoiceId",
          "invoiceNumber",
          "vendorId",
          "vendorName",
          "totalAmount",
          "outstandingAmount",
          "taxAmount",
          "currencyCode",
          "stateCode",
          "createdBy",
          "createdOn",
          "lines"
        ]
      },
      "ChangeInvoiceStateDto": {
        "type": "object",
        "properties": {
          "stateCode": {
            "type": "string"
          },
          "discrepanciesAcknowledged": {
            "type": "boolean"
          }
        },
        "required": [
          "stateCode"
        ]
      },
      "CreateStandaloneInvoiceLineDto": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "productId": {
            "type": "string",
            "format": "uuid"
          },
          "glAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "quantityInvoiced": {
            "type": "number"
          },
          "pricePerUnit": {
            "type": "number"
          },
          "purchaseOrderLineId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "quantityInvoiced",
          "pricePerUnit"
        ]
      },
      "CreateStandaloneInvoiceDto": {
        "type": "object",
        "properties": {
          "vendorId": {
            "type": "string",
            "format": "uuid"
          },
          "supplierInvoiceNumber": {
            "type": "string"
          },
          "purchaseOrderId": {
            "type": "string",
            "format": "uuid"
          },
          "currencyCode": {
            "type": "string"
          },
          "invoiceDate": {
            "type": "string"
          },
          "totalAmount": {
            "type": "number"
          },
          "taxAmount": {
            "type": "number"
          },
          "notes": {
            "type": "string"
          },
          "receiptFilename": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateStandaloneInvoiceLineDto"
            }
          }
        },
        "required": [
          "vendorId",
          "supplierInvoiceNumber",
          "currencyCode",
          "totalAmount",
          "taxAmount"
        ]
      },
      "UpdatePurchaseInvoiceDto": {
        "type": "object",
        "properties": {
          "supplierInvoiceNumber": {
            "type": "string"
          },
          "receiptFilename": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "taxAmount": {
            "type": "string"
          },
          "currencyCode": {
            "type": "string"
          },
          "vendorId": {
            "type": "string"
          }
        }
      },
      "UpdateInvoiceLineDto": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "productId": {
            "type": "string",
            "format": "uuid"
          },
          "glAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "quantityInvoiced": {
            "type": "number"
          },
          "pricePerUnit": {
            "type": "number"
          }
        }
      },
      "ResolveInvoiceLineDto": {
        "type": "object",
        "properties": {
          "purchaseOrderLineId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "purchaseOrderLineId"
        ]
      },
      "AutoMatchPurchaseOrderDto": {
        "type": "object",
        "properties": {
          "purchaseOrderId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "purchaseOrderId"
        ]
      },
      "SyncSummaryDto": {
        "type": "object",
        "properties": {
          "pending": {
            "type": "number"
          },
          "processed": {
            "type": "number"
          },
          "failed": {
            "type": "number"
          }
        },
        "required": [
          "pending",
          "processed",
          "failed"
        ]
      },
      "TypeBreakdownDto": {
        "type": "object",
        "properties": {
          "eventType": {
            "type": "string"
          },
          "total": {
            "type": "number"
          },
          "pending": {
            "type": "number"
          },
          "processed": {
            "type": "number"
          },
          "failed": {
            "type": "number"
          }
        },
        "required": [
          "eventType",
          "total",
          "pending",
          "processed",
          "failed"
        ]
      },
      "OutboxEventDto": {
        "type": "object",
        "properties": {
          "outboxId": {
            "type": "string"
          },
          "entityType": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "eventType": {
            "type": "string"
          },
          "payload": {
            "type": "object"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string"
          },
          "processedAt": {
            "format": "date-time",
            "type": "string"
          },
          "lastError": {
            "type": "string"
          }
        },
        "required": [
          "outboxId",
          "entityType",
          "entityId",
          "eventType",
          "payload",
          "createdOn"
        ]
      },
      "SyncStatusResponseDto": {
        "type": "object",
        "properties": {
          "summary": {
            "$ref": "#/components/schemas/SyncSummaryDto"
          },
          "byType": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TypeBreakdownDto"
            }
          },
          "recentEvents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OutboxEventDto"
            }
          }
        },
        "required": [
          "summary",
          "byType",
          "recentEvents"
        ]
      },
      "SyncEventsResponseDto": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OutboxEventDto"
            }
          },
          "total": {
            "type": "number"
          }
        },
        "required": [
          "events",
          "total"
        ]
      },
      "DeleteEventsResponseDto": {
        "type": "object",
        "properties": {
          "deleted": {
            "type": "number"
          },
          "eventType": {
            "type": "string"
          }
        },
        "required": [
          "deleted",
          "eventType"
        ]
      },
      "SalesCreditNoteResponseDto": {
        "type": "object",
        "properties": {
          "creditNoteId": {
            "type": "string"
          },
          "creditNoteNumber": {
            "type": "string"
          },
          "stateCode": {
            "type": "string"
          }
        },
        "required": [
          "creditNoteId",
          "creditNoteNumber",
          "stateCode"
        ]
      },
      "CreateSalesCreditNoteLineDto": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "taxCategoryId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "description",
          "amount",
          "accountId"
        ]
      },
      "CreateSalesCreditNoteDto": {
        "type": "object",
        "properties": {
          "returnId": {
            "type": "string",
            "format": "uuid"
          },
          "customerId": {
            "type": "string",
            "format": "uuid"
          },
          "notes": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateSalesCreditNoteLineDto"
            }
          }
        }
      },
      "GlobalNoteDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "noteId": {
            "type": "string"
          },
          "noteNumber": {
            "type": "string"
          },
          "referenceNumber": {
            "type": "string"
          },
          "orderNumber": {
            "type": "string"
          },
          "partyNumber": {
            "type": "string"
          },
          "partyName": {
            "type": "string"
          },
          "createdOn": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "totalAmount": {
            "type": "number"
          },
          "currencyCode": {
            "type": "string"
          },
          "stateCode": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "noteId",
          "noteNumber",
          "referenceNumber",
          "orderNumber",
          "partyNumber",
          "partyName",
          "createdOn",
          "notes",
          "totalAmount",
          "currencyCode",
          "stateCode"
        ]
      },
      "GlobalNotesListResponseDto": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GlobalNoteDto"
            }
          },
          "total": {
            "type": "number"
          },
          "page": {
            "type": "number"
          },
          "limit": {
            "type": "number"
          }
        },
        "required": [
          "data",
          "total",
          "page",
          "limit"
        ]
      },
      "EnrichmentResultDto": {
        "type": "object",
        "properties": {
          "isValid": {
            "type": "boolean"
          },
          "data": {
            "type": "object"
          }
        },
        "required": [
          "isValid",
          "data"
        ]
      },
      "EnrichmentPayloadDto": {
        "type": "object",
        "properties": {
          "payload": {
            "type": "object",
            "description": "Dynamic payload for the enrichment provider"
          }
        }
      },
      "EnrichmentProviderDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "supportedCountries": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "schema": {
            "type": "object"
          }
        },
        "required": [
          "name",
          "type",
          "supportedCountries",
          "schema"
        ]
      },
      "UpdateEnrichmentConfigDto": {
        "type": "object",
        "properties": {
          "config": {
            "type": "object",
            "description": "Provider configuration JSON key-value pairs"
          },
          "testPayload": {
            "type": "string",
            "description": "Saved test payload string or JSON"
          }
        }
      },
      "EnrichmentConfigResponseDto": {
        "type": "object",
        "properties": {
          "config": {
            "type": "object"
          }
        },
        "required": [
          "config"
        ]
      },
      "PaymentResponseDto": {
        "type": "object",
        "properties": {
          "paymentId": {
            "type": "string"
          },
          "paymentNumber": {
            "type": "string"
          },
          "paymentType": {
            "type": "string"
          },
          "partyType": {
            "type": "string"
          },
          "partyId": {
            "type": "string"
          },
          "paymentDate": {
            "type": "object"
          },
          "modeOfPayment": {
            "type": "string"
          },
          "totalAmount": {
            "type": "object"
          },
          "unallocatedAmount": {
            "type": "object"
          },
          "stateCode": {
            "type": "string"
          },
          "currencyCode": {
            "type": "string"
          },
          "glAccountBank": {
            "type": "string"
          },
          "referenceNumber": {
            "type": "string",
            "nullable": true
          },
          "createdOn": {
            "type": "object"
          },
          "createdBy": {
            "type": "string"
          },
          "partyName": {
            "type": "string"
          }
        },
        "required": [
          "paymentId",
          "paymentNumber",
          "paymentType",
          "partyType",
          "partyId",
          "paymentDate",
          "modeOfPayment",
          "totalAmount",
          "unallocatedAmount",
          "stateCode",
          "currencyCode",
          "glAccountBank",
          "referenceNumber",
          "createdOn",
          "createdBy",
          "partyName"
        ]
      },
      "PaymentRunCandidateResponseDto": {
        "type": "object",
        "properties": {
          "invoiceId": {
            "type": "string"
          },
          "invoiceNumber": {
            "type": "string"
          },
          "supplierId": {
            "type": "string"
          },
          "supplierName": {
            "type": "string"
          },
          "dueDate": {
            "type": "object"
          },
          "invoiceDate": {
            "type": "object"
          },
          "totalAmount": {
            "type": "object"
          },
          "outstandingAmount": {
            "type": "object"
          },
          "earlyPaymentDiscount": {
            "type": "string",
            "nullable": true
          },
          "earlyPaymentDiscountDays": {
            "type": "number",
            "nullable": true
          },
          "cashAmount": {
            "type": "number"
          },
          "discountAmount": {
            "type": "number"
          },
          "hasDiscountOpportunity": {
            "type": "boolean"
          },
          "isDueSoon": {
            "type": "boolean"
          }
        },
        "required": [
          "invoiceId",
          "invoiceNumber",
          "supplierId",
          "supplierName",
          "dueDate",
          "invoiceDate",
          "totalAmount",
          "outstandingAmount",
          "earlyPaymentDiscount",
          "earlyPaymentDiscountDays",
          "cashAmount",
          "discountAmount",
          "hasDiscountOpportunity",
          "isDueSoon"
        ]
      },
      "GeneratePaymentRunDto": {
        "type": "object",
        "properties": {
          "targetDate": {
            "type": "string"
          },
          "glAccountBank": {
            "type": "string",
            "format": "uuid"
          },
          "invoiceIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "targetDate",
          "glAccountBank",
          "invoiceIds"
        ]
      },
      "GeneratePaymentRunResponseDto": {
        "type": "object",
        "properties": {
          "generatedPayments": {
            "type": "number"
          },
          "totalCashAmount": {
            "type": "number"
          },
          "totalDiscountAmount": {
            "type": "number"
          }
        },
        "required": [
          "generatedPayments",
          "totalCashAmount",
          "totalDiscountAmount"
        ]
      },
      "PaymentLineDto": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "number"
          },
          "memo": {
            "type": "string"
          }
        },
        "required": [
          "accountId",
          "amount"
        ]
      },
      "AllocationDto": {
        "type": "object",
        "properties": {
          "referenceType": {
            "type": "object"
          },
          "referenceId": {
            "type": "string",
            "format": "uuid"
          },
          "allocatedAmount": {
            "type": "number",
            "minimum": 0.01
          },
          "discountAmount": {
            "type": "number",
            "minimum": 0
          }
        },
        "required": [
          "referenceType",
          "referenceId",
          "allocatedAmount"
        ]
      },
      "CreatePaymentDto": {
        "type": "object",
        "properties": {
          "paymentId": {
            "type": "string",
            "format": "uuid"
          },
          "paymentType": {
            "type": "object"
          },
          "partyId": {
            "type": "string",
            "format": "uuid"
          },
          "paymentDate": {
            "type": "string"
          },
          "modeOfPayment": {
            "type": "object"
          },
          "totalAmount": {
            "type": "number",
            "minimum": 0.01
          },
          "glAccountBank": {
            "type": "string",
            "format": "uuid"
          },
          "referenceNumber": {
            "type": "string"
          },
          "currencyCode": {
            "type": "string"
          },
          "submitImmediately": {
            "type": "boolean"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentLineDto"
            }
          },
          "allocations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AllocationDto"
            }
          }
        },
        "required": [
          "paymentId",
          "paymentType",
          "paymentDate",
          "modeOfPayment",
          "totalAmount",
          "glAccountBank",
          "currencyCode"
        ]
      },
      "AllocatePaymentDto": {
        "type": "object",
        "properties": {
          "allocations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AllocationDto"
            }
          }
        },
        "required": [
          "allocations"
        ]
      },
      "ConfirmRejectResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ]
      },
      "BatchPaymentActionDto": {
        "type": "object",
        "properties": {
          "paymentIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "paymentIds"
        ]
      },
      "ExportAbaResponseDto": {
        "type": "object",
        "properties": {
          "fileContent": {
            "type": "string"
          }
        },
        "required": [
          "fileContent"
        ]
      },
      "SupplierResponseDto": {
        "type": "object",
        "properties": {
          "earlyPaymentDiscount": {
            "type": "string",
            "nullable": true
          },
          "earlyPaymentDiscountDays": {
            "type": "number",
            "nullable": true
          },
          "supplierId": {
            "type": "string"
          },
          "actorId": {
            "type": "string"
          },
          "vendorNumber": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "address1Line1": {
            "type": "string",
            "nullable": true
          },
          "address1Line2": {
            "type": "string",
            "nullable": true
          },
          "address1City": {
            "type": "string",
            "nullable": true
          },
          "address1StateOrProvince": {
            "type": "string",
            "nullable": true
          },
          "address1PostalCode": {
            "type": "string",
            "nullable": true
          },
          "address1Country": {
            "type": "string"
          },
          "telephone1": {
            "type": "string",
            "nullable": true
          },
          "fax": {
            "type": "string",
            "nullable": true
          },
          "emailAddress1": {
            "type": "string",
            "nullable": true
          },
          "tradingTermsId": {
            "type": "string",
            "nullable": true
          },
          "creditLimit": {
            "type": "string",
            "nullable": true
          },
          "isPurchasingBlocked": {
            "type": "boolean"
          },
          "purchasingBlockReason": {
            "type": "string",
            "nullable": true
          },
          "isPaymentBlocked": {
            "type": "boolean"
          },
          "paymentBlockReason": {
            "type": "string",
            "nullable": true
          },
          "blockNotes": {
            "type": "string",
            "nullable": true
          },
          "supplierGroupId": {
            "type": "string",
            "nullable": true
          },
          "currencyCode": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "bankAccountName": {
            "type": "string",
            "nullable": true
          },
          "bankBsb": {
            "type": "string",
            "nullable": true
          },
          "bankAccountNumber": {
            "type": "string",
            "nullable": true
          },
          "businessNumber": {
            "type": "string",
            "nullable": true
          },
          "isTaxRegistered": {
            "type": "boolean"
          },
          "taxPositionId": {
            "type": "string",
            "nullable": true
          },
          "stateCode": {
            "type": "string",
            "nullable": true
          },
          "tenantId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "supplierId",
          "actorId",
          "vendorNumber",
          "name",
          "address1Line1",
          "address1Line2",
          "address1City",
          "address1StateOrProvince",
          "address1PostalCode",
          "address1Country",
          "telephone1",
          "fax",
          "emailAddress1",
          "tradingTermsId",
          "creditLimit",
          "isPurchasingBlocked",
          "purchasingBlockReason",
          "isPaymentBlocked",
          "paymentBlockReason",
          "blockNotes",
          "supplierGroupId",
          "currencyCode",
          "notes",
          "bankAccountName",
          "bankBsb",
          "bankAccountNumber",
          "businessNumber",
          "isTaxRegistered",
          "taxPositionId",
          "stateCode",
          "tenantId",
          "createdAt",
          "updatedAt"
        ]
      },
      "SupplierAgedBalanceResponseDto": {
        "type": "object",
        "properties": {
          "supplierId": {
            "type": "string"
          },
          "supplierName": {
            "type": "string"
          },
          "supplierNumber": {
            "type": "string"
          },
          "currencyCode": {
            "type": "string"
          },
          "isPaymentBlocked": {
            "type": "boolean"
          },
          "creditLimit": {
            "type": "string",
            "nullable": true
          },
          "glBalance": {
            "type": "number"
          },
          "totalOutstanding": {
            "type": "number"
          },
          "discrepancyAmount": {
            "type": "number"
          },
          "current": {
            "type": "number"
          },
          "days1To30": {
            "type": "number"
          },
          "days31To60": {
            "type": "number"
          },
          "days61To90": {
            "type": "number"
          },
          "days90Plus": {
            "type": "number"
          }
        },
        "required": [
          "supplierId",
          "supplierName",
          "supplierNumber",
          "currencyCode",
          "isPaymentBlocked",
          "glBalance",
          "totalOutstanding",
          "discrepancyAmount",
          "current",
          "days1To30",
          "days31To60",
          "days61To90",
          "days90Plus"
        ]
      },
      "CreateSupplierDto": {
        "type": "object",
        "properties": {
          "earlyPaymentDiscount": {
            "type": "string"
          },
          "earlyPaymentDiscountDays": {
            "type": "number"
          },
          "actorId": {
            "type": "string",
            "format": "uuid"
          },
          "vendorNumber": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "address1Line1": {
            "type": "string"
          },
          "address1Line2": {
            "type": "string"
          },
          "address1City": {
            "type": "string"
          },
          "address1StateOrProvince": {
            "type": "string"
          },
          "address1PostalCode": {
            "type": "string"
          },
          "address1Country": {
            "type": "string"
          },
          "telephone1": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "emailAddress1": {
            "type": "string",
            "format": "email"
          },
          "tradingTermsId": {
            "type": "string",
            "format": "uuid"
          },
          "creditLimit": {
            "type": "string"
          },
          "isPurchasingBlocked": {
            "type": "boolean"
          },
          "purchasingBlockReason": {
            "type": "string",
            "enum": [
              "compliance_breach",
              "quality_issues",
              "dispute",
              "financial_risk",
              "other"
            ]
          },
          "isPaymentBlocked": {
            "type": "boolean"
          },
          "paymentBlockReason": {
            "type": "string",
            "enum": [
              "invoice_dispute",
              "missing_goods",
              "contractual_breach",
              "other"
            ]
          },
          "blockNotes": {
            "type": "string"
          },
          "supplierGroupId": {
            "type": "string",
            "format": "uuid"
          },
          "currencyCode": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "bankAccountName": {
            "type": "string"
          },
          "bankBsb": {
            "type": "string"
          },
          "bankAccountNumber": {
            "type": "string"
          },
          "businessNumber": {
            "type": "string"
          },
          "isTaxRegistered": {
            "type": "boolean"
          },
          "taxPositionId": {
            "type": "string",
            "format": "uuid"
          },
          "stateCode": {
            "type": "string"
          }
        },
        "required": [
          "vendorNumber",
          "name",
          "address1Country"
        ]
      },
      "UpdateSupplierDto": {
        "type": "object",
        "properties": {
          "earlyPaymentDiscount": {
            "type": "string"
          },
          "earlyPaymentDiscountDays": {
            "type": "number"
          },
          "actorId": {
            "type": "string",
            "format": "uuid"
          },
          "vendorNumber": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "address1Line1": {
            "type": "string"
          },
          "address1Line2": {
            "type": "string"
          },
          "address1City": {
            "type": "string"
          },
          "address1StateOrProvince": {
            "type": "string"
          },
          "address1PostalCode": {
            "type": "string"
          },
          "address1Country": {
            "type": "string"
          },
          "telephone1": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "emailAddress1": {
            "type": "string",
            "format": "email"
          },
          "tradingTermsId": {
            "type": "string",
            "format": "uuid"
          },
          "creditLimit": {
            "type": "string"
          },
          "isPurchasingBlocked": {
            "type": "boolean"
          },
          "purchasingBlockReason": {
            "type": "string",
            "enum": [
              "compliance_breach",
              "quality_issues",
              "dispute",
              "financial_risk",
              "other"
            ]
          },
          "isPaymentBlocked": {
            "type": "boolean"
          },
          "paymentBlockReason": {
            "type": "string",
            "enum": [
              "invoice_dispute",
              "missing_goods",
              "contractual_breach",
              "other"
            ]
          },
          "blockNotes": {
            "type": "string"
          },
          "supplierGroupId": {
            "type": "string",
            "format": "uuid"
          },
          "currencyCode": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "bankAccountName": {
            "type": "string"
          },
          "bankBsb": {
            "type": "string"
          },
          "bankAccountNumber": {
            "type": "string"
          },
          "businessNumber": {
            "type": "string"
          },
          "isTaxRegistered": {
            "type": "boolean"
          },
          "taxPositionId": {
            "type": "string",
            "format": "uuid"
          },
          "stateCode": {
            "type": "string"
          }
        }
      },
      "CreateSupplierExpiryDto": {
        "type": "object",
        "properties": {
          "expiryType": {
            "type": "string",
            "enum": [
              "insurance",
              "tax_certificate",
              "trial_period",
              "other"
            ]
          },
          "expiryDate": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          }
        },
        "required": [
          "expiryType",
          "expiryDate"
        ]
      },
      "UpdateSupplierExpiryDto": {
        "type": "object",
        "properties": {
          "expiryType": {
            "type": "string",
            "enum": [
              "insurance",
              "tax_certificate",
              "trial_period",
              "other"
            ]
          },
          "expiryDate": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          }
        }
      },
      "SupplierGroupResponseDto": {
        "type": "object",
        "properties": {
          "earlyPaymentDiscount": {
            "type": "string",
            "nullable": true
          },
          "earlyPaymentDiscountDays": {
            "type": "number",
            "nullable": true
          },
          "supplierGroupId": {
            "type": "string"
          },
          "groupCode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "defaultApAccountId": {
            "type": "string",
            "nullable": true
          },
          "defaultExpenseAccountId": {
            "type": "string",
            "nullable": true
          },
          "tradingTermsId": {
            "type": "string",
            "nullable": true
          },
          "creditLimit": {
            "type": "string",
            "nullable": true
          },
          "isPurchasingBlocked": {
            "type": "boolean"
          },
          "purchasingBlockReason": {
            "type": "string",
            "nullable": true
          },
          "isPaymentBlocked": {
            "type": "boolean"
          },
          "paymentBlockReason": {
            "type": "string",
            "nullable": true
          },
          "blockNotes": {
            "type": "string",
            "nullable": true
          },
          "defaultCostCenterId": {
            "type": "string",
            "nullable": true
          },
          "defaultActivityId": {
            "type": "string",
            "nullable": true
          },
          "taxPositionId": {
            "type": "string",
            "nullable": true
          },
          "tenantId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "supplierGroupId",
          "groupCode",
          "name",
          "defaultApAccountId",
          "defaultExpenseAccountId",
          "tradingTermsId",
          "creditLimit",
          "isPurchasingBlocked",
          "purchasingBlockReason",
          "isPaymentBlocked",
          "paymentBlockReason",
          "blockNotes",
          "defaultCostCenterId",
          "defaultActivityId",
          "taxPositionId",
          "tenantId",
          "createdAt",
          "updatedAt"
        ]
      },
      "CreateSupplierGroupDto": {
        "type": "object",
        "properties": {
          "earlyPaymentDiscount": {
            "type": "string"
          },
          "earlyPaymentDiscountDays": {
            "type": "number"
          },
          "groupCode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "defaultApAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "defaultExpenseAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "tradingTermsId": {
            "type": "string",
            "format": "uuid"
          },
          "creditLimit": {
            "type": "string"
          },
          "isPurchasingBlocked": {
            "type": "boolean"
          },
          "purchasingBlockReason": {
            "type": "string",
            "enum": [
              "compliance_breach",
              "quality_issues",
              "dispute",
              "financial_risk",
              "other"
            ]
          },
          "isPaymentBlocked": {
            "type": "boolean"
          },
          "paymentBlockReason": {
            "type": "string",
            "enum": [
              "invoice_dispute",
              "missing_goods",
              "contractual_breach",
              "other"
            ]
          },
          "blockNotes": {
            "type": "string"
          },
          "defaultCostCenterId": {
            "type": "string",
            "format": "uuid"
          },
          "defaultActivityId": {
            "type": "string",
            "format": "uuid"
          },
          "taxPositionId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "groupCode",
          "name"
        ]
      },
      "UpdateSupplierGroupDto": {
        "type": "object",
        "properties": {
          "earlyPaymentDiscount": {
            "type": "string"
          },
          "earlyPaymentDiscountDays": {
            "type": "number"
          },
          "groupCode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "defaultApAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "defaultExpenseAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "tradingTermsId": {
            "type": "string",
            "format": "uuid"
          },
          "creditLimit": {
            "type": "string"
          },
          "isPurchasingBlocked": {
            "type": "boolean"
          },
          "purchasingBlockReason": {
            "type": "string",
            "enum": [
              "compliance_breach",
              "quality_issues",
              "dispute",
              "financial_risk",
              "other"
            ]
          },
          "isPaymentBlocked": {
            "type": "boolean"
          },
          "paymentBlockReason": {
            "type": "string",
            "enum": [
              "invoice_dispute",
              "missing_goods",
              "contractual_breach",
              "other"
            ]
          },
          "blockNotes": {
            "type": "string"
          },
          "defaultCostCenterId": {
            "type": "string",
            "format": "uuid"
          },
          "defaultActivityId": {
            "type": "string",
            "format": "uuid"
          },
          "taxPositionId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "DashboardSummaryDto": {
        "type": "object",
        "properties": {
          "customers": {
            "type": "number"
          },
          "products": {
            "type": "number"
          },
          "orderLines": {
            "type": "number"
          }
        },
        "required": [
          "customers",
          "products",
          "orderLines"
        ]
      },
      "SearchResultDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "product",
              "customer",
              "sales_order",
              "supplier",
              "purchase_order",
              "shipment",
              "goods_receipt",
              "sales_invoice",
              "purchase_invoice",
              "sales_return",
              "purchase_return",
              "sales_credit_note",
              "purchase_debit_note",
              "transfer_order",
              "work_order",
              "contact",
              "project",
              "payment"
            ]
          },
          "label": {
            "type": "string"
          },
          "subtitle": {
            "type": "string"
          },
          "href": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "label",
          "subtitle",
          "href"
        ]
      },
      "UniversalSearchResponseDto": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchResultDto"
            }
          }
        },
        "required": [
          "results"
        ]
      },
      "TimelineEventDto": {
        "type": "object",
        "properties": {
          "eventId": {
            "type": "string"
          },
          "eventType": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "entityDisplay": {
            "type": "string"
          },
          "actor": {
            "type": "string",
            "nullable": true
          },
          "payload": {
            "type": "object",
            "nullable": true
          },
          "timestamp": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "eventId",
          "eventType",
          "entityId",
          "entityDisplay",
          "actor",
          "timestamp"
        ]
      },
      "ClientErrorDto": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "maxLength": 1000
          },
          "stack": {
            "type": "string",
            "maxLength": 5000
          },
          "component": {
            "type": "string",
            "maxLength": 255
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "message"
        ]
      },
      "HealthResponseDto": {
        "type": "object",
        "properties": {}
      },
      "CreatePurchaseOrderLineDto": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string"
          },
          "productDescription": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "pricePerUnit": {
            "type": "string"
          },
          "discountPercentage": {
            "type": "string"
          },
          "unitOfMeasure": {
            "type": "string"
          },
          "taxCategoryId": {
            "type": "string"
          }
        },
        "required": [
          "quantity",
          "pricePerUnit"
        ]
      },
      "CreatePurchaseOrderDto": {
        "type": "object",
        "properties": {
          "purchaseOrderId": {
            "type": "string",
            "format": "uuid"
          },
          "orderNumber": {
            "type": "string"
          },
          "deliveryLocationId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "vendorId": {
            "type": "string"
          },
          "currencyCode": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "referenceNumber": {
            "type": "string"
          },
          "expectedDate": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreatePurchaseOrderLineDto"
            }
          }
        },
        "required": [
          "purchaseOrderId",
          "orderNumber",
          "deliveryLocationId",
          "vendorId"
        ]
      },
      "PurchaseOrderLineResponseDto": {
        "type": "object",
        "properties": {
          "purchaseOrderLineId": {
            "type": "string"
          },
          "purchaseOrderId": {
            "type": "string"
          },
          "lineNumber": {
            "type": "number"
          },
          "productId": {
            "type": "string",
            "nullable": true
          },
          "productNumber": {
            "type": "string",
            "nullable": true
          },
          "productType": {
            "type": "string",
            "nullable": true
          },
          "productDescription": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "string"
          },
          "pricePerUnit": {
            "type": "string"
          },
          "discountPercentage": {
            "type": "string",
            "nullable": true
          },
          "amount": {
            "type": "string",
            "nullable": true
          },
          "taxCategoryId": {
            "type": "string"
          },
          "tax": {
            "type": "string",
            "nullable": true
          },
          "totalAmount": {
            "type": "string",
            "nullable": true
          },
          "unitOfMeasure": {
            "type": "string",
            "nullable": true
          },
          "quantityReceived": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "purchaseOrderLineId",
          "purchaseOrderId",
          "lineNumber",
          "quantity",
          "pricePerUnit",
          "taxCategoryId"
        ]
      },
      "PurchaseOrderResponseDto": {
        "type": "object",
        "properties": {
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PurchaseOrderLineResponseDto"
            }
          },
          "purchaseOrderId": {
            "type": "string"
          },
          "orderNumber": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "vendorId": {
            "type": "string",
            "nullable": true
          },
          "deliveryLocationId": {
            "type": "string"
          },
          "referenceNumber": {
            "type": "string",
            "nullable": true
          },
          "stateCode": {
            "type": "string"
          },
          "currencyCode": {
            "type": "string"
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "customFields": {
            "type": "object",
            "nullable": true
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          },
          "createdOn": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "modifiedOn": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "expectedDate": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "vendorName": {
            "type": "string"
          }
        },
        "required": [
          "purchaseOrderId",
          "orderNumber",
          "deliveryLocationId",
          "stateCode",
          "currencyCode"
        ]
      },
      "ChangeStateDto": {
        "type": "object",
        "properties": {
          "stateCode": {
            "type": "string"
          }
        },
        "required": [
          "stateCode"
        ]
      },
      "UpdatePurchaseOrderLineDto": {
        "type": "object",
        "properties": {
          "quantity": {
            "type": "string"
          },
          "pricePerUnit": {
            "type": "string"
          },
          "discountPercentage": {
            "type": "string"
          },
          "productDescription": {
            "type": "string"
          },
          "unitOfMeasure": {
            "type": "string"
          },
          "taxCategoryId": {
            "type": "string"
          }
        }
      },
      "UpdatePurchaseOrderDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "vendorId": {
            "type": "string"
          },
          "currencyCode": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "referenceNumber": {
            "type": "string"
          },
          "stateCode": {
            "type": "string"
          },
          "deliveryLocationId": {
            "type": "string"
          },
          "expectedDate": {
            "type": "string"
          }
        }
      },
      "CreatePurchaseReturnLineDto": {
        "type": "object",
        "properties": {
          "purchaseOrderLineId": {
            "type": "string"
          },
          "quantityReturned": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "returnFee": {
            "type": "string"
          },
          "sourceBinId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "purchaseOrderLineId",
          "quantityReturned"
        ]
      },
      "CreatePurchaseReturnDto": {
        "type": "object",
        "properties": {
          "notes": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreatePurchaseReturnLineDto"
            }
          }
        },
        "required": [
          "lines"
        ]
      },
      "PurchaseReturnLineResponseDto": {
        "type": "object",
        "properties": {
          "returnLineId": {
            "type": "string"
          },
          "returnId": {
            "type": "string"
          },
          "purchaseOrderLineId": {
            "type": "string"
          },
          "quantityReturned": {
            "type": "string"
          },
          "reason": {
            "type": "string",
            "nullable": true
          },
          "returnFee": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "returnLineId",
          "returnId",
          "purchaseOrderLineId",
          "quantityReturned"
        ]
      },
      "PurchaseReturnResponseDto": {
        "type": "object",
        "properties": {
          "returnId": {
            "type": "string"
          },
          "returnNumber": {
            "type": "string"
          },
          "purchaseOrderId": {
            "type": "string"
          },
          "stateCode": {
            "type": "string"
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          },
          "createdOn": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "modifiedOn": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PurchaseReturnLineResponseDto"
            }
          },
          "shipments": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "shipmentLines": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "returnId",
          "returnNumber",
          "purchaseOrderId",
          "stateCode"
        ]
      },
      "ShipPurchaseReturnDto": {
        "type": "object",
        "properties": {
          "trackingNumber": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          }
        }
      },
      "GlobalPurchaseReturnDto": {
        "type": "object",
        "properties": {
          "orderNumber": {
            "type": "string"
          },
          "vendorName": {
            "type": "string"
          },
          "vendorId": {
            "type": "string"
          },
          "vendorCode": {
            "type": "string"
          },
          "currencyCode": {
            "type": "string"
          },
          "debitNoteId": {
            "type": "string"
          },
          "debitNoteNumber": {
            "type": "string"
          },
          "debitNoteState": {
            "type": "string"
          },
          "debitNoteTotalAmount": {
            "type": "string"
          },
          "returnId": {
            "type": "string"
          },
          "returnNumber": {
            "type": "string"
          },
          "purchaseOrderId": {
            "type": "string"
          },
          "stateCode": {
            "type": "string"
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          },
          "createdOn": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "modifiedOn": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PurchaseReturnLineResponseDto"
            }
          },
          "shipments": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "shipmentLines": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "returnId",
          "returnNumber",
          "purchaseOrderId",
          "stateCode"
        ]
      },
      "ResolvePurchaseReturnDto": {
        "type": "object",
        "properties": {
          "notes": {
            "type": "string"
          }
        }
      },
      "PurchaseDebitNoteLineResponseDto": {
        "type": "object",
        "properties": {
          "debitNoteLineId": {
            "type": "string"
          },
          "debitNoteId": {
            "type": "string"
          },
          "purchaseOrderLineId": {
            "type": "string"
          },
          "quantityInvoiced": {
            "type": "string"
          },
          "pricePerUnit": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "taxAmount": {
            "type": "string",
            "nullable": true
          },
          "shipmentAllocations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "shipmentLineId": {
                  "type": "string"
                },
                "quantityCredited": {
                  "type": "string"
                }
              },
              "required": [
                "shipmentLineId",
                "quantityCredited"
              ]
            }
          }
        },
        "required": [
          "debitNoteLineId",
          "debitNoteId",
          "purchaseOrderLineId",
          "quantityInvoiced",
          "pricePerUnit",
          "amount"
        ]
      },
      "PurchaseDebitNoteResponseDto": {
        "type": "object",
        "properties": {
          "debitNoteId": {
            "type": "string"
          },
          "debitNoteNumber": {
            "type": "string"
          },
          "returnId": {
            "type": "string"
          },
          "purchaseOrderId": {
            "type": "string"
          },
          "stateCode": {
            "type": "string"
          },
          "totalAmount": {
            "type": "string"
          },
          "taxAmount": {
            "type": "string"
          },
          "feeAmount": {
            "type": "string"
          },
          "vendorCode": {
            "type": "string",
            "nullable": true
          },
          "vendorName": {
            "type": "string",
            "nullable": true
          },
          "createdOn": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "modifiedOn": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PurchaseDebitNoteLineResponseDto"
            }
          }
        },
        "required": [
          "debitNoteId",
          "debitNoteNumber",
          "returnId",
          "purchaseOrderId",
          "stateCode",
          "totalAmount",
          "taxAmount",
          "feeAmount"
        ]
      },
      "CreateDebitNoteShipmentAllocationDto": {
        "type": "object",
        "properties": {
          "shipmentLineId": {
            "type": "string"
          },
          "quantityCredited": {
            "type": "string"
          }
        },
        "required": [
          "shipmentLineId",
          "quantityCredited"
        ]
      },
      "CreateDebitNoteLineDto": {
        "type": "object",
        "properties": {
          "purchaseOrderLineId": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "accountId": {
            "type": "string"
          },
          "taxCategoryId": {
            "type": "string"
          },
          "shipmentAllocations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateDebitNoteShipmentAllocationDto"
            }
          },
          "quantityInvoiced": {
            "type": "string"
          },
          "pricePerUnit": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "taxAmount": {
            "type": "string"
          }
        },
        "required": [
          "amount"
        ]
      },
      "CreateDebitNoteDto": {
        "type": "object",
        "properties": {
          "returnId": {
            "type": "string"
          },
          "vendorId": {
            "type": "string"
          },
          "supplierReferenceNumber": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateDebitNoteLineDto"
            }
          },
          "taxAmount": {
            "type": "string"
          },
          "feeAmount": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          }
        },
        "required": [
          "lines"
        ]
      },
      "WorkOrderComponentResponseDto": {
        "type": "object",
        "properties": {
          "workOrderComponentId": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "productName": {
            "type": "string"
          },
          "productNumber": {
            "type": "string"
          },
          "expectedQuantity": {
            "type": "string"
          },
          "unitCost": {
            "type": "string",
            "nullable": true
          },
          "stagedQuantity": {
            "type": "string",
            "nullable": true
          },
          "wipBinQuantity": {
            "type": "string",
            "nullable": true
          },
          "currentQuantity": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "workOrderComponentId",
          "productId",
          "productName",
          "productNumber",
          "expectedQuantity"
        ]
      },
      "WorkOrderResponseDto": {
        "type": "object",
        "properties": {
          "workOrderId": {
            "type": "string"
          },
          "orderNumber": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "productName": {
            "type": "string"
          },
          "productNumber": {
            "type": "string"
          },
          "targetQuantity": {
            "type": "string"
          },
          "completedQuantity": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "locationName": {
            "type": "string"
          },
          "wipBinId": {
            "type": "string",
            "nullable": true
          },
          "wipBinName": {
            "type": "string",
            "nullable": true
          },
          "outputBinId": {
            "type": "string",
            "nullable": true
          },
          "outputBinName": {
            "type": "string",
            "nullable": true
          },
          "stateCode": {
            "type": "string"
          },
          "assemblyCostPerUnit": {
            "type": "string",
            "nullable": true
          },
          "additionalCost": {
            "type": "string",
            "nullable": true
          },
          "totalCost": {
            "type": "string",
            "nullable": true
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          },
          "createdOn": {
            "type": "object"
          },
          "modifiedOn": {
            "type": "object"
          },
          "components": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkOrderComponentResponseDto"
            }
          }
        },
        "required": [
          "workOrderId",
          "orderNumber",
          "productId",
          "productName",
          "productNumber",
          "targetQuantity",
          "completedQuantity",
          "locationId",
          "locationName",
          "stateCode"
        ]
      },
      "CreateWorkOrderComponentDto": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string",
            "format": "uuid",
            "description": "Product ID of the component item"
          },
          "expectedQuantity": {
            "type": "string",
            "description": "Expected component quantity for this work order"
          },
          "unitCost": {
            "type": "string",
            "description": "Optional unit cost"
          }
        },
        "required": [
          "productId",
          "expectedQuantity"
        ]
      },
      "CreateWorkOrderDto": {
        "type": "object",
        "properties": {
          "orderNumber": {
            "type": "string",
            "description": "Optional custom order number (WO-YYYYMMDD-XXXX generated if empty)"
          },
          "productId": {
            "type": "string",
            "format": "uuid",
            "description": "Product ID of the output product to produce"
          },
          "targetQuantity": {
            "type": "string",
            "description": "Target quantity to produce"
          },
          "locationId": {
            "type": "string",
            "format": "uuid",
            "description": "Fulfillment location ID"
          },
          "wipBinId": {
            "type": "string",
            "format": "uuid",
            "description": "WIP Bin ID (optional)"
          },
          "outputBinId": {
            "type": "string",
            "format": "uuid",
            "description": "Finished Goods Output Bin ID (optional)"
          },
          "assemblyCostPerUnit": {
            "type": "string",
            "description": "Per-unit assembly cost"
          },
          "additionalCost": {
            "type": "string",
            "description": "Flat additional work order-level cost added to total"
          },
          "components": {
            "description": "Component lines snapshot (if empty, auto-populated from product BOM)",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateWorkOrderComponentDto"
            }
          }
        },
        "required": [
          "productId",
          "targetQuantity",
          "locationId"
        ]
      },
      "UpdateWorkOrderDto": {
        "type": "object",
        "properties": {
          "targetQuantity": {
            "type": "string",
            "description": "Target quantity to produce"
          },
          "locationId": {
            "type": "string",
            "format": "uuid",
            "description": "Fulfillment location ID"
          },
          "wipBinId": {
            "type": "string",
            "nullable": true,
            "format": "uuid",
            "description": "WIP Bin ID (optional)"
          },
          "outputBinId": {
            "type": "string",
            "nullable": true,
            "format": "uuid",
            "description": "Finished Goods Output Bin ID (optional)"
          },
          "assemblyCostPerUnit": {
            "type": "string",
            "nullable": true,
            "description": "Per-unit assembly cost"
          },
          "additionalCost": {
            "type": "string",
            "nullable": true,
            "description": "Flat additional work order-level cost added to total"
          }
        }
      },
      "UpdateWorkOrderComponentDto": {
        "type": "object",
        "properties": {
          "unitCost": {
            "type": "string",
            "nullable": true,
            "description": "Overridden unit cost"
          }
        }
      },
      "WorkOrderAvailableBinDto": {
        "type": "object",
        "properties": {
          "binId": {
            "type": "string"
          },
          "binName": {
            "type": "string"
          },
          "onHand": {
            "type": "string"
          }
        },
        "required": [
          "binId",
          "binName",
          "onHand"
        ]
      },
      "WorkOrderPickingLineDto": {
        "type": "object",
        "properties": {
          "salesOrderLineId": {
            "type": "string"
          },
          "lineNumber": {
            "type": "number"
          },
          "productId": {
            "type": "string"
          },
          "productNumber": {
            "type": "string"
          },
          "productType": {
            "type": "string"
          },
          "productDescription": {
            "type": "string"
          },
          "locationName": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "quantityPicked": {
            "type": "string"
          },
          "quantityShipped": {
            "type": "string"
          },
          "remaining": {
            "type": "string"
          },
          "isFullyPicked": {
            "type": "boolean"
          },
          "isPhysical": {
            "type": "boolean"
          },
          "onHand": {
            "type": "string"
          },
          "availableBins": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkOrderAvailableBinDto"
            }
          }
        },
        "required": [
          "salesOrderLineId",
          "lineNumber",
          "productId",
          "productNumber",
          "productType",
          "productDescription",
          "locationName",
          "quantity",
          "quantityPicked",
          "quantityShipped",
          "remaining",
          "isFullyPicked",
          "isPhysical",
          "onHand",
          "availableBins"
        ]
      },
      "WorkOrderPickDetailDto": {
        "type": "object",
        "properties": {
          "pickId": {
            "type": "string"
          },
          "salesOrderId": {
            "type": "string"
          },
          "salesOrderLineId": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "binId": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "string"
          },
          "stateCode": {
            "type": "string"
          },
          "binName": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "pickId",
          "salesOrderId",
          "salesOrderLineId",
          "productId",
          "quantity",
          "stateCode"
        ]
      },
      "WorkOrderPickingSummaryDto": {
        "type": "object",
        "properties": {
          "totalLines": {
            "type": "number"
          },
          "fullyPickedLines": {
            "type": "number"
          },
          "isFullyPicked": {
            "type": "boolean"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkOrderPickingLineDto"
            }
          },
          "picks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkOrderPickDetailDto"
            }
          }
        },
        "required": [
          "totalLines",
          "fullyPickedLines",
          "isFullyPicked",
          "lines",
          "picks"
        ]
      },
      "PickWorkOrderComponentDto": {
        "type": "object",
        "properties": {
          "binId": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          }
        },
        "required": [
          "binId",
          "quantity"
        ]
      },
      "DataSourceItemDto": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "slug",
          "name"
        ]
      },
      "SampleReportDto": {
        "type": "object",
        "properties": {
          "isMockData": {
            "type": "boolean"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "isMockData",
          "data"
        ]
      },
      "SampleRecordDto": {
        "type": "object",
        "properties": {
          "isMockData": {
            "type": "boolean"
          },
          "data": {
            "type": "object"
          }
        },
        "required": [
          "isMockData",
          "data"
        ]
      },
      "SystemLogResponseDto": {
        "type": "object",
        "properties": {
          "lines": {
            "description": "Array of log lines",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "lines"
        ]
      },
      "SystemVersionResponseDto": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "description": "API version number"
          },
          "apiBuildTime": {
            "type": "string",
            "description": "API build timestamp"
          },
          "nodeVersion": {
            "type": "string",
            "description": "Node.js version"
          },
          "osPlatform": {
            "type": "string",
            "description": "OS platform"
          },
          "osRelease": {
            "type": "string",
            "description": "OS release"
          }
        },
        "required": [
          "apiVersion",
          "apiBuildTime",
          "nodeVersion",
          "osPlatform",
          "osRelease"
        ]
      },
      "LocationResponseDto": {
        "type": "object",
        "properties": {
          "locationId": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "addressLine1": {
            "type": "string"
          },
          "addressLine2": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "stateOrProvince": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "locationId",
          "code",
          "name",
          "createdAt",
          "updatedAt"
        ]
      },
      "CreateLocationDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "addressLine1": {
            "type": "string"
          },
          "addressLine2": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "stateOrProvince": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "name"
        ]
      },
      "UpdateLocationDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "addressLine1": {
            "type": "string"
          },
          "addressLine2": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "stateOrProvince": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          }
        }
      },
      "CreateZoneDto": {
        "type": "object",
        "properties": {
          "locationId": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "locationId",
          "code",
          "name"
        ]
      },
      "ZoneResponseDto": {
        "type": "object",
        "properties": {
          "zoneId": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "zoneId",
          "locationId",
          "code",
          "name",
          "createdAt",
          "updatedAt"
        ]
      },
      "UpdateZoneDto": {
        "type": "object",
        "properties": {
          "locationId": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "CreateBinDto": {
        "type": "object",
        "properties": {
          "zoneId": {
            "type": "string",
            "format": "uuid"
          },
          "binNumber": {
            "type": "string"
          },
          "binType": {
            "type": "string",
            "enum": [
              "storage",
              "pick",
              "bulk",
              "staging",
              "quarantine",
              "in_transit",
              "wip"
            ]
          },
          "isConsignment": {
            "type": "boolean"
          },
          "isBonded": {
            "type": "boolean"
          },
          "isUnavailable": {
            "type": "boolean"
          }
        },
        "required": [
          "zoneId",
          "binNumber",
          "binType"
        ]
      },
      "BinResponseDto": {
        "type": "object",
        "properties": {
          "binId": {
            "type": "string"
          },
          "zoneId": {
            "type": "string"
          },
          "binNumber": {
            "type": "string"
          },
          "binType": {
            "type": "string"
          },
          "isConsignment": {
            "type": "boolean"
          },
          "isBonded": {
            "type": "boolean"
          },
          "isUnavailable": {
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "binId",
          "zoneId",
          "binNumber",
          "createdAt",
          "updatedAt"
        ]
      },
      "CreateBinBulkDto": {
        "type": "object",
        "properties": {
          "bins": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateBinDto"
            }
          }
        },
        "required": [
          "bins"
        ]
      },
      "UpdateBinDto": {
        "type": "object",
        "properties": {
          "zoneId": {
            "type": "string",
            "format": "uuid"
          },
          "binNumber": {
            "type": "string"
          },
          "binType": {
            "type": "string",
            "enum": [
              "storage",
              "pick",
              "bulk",
              "staging",
              "quarantine",
              "in_transit",
              "wip"
            ]
          },
          "isConsignment": {
            "type": "boolean"
          },
          "isBonded": {
            "type": "boolean"
          },
          "isUnavailable": {
            "type": "boolean"
          }
        }
      },
      "TestAbmConnectionDto": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string"
          },
          "database": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "port": {
            "type": "number",
            "minimum": 1,
            "maximum": 65535
          }
        },
        "required": [
          "host",
          "database",
          "username",
          "password"
        ]
      },
      "TestConnectionResultDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "preview": {
            "type": "object"
          }
        },
        "required": [
          "success",
          "message"
        ]
      },
      "TestOdooConnectionDto": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string"
          },
          "database": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "port": {
            "type": "number",
            "minimum": 1,
            "maximum": 65535
          }
        },
        "required": [
          "host",
          "database",
          "username",
          "password"
        ]
      },
      "ResumeStateDto": {
        "type": "object",
        "properties": {
          "completedTables": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "completedTables"
        ]
      },
      "DbConfigDto": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string"
          },
          "database": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "port": {
            "type": "number"
          }
        }
      },
      "ExecuteEltDto": {
        "type": "object",
        "properties": {
          "legacyInvoicesPaidBeforeDate": {
            "type": "string",
            "description": "If provided, all legacy invoices (sales and purchase) with a due date before this date will be considered paid."
          },
          "glCutoffMode": {
            "type": "string",
            "enum": [
              "start_of_month",
              "current_date"
            ],
            "description": "Cut-off date mode for General Ledger opening balances take-on (start_of_month or current_date).",
            "default": "start_of_month"
          },
          "dbConfig": {
            "$ref": "#/components/schemas/DbConfigDto"
          },
          "source": {
            "type": "string",
            "enum": [
              "abm",
              "odoo"
            ]
          },
          "resumeExtraction": {
            "type": "boolean"
          },
          "skipExtraction": {
            "type": "boolean"
          },
          "defaultLocationCode": {
            "type": "string"
          },
          "baseCurrency": {
            "type": "string"
          },
          "defaultTaxCategoryCode": {
            "type": "string"
          }
        }
      },
      "JobResultDto": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string"
          }
        },
        "required": [
          "jobId"
        ]
      },
      "ActiveJobDto": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "SuccessResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ]
      },
      "JobProgressDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "progress": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "logs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "status",
          "logs"
        ]
      },
      "SetupValidationDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "metrics": {
            "type": "object"
          },
          "dataCounts": {
            "type": "object"
          }
        },
        "required": [
          "status"
        ]
      },
      "ImportSummaryDto": {
        "type": "object",
        "properties": {
          "products": {
            "type": "number"
          },
          "customers": {
            "type": "number"
          },
          "orders": {
            "type": "number"
          }
        },
        "required": [
          "products",
          "customers",
          "orders"
        ]
      },
      "CsvMetadataDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "uniqueKey": {
            "type": "string"
          },
          "columns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "name",
          "uniqueKey",
          "columns"
        ]
      },
      "CreateGoodsReceivedLineDto": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string"
          },
          "quantityReceived": {
            "type": "string"
          },
          "purchaseOrderLineId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "productId",
          "quantityReceived"
        ]
      },
      "CreateGoodsReceivedDto": {
        "type": "object",
        "properties": {
          "goodsReceivedId": {
            "type": "string",
            "format": "uuid"
          },
          "vendorId": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "purchaseOrderId": {
            "type": "string",
            "format": "uuid"
          },
          "packingSlipNumber": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateGoodsReceivedLineDto"
            }
          }
        },
        "required": [
          "vendorId",
          "locationId",
          "lines"
        ]
      },
      "GoodsReceivedResponseDto": {
        "type": "object",
        "properties": {
          "goodsReceivedId": {
            "type": "string"
          },
          "receiptNumber": {
            "type": "string"
          },
          "vendorId": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "packingSlipNumber": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "stateCode": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string"
          },
          "modifiedOn": {
            "format": "date-time",
            "type": "string"
          },
          "vendorName": {
            "type": "string"
          },
          "vendorNumber": {
            "type": "string"
          },
          "locationName": {
            "type": "string"
          },
          "totalLines": {
            "type": "number"
          },
          "matchedLines": {
            "type": "number"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "goodsReceivedId",
          "receiptNumber",
          "vendorId",
          "locationId",
          "stateCode"
        ]
      },
      "GoodsReceivedLineResponseDto": {
        "type": "object",
        "properties": {
          "goodsReceivedLineId": {
            "type": "string"
          },
          "goodsReceivedId": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "purchaseOrderLineId": {
            "type": "string"
          },
          "purchaseOrderId": {
            "type": "string"
          },
          "quantityReceived": {
            "type": "string"
          },
          "matchStatus": {
            "type": "string"
          },
          "putawayStatus": {
            "type": "string"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string"
          },
          "modifiedOn": {
            "format": "date-time",
            "type": "string"
          },
          "receiptNumber": {
            "type": "string"
          },
          "packingSlipNumber": {
            "type": "string"
          },
          "vendorId": {
            "type": "string"
          },
          "vendorName": {
            "type": "string"
          },
          "vendorNumber": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "locationName": {
            "type": "string"
          },
          "productNumber": {
            "type": "string"
          },
          "productName": {
            "type": "string"
          },
          "orderNumber": {
            "type": "string"
          },
          "stateCode": {
            "type": "string"
          }
        },
        "required": [
          "goodsReceivedLineId",
          "goodsReceivedId",
          "productId",
          "quantityReceived",
          "matchStatus",
          "putawayStatus"
        ]
      },
      "UpdateGoodsReceivedDto": {
        "type": "object",
        "properties": {
          "vendorId": {
            "type": "string",
            "format": "uuid"
          },
          "locationId": {
            "type": "string",
            "format": "uuid"
          },
          "packingSlipNumber": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          }
        }
      },
      "CancelReceptionResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ]
      },
      "ResolveAllocationDto": {
        "type": "object",
        "properties": {
          "purchaseOrderLineId": {
            "type": "string"
          },
          "allocatedQuantity": {
            "type": "string"
          }
        },
        "required": [
          "purchaseOrderLineId"
        ]
      },
      "ResolveAllocationResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "splitLine": {
            "type": "object"
          }
        },
        "required": [
          "success"
        ]
      },
      "CreateMacroDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "macroType": {
            "type": "string"
          },
          "content": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "macroType",
          "content"
        ]
      },
      "MacroResponseDto": {
        "type": "object",
        "properties": {
          "macroId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "macroType": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string"
          },
          "modifiedOn": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "macroId",
          "name",
          "macroType",
          "content",
          "createdOn",
          "modifiedOn"
        ]
      },
      "UpdateMacroDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "macroType": {
            "type": "string"
          },
          "content": {
            "type": "string"
          }
        }
      },
      "UserResponseDto": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "tenantId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "userId",
          "username",
          "role",
          "isActive",
          "displayName",
          "email",
          "tenantId",
          "createdAt",
          "updatedAt"
        ]
      },
      "CreateUserDto": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "minLength": 2,
            "maxLength": 50,
            "pattern": "/^[a-zA-Z0-9_.-]+$/"
          },
          "password": {
            "type": "string",
            "minLength": 6,
            "maxLength": 72
          },
          "role": {
            "type": "string",
            "enum": [
              "admin",
              "viewer",
              "sales",
              "warehouse",
              "procurement",
              "finance"
            ]
          },
          "displayName": {
            "type": "string",
            "maxLength": 100
          },
          "email": {
            "type": "string",
            "maxLength": 255,
            "format": "email"
          }
        },
        "required": [
          "username",
          "password",
          "role"
        ]
      },
      "UpdateUserDto": {
        "type": "object",
        "properties": {
          "password": {
            "type": "string",
            "minLength": 6,
            "maxLength": 72
          },
          "role": {
            "type": "string",
            "enum": [
              "admin",
              "viewer",
              "sales",
              "warehouse",
              "procurement",
              "finance"
            ]
          },
          "displayName": {
            "type": "string",
            "maxLength": 100
          },
          "email": {
            "type": "string",
            "maxLength": 255,
            "format": "email"
          }
        }
      },
      "Reset2FaResponseDto": {
        "type": "object",
        "properties": {
          "reset": {
            "type": "boolean"
          }
        },
        "required": [
          "reset"
        ]
      },
      "DiscountMatrixResponseDto": {
        "type": "object",
        "properties": {
          "discountMatrixId": {
            "type": "string",
            "format": "uuid"
          },
          "customerGroupId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "customerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "productGroupId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "discountPercentage": {
            "type": "string"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "modifiedOn": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "discountMatrixId",
          "customerGroupId",
          "customerId",
          "productGroupId",
          "discountPercentage",
          "createdOn",
          "modifiedOn"
        ]
      },
      "ResolveDiscountRuleDto": {
        "type": "object",
        "properties": {
          "ownerType": {
            "type": "object"
          },
          "productGroupId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "discountPercentage": {
            "type": "string"
          }
        },
        "required": [
          "ownerType",
          "productGroupId",
          "discountPercentage"
        ]
      },
      "CreateDiscountMatrixDto": {
        "type": "object",
        "properties": {
          "customerGroupId": {
            "type": "string",
            "format": "uuid"
          },
          "customerId": {
            "type": "string",
            "format": "uuid"
          },
          "productGroupId": {
            "type": "string",
            "format": "uuid"
          },
          "discountPercentage": {
            "type": "string"
          }
        },
        "required": [
          "discountPercentage"
        ]
      },
      "UpdateDiscountMatrixDto": {
        "type": "object",
        "properties": {
          "discountPercentage": {
            "type": "string"
          }
        }
      },
      "DeleteDiscountMatrixResponseDto": {
        "type": "object",
        "properties": {
          "deleted": {
            "type": "boolean"
          }
        },
        "required": [
          "deleted"
        ]
      },
      "WebhookResponseDto": {
        "type": "object",
        "properties": {
          "webhookId": {
            "type": "string",
            "format": "uuid"
          },
          "targetUrl": {
            "type": "string"
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "secretKey": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "webhookId",
          "targetUrl",
          "eventTypes",
          "secretKey",
          "isActive",
          "createdOn"
        ]
      },
      "CreateWebhookDto": {
        "type": "object",
        "properties": {
          "targetUrl": {
            "type": "string",
            "format": "uri"
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "targetUrl",
          "eventTypes"
        ]
      },
      "UpdateWebhookDto": {
        "type": "object",
        "properties": {
          "targetUrl": {
            "type": "string",
            "format": "uri"
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "isActive": {
            "type": "boolean"
          }
        }
      },
      "DeleteWebhookResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ]
      },
      "ApiKeyResponseDto": {
        "type": "object",
        "properties": {
          "apiKeyId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "apiKeyId",
          "name",
          "prefix",
          "role",
          "createdOn"
        ]
      },
      "CreateApiKeyDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "description": "The Casbin role granted to this API key (e.g. agent, webhook)"
          }
        },
        "required": [
          "name",
          "role"
        ]
      },
      "ApiKeyCreatedResponseDto": {
        "type": "object",
        "properties": {
          "apiKeyId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "keyHash": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string"
          },
          "modifiedOn": {
            "format": "date-time",
            "type": "string"
          },
          "secretKey": {
            "type": "string"
          }
        },
        "required": [
          "apiKeyId",
          "name",
          "prefix",
          "role",
          "keyHash",
          "createdBy",
          "createdOn",
          "modifiedOn",
          "secretKey"
        ]
      },
      "ApiKeyFullResponseDto": {
        "type": "object",
        "properties": {
          "apiKeyId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "keyHash": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string"
          },
          "modifiedOn": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "apiKeyId",
          "name",
          "prefix",
          "role",
          "keyHash",
          "createdBy",
          "createdOn",
          "modifiedOn"
        ]
      },
      "PublishEventDto": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of event to publish (e.g. order.created)"
          },
          "payload": {
            "type": "object",
            "description": "The payload of the event"
          }
        },
        "required": [
          "type",
          "payload"
        ]
      },
      "PublishEventResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "outboxId": {
            "type": "string"
          }
        },
        "required": [
          "success",
          "outboxId"
        ]
      },
      "UserSettingsResponseDto": {
        "type": "object",
        "properties": {
          "dashboardConfig": {
            "type": "object"
          },
          "reportConfigs": {
            "type": "object"
          },
          "preferences": {
            "type": "object"
          }
        }
      },
      "UpdateUserSettingsDto": {
        "type": "object",
        "properties": {
          "dashboardConfig": {
            "type": "object",
            "description": "Dashboard configuration layout and pinned widgets"
          },
          "reportConfigs": {
            "type": "object",
            "description": "Saved report configurations and filters"
          },
          "preferences": {
            "type": "object",
            "description": "Generic UI preferences"
          }
        }
      },
      "ContactResponseDto": {
        "type": "object",
        "properties": {
          "contactId": {
            "type": "string"
          },
          "stateCode": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "fullName": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "mobile": {
            "type": "string",
            "nullable": true
          },
          "jobTitle": {
            "type": "string",
            "nullable": true
          },
          "primaryFor": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdOn": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "modifiedOn": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "contactId",
          "stateCode",
          "firstName",
          "lastName",
          "createdOn",
          "modifiedOn"
        ]
      },
      "CreateContactDto": {
        "type": "object",
        "properties": {
          "entityType": {
            "type": "string",
            "enum": [
              "customer",
              "actor",
              "project"
            ]
          },
          "entityId": {
            "type": "string",
            "format": "uuid"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "string",
            "pattern": "/^\\+?[0-9\\s\\-()]+$/"
          },
          "mobile": {
            "type": "string",
            "pattern": "/^\\+?[0-9\\s\\-()]+$/"
          },
          "jobTitle": {
            "type": "string"
          },
          "isPrimary": {
            "type": "boolean"
          },
          "primaryFor": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "projectRoles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "firstName",
          "lastName"
        ]
      },
      "UpdateContactDto": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "string",
            "pattern": "/^\\+?[0-9\\s\\-()]+$/"
          },
          "mobile": {
            "type": "string",
            "pattern": "/^\\+?[0-9\\s\\-()]+$/"
          },
          "jobTitle": {
            "type": "string"
          },
          "isPrimary": {
            "type": "boolean"
          },
          "primaryFor": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "projectRole": {
            "type": "string"
          }
        }
      },
      "CreateDeliveryAddressDto": {
        "type": "object",
        "properties": {
          "customerId": {
            "type": "string",
            "format": "uuid"
          },
          "addressName": {
            "type": "string"
          },
          "companyName": {
            "type": "string"
          },
          "recipientName": {
            "type": "string"
          },
          "recipientPhone": {
            "type": "string"
          },
          "addressLine1": {
            "type": "string"
          },
          "addressLine2": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true,
            "maxLength": 100
          },
          "stateOrProvince": {
            "type": "string",
            "nullable": true,
            "maxLength": 100
          },
          "postalCode": {
            "type": "string",
            "nullable": true,
            "maxLength": 50
          },
          "country": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          },
          "isPrimary": {
            "type": "boolean"
          }
        },
        "required": [
          "customerId",
          "addressLine1",
          "country"
        ]
      },
      "DeliveryAddressResponseDto": {
        "type": "object",
        "properties": {
          "deliveryAddressId": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "addressName": {
            "type": "string",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "nullable": true
          },
          "recipientName": {
            "type": "string",
            "nullable": true
          },
          "recipientPhone": {
            "type": "string",
            "nullable": true
          },
          "addressLine1": {
            "type": "string",
            "nullable": true
          },
          "addressLine2": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "stateOrProvince": {
            "type": "string",
            "nullable": true
          },
          "postalCode": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "isPrimary": {
            "type": "boolean"
          },
          "sourceId": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "modifiedOn": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "deliveryAddressId",
          "customerId",
          "addressLine1",
          "country",
          "isPrimary",
          "source"
        ]
      },
      "UpdateDeliveryAddressDto": {
        "type": "object",
        "properties": {
          "addressName": {
            "type": "string"
          },
          "companyName": {
            "type": "string"
          },
          "recipientName": {
            "type": "string"
          },
          "recipientPhone": {
            "type": "string"
          },
          "addressLine1": {
            "type": "string"
          },
          "addressLine2": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true,
            "maxLength": 100
          },
          "stateOrProvince": {
            "type": "string",
            "nullable": true,
            "maxLength": 100
          },
          "postalCode": {
            "type": "string",
            "nullable": true,
            "maxLength": 50
          },
          "country": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          },
          "isPrimary": {
            "type": "boolean"
          }
        }
      },
      "DeleteDeliveryAddressSuccessDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ]
      },
      "CreateActorDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "legalStatus": {
            "type": "string"
          },
          "headquartersAddressLine1": {
            "type": "string"
          },
          "headquartersAddressLine2": {
            "type": "string"
          },
          "headquartersCity": {
            "type": "string"
          },
          "headquartersStateOrProvince": {
            "type": "string"
          },
          "headquartersPostalCode": {
            "type": "string"
          },
          "headquartersCountry": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          },
          "telephone": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "businessNumber": {
            "type": "string"
          },
          "isTaxRegistered": {
            "type": "boolean"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "referralMode": {
            "type": "string"
          },
          "referredByActorId": {
            "type": "string",
            "format": "uuid"
          },
          "referredByContactId": {
            "type": "string",
            "format": "uuid"
          },
          "referralNote": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ]
      },
      "ActorNoteResponseDto": {
        "type": "object",
        "properties": {
          "noteId": {
            "type": "string",
            "format": "uuid"
          },
          "content": {
            "type": "string"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string"
          },
          "createdById": {
            "type": "string"
          },
          "createdBy": {
            "type": "object"
          }
        },
        "required": [
          "noteId",
          "content",
          "createdOn"
        ]
      },
      "ActorResponseDto": {
        "type": "object",
        "properties": {
          "actorId": {
            "type": "string",
            "format": "uuid"
          },
          "stateCode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "legalStatus": {
            "type": "string"
          },
          "headquartersAddressLine1": {
            "type": "string"
          },
          "headquartersAddressLine2": {
            "type": "string"
          },
          "headquartersCity": {
            "type": "string"
          },
          "headquartersStateOrProvince": {
            "type": "string"
          },
          "headquartersPostalCode": {
            "type": "string"
          },
          "headquartersCountry": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          },
          "telephone": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "businessNumber": {
            "type": "string"
          },
          "isTaxRegistered": {
            "type": "boolean"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string"
          },
          "modifiedOn": {
            "format": "date-time",
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActorNoteResponseDto"
            }
          },
          "actorContactLinks": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "referralMode": {
            "type": "string",
            "nullable": true
          },
          "referredByActorId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "referredByContactId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "referredByActorName": {
            "type": "string",
            "nullable": true
          },
          "referredByContactName": {
            "type": "string",
            "nullable": true
          },
          "referralNote": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "actorId",
          "stateCode",
          "name",
          "isTaxRegistered",
          "createdOn",
          "modifiedOn"
        ]
      },
      "UpdateActorDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "legalStatus": {
            "type": "string"
          },
          "headquartersAddressLine1": {
            "type": "string"
          },
          "headquartersAddressLine2": {
            "type": "string"
          },
          "headquartersCity": {
            "type": "string"
          },
          "headquartersStateOrProvince": {
            "type": "string"
          },
          "headquartersPostalCode": {
            "type": "string"
          },
          "headquartersCountry": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          },
          "telephone": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "businessNumber": {
            "type": "string"
          },
          "isTaxRegistered": {
            "type": "boolean"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "referralMode": {
            "type": "string"
          },
          "referredByActorId": {
            "type": "string",
            "format": "uuid"
          },
          "referredByContactId": {
            "type": "string",
            "format": "uuid"
          },
          "referralNote": {
            "type": "string"
          }
        }
      },
      "UpdateActorContactDto": {
        "type": "object",
        "properties": {
          "primaryFor": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "primaryFor"
        ]
      },
      "CreateActorContactDto": {
        "type": "object",
        "properties": {
          "contactId": {
            "type": "string",
            "format": "uuid"
          },
          "primaryFor": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "contactId"
        ]
      },
      "CreateActorNoteDto": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string"
          }
        },
        "required": [
          "content"
        ]
      },
      "CreateProjectDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "ownerId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "name",
          "type"
        ]
      },
      "ProjectNoteResponseDto": {
        "type": "object",
        "properties": {
          "noteId": {
            "type": "string",
            "format": "uuid"
          },
          "content": {
            "type": "string"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string"
          },
          "createdById": {
            "type": "string"
          },
          "createdBy": {
            "type": "object"
          }
        },
        "required": [
          "noteId",
          "content",
          "createdOn"
        ]
      },
      "ProjectResponseDto": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "format": "uuid"
          },
          "stateCode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string"
          },
          "modifiedOn": {
            "format": "date-time",
            "type": "string"
          },
          "ownerId": {
            "type": "string",
            "format": "uuid"
          },
          "owner": {
            "type": "object"
          },
          "notes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectNoteResponseDto"
            }
          },
          "projectActors": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "projectContacts": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "projectId",
          "stateCode",
          "name",
          "status",
          "type",
          "createdOn",
          "modifiedOn"
        ]
      },
      "UpdateProjectDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "ownerId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "CreateProjectNoteDto": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string"
          }
        },
        "required": [
          "content"
        ]
      },
      "CreateProjectContactDto": {
        "type": "object",
        "properties": {
          "contactId": {
            "type": "string",
            "format": "uuid"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "contactId"
        ]
      },
      "UpdateProjectContactDto": {
        "type": "object",
        "properties": {
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CreateProjectActorDto": {
        "type": "object",
        "properties": {
          "actorId": {
            "type": "string",
            "format": "uuid"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "actorId"
        ]
      },
      "UpdateProjectActorDto": {
        "type": "object",
        "properties": {
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CrmMapActorNodeDto": {
        "type": "object",
        "properties": {
          "actorId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          }
        },
        "required": [
          "actorId",
          "name"
        ]
      },
      "CrmMapContactNodeDto": {
        "type": "object",
        "properties": {
          "contactId": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          }
        },
        "required": [
          "contactId"
        ]
      },
      "CrmMapProjectNodeDto": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "projectId"
        ]
      },
      "CrmMapNodesDto": {
        "type": "object",
        "properties": {
          "actors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmMapActorNodeDto"
            }
          },
          "contacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmMapContactNodeDto"
            }
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmMapProjectNodeDto"
            }
          }
        },
        "required": [
          "actors",
          "contacts",
          "projects"
        ]
      },
      "CrmMapActorActorLinkDto": {
        "type": "object",
        "properties": {
          "sourceActorId": {
            "type": "string"
          },
          "targetActorId": {
            "type": "string"
          }
        },
        "required": [
          "sourceActorId",
          "targetActorId"
        ]
      },
      "CrmMapActorContactLinkDto": {
        "type": "object",
        "properties": {
          "actorId": {
            "type": "string"
          },
          "contactId": {
            "type": "string"
          },
          "primaryFor": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "actorId",
          "contactId"
        ]
      },
      "CrmMapProjectActorLinkDto": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string"
          },
          "actorId": {
            "type": "string"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "projectId",
          "actorId"
        ]
      },
      "CrmMapProjectContactLinkDto": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string"
          },
          "contactId": {
            "type": "string"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "projectId",
          "contactId"
        ]
      },
      "CrmMapEdgesDto": {
        "type": "object",
        "properties": {
          "actorActor": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmMapActorActorLinkDto"
            }
          },
          "actorContact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmMapActorContactLinkDto"
            }
          },
          "projectActor": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmMapProjectActorLinkDto"
            }
          },
          "projectContact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmMapProjectContactLinkDto"
            }
          },
          "referralActorActor": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmMapActorActorLinkDto"
            }
          },
          "referralContactActor": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmMapActorContactLinkDto"
            }
          }
        },
        "required": [
          "actorActor",
          "actorContact",
          "projectActor",
          "projectContact"
        ]
      },
      "CrmMapResponseDto": {
        "type": "object",
        "properties": {
          "nodes": {
            "$ref": "#/components/schemas/CrmMapNodesDto"
          },
          "edges": {
            "$ref": "#/components/schemas/CrmMapEdgesDto"
          }
        },
        "required": [
          "nodes",
          "edges"
        ]
      },
      "HelpTopicDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "order": {
            "type": "number"
          },
          "routes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "resource": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "fields": {
            "type": "object",
            "additionalProperties": true
          },
          "related": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "content": {
            "type": "string"
          },
          "filePath": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "content",
          "filePath"
        ]
      },
      "RelatedTopicDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "category": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "title"
        ]
      },
      "HelpContextResponseDto": {
        "type": "object",
        "properties": {
          "topic": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/HelpTopicDto"
              }
            ]
          },
          "matchedRoute": {
            "type": "string"
          },
          "relatedTopics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelatedTopicDto"
            }
          }
        },
        "required": [
          "relatedTopics"
        ]
      },
      "HelpTopicSummaryDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "order": {
            "type": "number"
          },
          "routes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "title",
          "category",
          "order",
          "routes",
          "tags"
        ]
      },
      "HelpSearchResultDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "snippet": {
            "type": "string"
          },
          "score": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "title",
          "category",
          "snippet",
          "score"
        ]
      }
    }
  }
}