{
  "openapi": "3.0.3",
  "info": {
    "title": "DecentroHR API",
    "version": "1"
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1/actions/org.chart": {
      "post": {
        "operationId": "org.chart",
        "summary": "Return the org chart as a tree — department hierarchy or reporting lines.",
        "x-permission": "org.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "departments",
                      "reporting"
                    ],
                    "default": "departments"
                  },
                  "companyId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/org.renameTenant": {
      "post": {
        "operationId": "org.renameTenant",
        "summary": "Rename the current organization.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/directory.listUsers": {
      "post": {
        "operationId": "directory.listUsers",
        "summary": "List the people in the current organization.",
        "x-permission": "employee.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "default": 50
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/company.create": {
      "post": {
        "operationId": "company.create",
        "summary": "Create a company.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "legalName": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "registrationNo": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "taxId": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "countryCode": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$"
                  },
                  "currency": {
                    "type": "string"
                  },
                  "timezone": {
                    "type": "string"
                  },
                  "fiscalYearStartMonth": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 12
                  },
                  "logoUrl": {
                    "type": "string",
                    "format": "uri"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/company.list": {
      "post": {
        "operationId": "company.list",
        "summary": "List companies.",
        "x-permission": "org.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/company.update": {
      "post": {
        "operationId": "company.update",
        "summary": "Update a company by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "legalName": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "registrationNo": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "taxId": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "countryCode": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$"
                  },
                  "currency": {
                    "type": "string"
                  },
                  "timezone": {
                    "type": "string"
                  },
                  "fiscalYearStartMonth": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 12
                  },
                  "logoUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/company.delete": {
      "post": {
        "operationId": "company.delete",
        "summary": "Delete a company by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/businessUnit.create": {
      "post": {
        "operationId": "businessUnit.create",
        "summary": "Create a businessUnit.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "companyId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 50
                  }
                },
                "required": [
                  "companyId",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/businessUnit.list": {
      "post": {
        "operationId": "businessUnit.list",
        "summary": "List business units.",
        "x-permission": "org.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/businessUnit.update": {
      "post": {
        "operationId": "businessUnit.update",
        "summary": "Update a businessUnit by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "companyId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/businessUnit.delete": {
      "post": {
        "operationId": "businessUnit.delete",
        "summary": "Delete a businessUnit by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/location.create": {
      "post": {
        "operationId": "location.create",
        "summary": "Create a location.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "companyId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "addressLine1": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "addressLine2": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "city": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "region": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "postalCode": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "countryCode": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$"
                  },
                  "timezone": {
                    "type": "string"
                  },
                  "latitude": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90
                  },
                  "longitude": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180
                  },
                  "isHeadquarters": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "companyId",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/location.list": {
      "post": {
        "operationId": "location.list",
        "summary": "List locations / branches.",
        "x-permission": "org.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/location.update": {
      "post": {
        "operationId": "location.update",
        "summary": "Update a location by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "companyId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "addressLine1": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "addressLine2": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "city": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "region": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "postalCode": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "countryCode": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$"
                  },
                  "timezone": {
                    "type": "string"
                  },
                  "latitude": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90
                  },
                  "longitude": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180
                  },
                  "isHeadquarters": {
                    "type": "boolean"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/location.delete": {
      "post": {
        "operationId": "location.delete",
        "summary": "Delete a location by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/costCenter.create": {
      "post": {
        "operationId": "costCenter.create",
        "summary": "Create a costCenter.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "companyId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 50
                  }
                },
                "required": [
                  "companyId",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/costCenter.list": {
      "post": {
        "operationId": "costCenter.list",
        "summary": "List cost centers.",
        "x-permission": "org.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/costCenter.update": {
      "post": {
        "operationId": "costCenter.update",
        "summary": "Update a costCenter by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "companyId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/costCenter.delete": {
      "post": {
        "operationId": "costCenter.delete",
        "summary": "Delete a costCenter by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/department.create": {
      "post": {
        "operationId": "department.create",
        "summary": "Create a department.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "companyId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "parentDepartmentId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "costCenterId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "headEmployeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "companyId",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/department.list": {
      "post": {
        "operationId": "department.list",
        "summary": "List departments.",
        "x-permission": "org.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/department.update": {
      "post": {
        "operationId": "department.update",
        "summary": "Update a department by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "companyId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "parentDepartmentId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "costCenterId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "headEmployeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/department.delete": {
      "post": {
        "operationId": "department.delete",
        "summary": "Delete a department by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/team.create": {
      "post": {
        "operationId": "team.create",
        "summary": "Create a team.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "departmentId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "leadEmployeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "departmentId",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/team.list": {
      "post": {
        "operationId": "team.list",
        "summary": "List teams.",
        "x-permission": "org.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/team.update": {
      "post": {
        "operationId": "team.update",
        "summary": "Update a team by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "departmentId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "leadEmployeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/team.delete": {
      "post": {
        "operationId": "team.delete",
        "summary": "Delete a team by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/designation.create": {
      "post": {
        "operationId": "designation.create",
        "summary": "Create a designation.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 50
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/designation.list": {
      "post": {
        "operationId": "designation.list",
        "summary": "List designations.",
        "x-permission": "org.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/designation.update": {
      "post": {
        "operationId": "designation.update",
        "summary": "Update a designation by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/designation.delete": {
      "post": {
        "operationId": "designation.delete",
        "summary": "Delete a designation by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/grade.create": {
      "post": {
        "operationId": "grade.create",
        "summary": "Create a grade.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "level": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/grade.list": {
      "post": {
        "operationId": "grade.list",
        "summary": "List grades.",
        "x-permission": "org.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/grade.update": {
      "post": {
        "operationId": "grade.update",
        "summary": "Update a grade by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "level": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/grade.delete": {
      "post": {
        "operationId": "grade.delete",
        "summary": "Delete a grade by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeCategory.create": {
      "post": {
        "operationId": "employeeCategory.create",
        "summary": "Create a employeeCategory.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeCategory.list": {
      "post": {
        "operationId": "employeeCategory.list",
        "summary": "List employee categories.",
        "x-permission": "org.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeCategory.update": {
      "post": {
        "operationId": "employeeCategory.update",
        "summary": "Update a employeeCategory by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeCategory.delete": {
      "post": {
        "operationId": "employeeCategory.delete",
        "summary": "Delete a employeeCategory by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employmentType.create": {
      "post": {
        "operationId": "employmentType.create",
        "summary": "Create a employmentType.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employmentType.list": {
      "post": {
        "operationId": "employmentType.list",
        "summary": "List employment types.",
        "x-permission": "org.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employmentType.update": {
      "post": {
        "operationId": "employmentType.update",
        "summary": "Update a employmentType by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employmentType.delete": {
      "post": {
        "operationId": "employmentType.delete",
        "summary": "Delete a employmentType by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/holidayCalendar.create": {
      "post": {
        "operationId": "holidayCalendar.create",
        "summary": "Create a holidayCalendar.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "companyId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "countryCode": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/holidayCalendar.list": {
      "post": {
        "operationId": "holidayCalendar.list",
        "summary": "List holiday calendars.",
        "x-permission": "org.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/holidayCalendar.update": {
      "post": {
        "operationId": "holidayCalendar.update",
        "summary": "Update a holidayCalendar by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "companyId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "countryCode": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/holidayCalendar.delete": {
      "post": {
        "operationId": "holidayCalendar.delete",
        "summary": "Delete a holidayCalendar by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/holiday.create": {
      "post": {
        "operationId": "holiday.create",
        "summary": "Create a holiday.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "calendarId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "day": {
                    "type": "string",
                    "format": "date"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "isOptional": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "calendarId",
                  "day",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/holiday.list": {
      "post": {
        "operationId": "holiday.list",
        "summary": "List holidays.",
        "x-permission": "org.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/holiday.update": {
      "post": {
        "operationId": "holiday.update",
        "summary": "Update a holiday by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "calendarId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "day": {
                    "type": "string",
                    "format": "date"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "isOptional": {
                    "type": "boolean"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/holiday.delete": {
      "post": {
        "operationId": "holiday.delete",
        "summary": "Delete a holiday by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/hrPolicy.create": {
      "post": {
        "operationId": "hrPolicy.create",
        "summary": "Create a hrPolicy.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "category": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "content": {
                    "type": "string"
                  },
                  "version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "effectiveDate": {
                    "type": "string",
                    "format": "date"
                  }
                },
                "required": [
                  "title"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/hrPolicy.list": {
      "post": {
        "operationId": "hrPolicy.list",
        "summary": "List HR policies.",
        "x-permission": "org.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/hrPolicy.update": {
      "post": {
        "operationId": "hrPolicy.update",
        "summary": "Update a hrPolicy by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "category": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "content": {
                    "type": "string"
                  },
                  "version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "effectiveDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/hrPolicy.delete": {
      "post": {
        "operationId": "hrPolicy.delete",
        "summary": "Delete a hrPolicy by id.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employee.create": {
      "post": {
        "operationId": "employee.create",
        "summary": "Create an employee record.",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "companyId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "employeeCode": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "userId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "firstName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "middleName": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "lastName": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "displayName": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "avatarUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "avatarFileId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "dateOfBirth": {
                    "type": "string",
                    "format": "date"
                  },
                  "gender": {
                    "type": "string",
                    "enum": [
                      "male",
                      "female",
                      "non_binary",
                      "prefer_not_to_say",
                      "other"
                    ]
                  },
                  "maritalStatus": {
                    "type": "string",
                    "enum": [
                      "single",
                      "married",
                      "divorced",
                      "widowed",
                      "separated",
                      "other"
                    ]
                  },
                  "nationality": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$"
                  },
                  "personalEmail": {
                    "type": "string",
                    "format": "email"
                  },
                  "workEmail": {
                    "type": "string",
                    "format": "email"
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "departmentId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "designationId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "gradeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "employmentTypeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "employeeCategoryId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "locationId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "managerId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "probation",
                      "on_leave",
                      "terminated",
                      "resigned",
                      "suspended"
                    ]
                  },
                  "joiningDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "confirmationDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "probationEndDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "exitDate": {
                    "type": "string",
                    "format": "date"
                  }
                },
                "required": [
                  "companyId",
                  "firstName"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employee.update": {
      "post": {
        "operationId": "employee.update",
        "summary": "Update an employee record by id.",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "companyId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "employeeCode": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "userId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "firstName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "middleName": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "lastName": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "displayName": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "avatarUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "avatarFileId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "dateOfBirth": {
                    "type": "string",
                    "format": "date"
                  },
                  "gender": {
                    "type": "string",
                    "enum": [
                      "male",
                      "female",
                      "non_binary",
                      "prefer_not_to_say",
                      "other"
                    ]
                  },
                  "maritalStatus": {
                    "type": "string",
                    "enum": [
                      "single",
                      "married",
                      "divorced",
                      "widowed",
                      "separated",
                      "other"
                    ]
                  },
                  "nationality": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$"
                  },
                  "personalEmail": {
                    "type": "string",
                    "format": "email"
                  },
                  "workEmail": {
                    "type": "string",
                    "format": "email"
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "departmentId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "designationId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "gradeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "employmentTypeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "employeeCategoryId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "locationId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "managerId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "probation",
                      "on_leave",
                      "terminated",
                      "resigned",
                      "suspended"
                    ]
                  },
                  "joiningDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "confirmationDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "probationEndDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "exitDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employee.list": {
      "post": {
        "operationId": "employee.list",
        "summary": "List / search employees.",
        "x-permission": "employee.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 50
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  },
                  "companyId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "departmentId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "managerId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "status": {
                    "type": "string"
                  },
                  "search": {
                    "type": "string",
                    "maxLength": 120
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employee.get": {
      "post": {
        "operationId": "employee.get",
        "summary": "Get one employee by id.",
        "x-permission": "employee.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeAddress.create": {
      "post": {
        "operationId": "employeeAddress.create",
        "summary": "Create a employeeAddress.",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "current",
                      "permanent",
                      "other"
                    ]
                  },
                  "addressLine1": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "addressLine2": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "city": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "region": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "postalCode": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "countryCode": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$"
                  },
                  "isPrimary": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "employeeId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeAddress.list": {
      "post": {
        "operationId": "employeeAddress.list",
        "summary": "List employee addresses.",
        "x-permission": "employee.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeAddress.update": {
      "post": {
        "operationId": "employeeAddress.update",
        "summary": "Update a employeeAddress by id.",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "current",
                      "permanent",
                      "other"
                    ]
                  },
                  "addressLine1": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "addressLine2": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "city": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "region": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "postalCode": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "countryCode": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$"
                  },
                  "isPrimary": {
                    "type": "boolean"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeAddress.delete": {
      "post": {
        "operationId": "employeeAddress.delete",
        "summary": "Delete a employeeAddress by id.",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeContact.create": {
      "post": {
        "operationId": "employeeContact.create",
        "summary": "Create a employeeContact.",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "relationship": {
                    "type": "string",
                    "maxLength": 60
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  }
                },
                "required": [
                  "employeeId",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeContact.list": {
      "post": {
        "operationId": "employeeContact.list",
        "summary": "List emergency contacts.",
        "x-permission": "employee.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeContact.update": {
      "post": {
        "operationId": "employeeContact.update",
        "summary": "Update a employeeContact by id.",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "relationship": {
                    "type": "string",
                    "maxLength": 60
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeContact.delete": {
      "post": {
        "operationId": "employeeContact.delete",
        "summary": "Delete a employeeContact by id.",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeDependent.create": {
      "post": {
        "operationId": "employeeDependent.create",
        "summary": "Create a employeeDependent.",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "relationship": {
                    "type": "string",
                    "maxLength": 60
                  },
                  "dateOfBirth": {
                    "type": "string",
                    "format": "date"
                  }
                },
                "required": [
                  "employeeId",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeDependent.list": {
      "post": {
        "operationId": "employeeDependent.list",
        "summary": "List dependents.",
        "x-permission": "employee.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeDependent.update": {
      "post": {
        "operationId": "employeeDependent.update",
        "summary": "Update a employeeDependent by id.",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "relationship": {
                    "type": "string",
                    "maxLength": 60
                  },
                  "dateOfBirth": {
                    "type": "string",
                    "format": "date"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeDependent.delete": {
      "post": {
        "operationId": "employeeDependent.delete",
        "summary": "Delete a employeeDependent by id.",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/reportingLine.create": {
      "post": {
        "operationId": "reportingLine.create",
        "summary": "Add a matrix / dotted-line reporting relationship.",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "managerId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "matrix",
                      "functional",
                      "project"
                    ]
                  }
                },
                "required": [
                  "employeeId",
                  "managerId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/reportingLine.list": {
      "post": {
        "operationId": "reportingLine.list",
        "summary": "List matrix reporting lines for an employee or manager.",
        "x-permission": "employee.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "managerId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/reportingLine.delete": {
      "post": {
        "operationId": "reportingLine.delete",
        "summary": "Remove a matrix reporting line by id.",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeBankAccount.create": {
      "post": {
        "operationId": "employeeBankAccount.create",
        "summary": "Add a bank account for an employee (account number stored encrypted).",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "accountHolderName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "bankName": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "branch": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "accountNumber": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 64
                  },
                  "routing": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "currency": {
                    "type": "string"
                  },
                  "isPrimary": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "employeeId",
                  "accountHolderName",
                  "accountNumber"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeBankAccount.list": {
      "post": {
        "operationId": "employeeBankAccount.list",
        "summary": "List an employee's bank accounts (account numbers masked).",
        "x-permission": "employee.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "employeeId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeBankAccount.delete": {
      "post": {
        "operationId": "employeeBankAccount.delete",
        "summary": "Delete an employee bank account by id.",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeDocument.create": {
      "post": {
        "operationId": "employeeDocument.create",
        "summary": "Attach a document (passport, visa, PAN, etc.) to an employee.",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "passport",
                      "visa",
                      "driving_license",
                      "national_id",
                      "pan",
                      "aadhaar",
                      "uan",
                      "pf",
                      "esi",
                      "ssn",
                      "tax_id",
                      "offer_letter",
                      "other"
                    ]
                  },
                  "documentNumber": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "fileUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "fileId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "issuingCountry": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$"
                  },
                  "issueDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "expiryDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "supersedesDocumentId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "employeeId",
                  "type"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeDocument.list": {
      "post": {
        "operationId": "employeeDocument.list",
        "summary": "List an employee's documents (numbers masked).",
        "x-permission": "employee.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "employeeId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeDocument.verify": {
      "post": {
        "operationId": "employeeDocument.verify",
        "summary": "Mark an employee document as verified.",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeDocument.reject": {
      "post": {
        "operationId": "employeeDocument.reject",
        "summary": "Reject an employee document (approval decision).",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeDocument.update": {
      "post": {
        "operationId": "employeeDocument.update",
        "summary": "Update a document's metadata (not its number — delete + recreate to change that).",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "type": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "fileUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "issuingCountry": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$"
                  },
                  "issueDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "expiryDate": {
                    "type": "string",
                    "format": "date"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employmentEvent.list": {
      "post": {
        "operationId": "employmentEvent.list",
        "summary": "List an employee's employment history events.",
        "x-permission": "employee.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "employeeId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeCompensation.create": {
      "post": {
        "operationId": "employeeCompensation.create",
        "summary": "Record an employee's compensation (supersedes the current record + logs a revision).",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "effectiveDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "currency": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "frequency": {
                    "type": "string",
                    "enum": [
                      "hourly",
                      "weekly",
                      "biweekly",
                      "monthly",
                      "annual"
                    ]
                  },
                  "componentType": {
                    "type": "string",
                    "enum": [
                      "gross",
                      "basic",
                      "ctc",
                      "net",
                      "allowance",
                      "bonus"
                    ]
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "employeeId",
                  "effectiveDate",
                  "currency",
                  "amount"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeCompensation.list": {
      "post": {
        "operationId": "employeeCompensation.list",
        "summary": "List an employee's compensation history.",
        "x-permission": "employee.read.pii",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "employeeId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeSignature.create": {
      "post": {
        "operationId": "employeeSignature.create",
        "summary": "Create a employeeSignature.",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "fileUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "purpose": {
                    "type": "string",
                    "enum": [
                      "offer",
                      "policy_ack",
                      "general"
                    ]
                  }
                },
                "required": [
                  "employeeId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeSignature.list": {
      "post": {
        "operationId": "employeeSignature.list",
        "summary": "List employee signatures.",
        "x-permission": "employee.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeSignature.update": {
      "post": {
        "operationId": "employeeSignature.update",
        "summary": "Update a employeeSignature by id.",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "fileUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "purpose": {
                    "type": "string",
                    "enum": [
                      "offer",
                      "policy_ack",
                      "general"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeSignature.delete": {
      "post": {
        "operationId": "employeeSignature.delete",
        "summary": "Delete a employeeSignature by id.",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeTax.set": {
      "post": {
        "operationId": "employeeTax.set",
        "summary": "Set an employee's tax profile (tax number stored encrypted).",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "countryCode": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$"
                  },
                  "regime": {
                    "type": "string",
                    "maxLength": 60
                  },
                  "taxNumber": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "details": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "employeeId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeTax.get": {
      "post": {
        "operationId": "employeeTax.get",
        "summary": "Get an employee's tax profile (tax number masked).",
        "x-permission": "employee.read.pii",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "employeeId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeTaxCode.set": {
      "post": {
        "operationId": "employeeTaxCode.set",
        "summary": "Add/replace a statutory tax code (PAN, SSN, …) — type validated per country, value encrypted.",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "codeType": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "value": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "countryCode": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$"
                  }
                },
                "required": [
                  "employeeId",
                  "codeType",
                  "value"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeTaxCode.list": {
      "post": {
        "operationId": "employeeTaxCode.list",
        "summary": "List an employee's statutory tax codes (values masked).",
        "x-permission": "employee.read.pii",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "employeeId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employee.promote": {
      "post": {
        "operationId": "employee.promote",
        "summary": "Record a promotion: change grade/designation and log the event.",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "gradeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "designationId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "effectiveDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employee.demote": {
      "post": {
        "operationId": "employee.demote",
        "summary": "Record a demotion: change grade/designation and log the event.",
        "x-permission": "employee.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "gradeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "designationId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "effectiveDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/hrPolicy.acknowledge": {
      "post": {
        "operationId": "hrPolicy.acknowledge",
        "summary": "Acknowledge an HR policy (records the version you accepted).",
        "x-permission": "ess.self",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policyId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "policyId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/hrPolicy.acknowledgements": {
      "post": {
        "operationId": "hrPolicy.acknowledgements",
        "summary": "List who has acknowledged a policy.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policyId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "policyId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/ess.myPolicies": {
      "post": {
        "operationId": "ess.myPolicies",
        "summary": "List HR policies with my acknowledgement status.",
        "x-permission": "ess.self",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/approval.approve": {
      "post": {
        "operationId": "approval.approve",
        "summary": "Approve the approval request currently assigned to you.",
        "x-permission": "approval.act",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "comment": {
                    "type": "string",
                    "maxLength": 1000
                  }
                },
                "required": [
                  "requestId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/approval.reject": {
      "post": {
        "operationId": "approval.reject",
        "summary": "Reject the approval request currently assigned to you.",
        "x-permission": "approval.act",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "comment": {
                    "type": "string",
                    "maxLength": 1000
                  }
                },
                "required": [
                  "requestId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/approval.listMine": {
      "post": {
        "operationId": "approval.listMine",
        "summary": "List approval requests awaiting my decision.",
        "x-permission": "approval.act",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/approval.cancel": {
      "post": {
        "operationId": "approval.cancel",
        "summary": "Withdraw a pending approval request you raised.",
        "x-permission": "approval.act",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "requestId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/approval.get": {
      "post": {
        "operationId": "approval.get",
        "summary": "Get an approval request with its steps (requester or assigned approvers only).",
        "x-permission": "approval.act",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "requestId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/approvalFlow.set": {
      "post": {
        "operationId": "approvalFlow.set",
        "summary": "Configure the approval chain for a flow (ordered steps).",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "steps": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "manager",
                            "skip_level",
                            "role",
                            "user"
                          ]
                        },
                        "role": {
                          "type": "string",
                          "maxLength": 60
                        },
                        "userId": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 10
                  }
                },
                "required": [
                  "key",
                  "steps"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/approvalFlow.get": {
      "post": {
        "operationId": "approvalFlow.get",
        "summary": "Get a flow's configured approval chain.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  }
                },
                "required": [
                  "key"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/approvalFlow.list": {
      "post": {
        "operationId": "approvalFlow.list",
        "summary": "List configured approval flows.",
        "x-permission": "org.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/leaveType.create": {
      "post": {
        "operationId": "leaveType.create",
        "summary": "Create a leaveType.",
        "x-permission": "leave.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "isPaid": {
                    "type": "boolean"
                  },
                  "requiresApproval": {
                    "type": "boolean"
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "day",
                      "hour"
                    ]
                  },
                  "accrualMethod": {
                    "type": "string",
                    "enum": [
                      "none",
                      "monthly",
                      "annual"
                    ]
                  },
                  "accrualAmount": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "maxBalance": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "allowCarryForward": {
                    "type": "boolean"
                  },
                  "carryForwardMax": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "allowNegativeBalance": {
                    "type": "boolean"
                  },
                  "genderRestriction": {
                    "type": "string",
                    "enum": [
                      "male",
                      "female"
                    ]
                  },
                  "encashable": {
                    "type": "boolean"
                  },
                  "isCompOff": {
                    "type": "boolean"
                  },
                  "sandwichPolicy": {
                    "type": "boolean"
                  },
                  "colorHex": {
                    "type": "string",
                    "maxLength": 9
                  },
                  "isActive": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "code",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/leaveType.list": {
      "post": {
        "operationId": "leaveType.list",
        "summary": "List leave types.",
        "x-permission": "leave.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/leaveType.update": {
      "post": {
        "operationId": "leaveType.update",
        "summary": "Update a leaveType by id.",
        "x-permission": "leave.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "isPaid": {
                    "type": "boolean"
                  },
                  "requiresApproval": {
                    "type": "boolean"
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "day",
                      "hour"
                    ]
                  },
                  "accrualMethod": {
                    "type": "string",
                    "enum": [
                      "none",
                      "monthly",
                      "annual"
                    ]
                  },
                  "accrualAmount": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "maxBalance": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "allowCarryForward": {
                    "type": "boolean"
                  },
                  "carryForwardMax": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "allowNegativeBalance": {
                    "type": "boolean"
                  },
                  "genderRestriction": {
                    "type": "string",
                    "enum": [
                      "male",
                      "female"
                    ]
                  },
                  "encashable": {
                    "type": "boolean"
                  },
                  "isCompOff": {
                    "type": "boolean"
                  },
                  "sandwichPolicy": {
                    "type": "boolean"
                  },
                  "colorHex": {
                    "type": "string",
                    "maxLength": 9
                  },
                  "isActive": {
                    "type": "boolean"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/leaveType.delete": {
      "post": {
        "operationId": "leaveType.delete",
        "summary": "Delete a leaveType by id.",
        "x-permission": "leave.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/leaveBlackout.create": {
      "post": {
        "operationId": "leaveBlackout.create",
        "summary": "Create a leaveBlackout.",
        "x-permission": "leave.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "leaveTypeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "isActive": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "startDate",
                  "endDate"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/leaveBlackout.list": {
      "post": {
        "operationId": "leaveBlackout.list",
        "summary": "List leave blackouts.",
        "x-permission": "leave.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/leaveBlackout.update": {
      "post": {
        "operationId": "leaveBlackout.update",
        "summary": "Update a leaveBlackout by id.",
        "x-permission": "leave.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "leaveTypeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "isActive": {
                    "type": "boolean"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/leaveBlackout.delete": {
      "post": {
        "operationId": "leaveBlackout.delete",
        "summary": "Delete a leaveBlackout by id.",
        "x-permission": "leave.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/leaveBalance.allocate": {
      "post": {
        "operationId": "leaveBalance.allocate",
        "summary": "Allocate (grant) leave balance to an employee for a year.",
        "x-permission": "leave.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "leaveTypeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "year": {
                    "type": "integer",
                    "minimum": 2000,
                    "maximum": 2100
                  },
                  "amount": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  }
                },
                "required": [
                  "employeeId",
                  "leaveTypeId",
                  "year",
                  "amount"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/leaveBalance.list": {
      "post": {
        "operationId": "leaveBalance.list",
        "summary": "List an employee's leave balances.",
        "x-permission": "leave.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "year": {
                    "type": "integer"
                  }
                },
                "required": [
                  "employeeId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/leave.request": {
      "post": {
        "operationId": "leave.request",
        "summary": "Request leave (for yourself, or for an employee if you manage leave).",
        "x-permission": "leave.request",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "leaveTypeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "halfDay": {
                    "type": "boolean"
                  },
                  "halfDaySession": {
                    "type": "string",
                    "enum": [
                      "first",
                      "second"
                    ]
                  },
                  "hours": {
                    "type": "number",
                    "minimum": 0.5,
                    "maximum": 24
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "leaveTypeId",
                  "startDate",
                  "endDate"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/leave.cancel": {
      "post": {
        "operationId": "leave.cancel",
        "summary": "Cancel a pending leave request.",
        "x-permission": "leave.request",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "leaveRequestId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "leaveRequestId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/leave.revoke": {
      "post": {
        "operationId": "leave.revoke",
        "summary": "Revoke an approved leave and return the consumed days.",
        "x-permission": "leave.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "leaveRequestId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "leaveRequestId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/leave.list": {
      "post": {
        "operationId": "leave.list",
        "summary": "List leave requests (optionally filtered by employee/status).",
        "x-permission": "leave.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "status": {
                    "type": "string"
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 50
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/leave.calendar": {
      "post": {
        "operationId": "leave.calendar",
        "summary": "Approved leave overlapping a date range (who's off when).",
        "x-permission": "leave.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "startDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date"
                  }
                },
                "required": [
                  "startDate",
                  "endDate"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/leave.analytics": {
      "post": {
        "operationId": "leave.analytics",
        "summary": "Leave utilization per type + request breakdown for a year (self unless you can manage leave).",
        "x-permission": "leave.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "year": {
                    "type": "integer",
                    "minimum": 2000,
                    "maximum": 2100
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "year"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/compOff.grant": {
      "post": {
        "operationId": "compOff.grant",
        "summary": "Grant compensatory-off days to an employee (into a comp-off leave type).",
        "x-permission": "leave.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "leaveTypeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "days": {
                    "type": "number",
                    "minimum": 0.5,
                    "maximum": 30
                  },
                  "workedDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "expiryDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 300
                  }
                },
                "required": [
                  "employeeId",
                  "leaveTypeId",
                  "days",
                  "workedDate"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/compOff.list": {
      "post": {
        "operationId": "compOff.list",
        "summary": "List comp-off grants (self unless you can manage leave).",
        "x-permission": "leave.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/leave.encash": {
      "post": {
        "operationId": "leave.encash",
        "summary": "Request to encash unused leave (routes through approval; balance settled at payroll).",
        "x-permission": "leave.request",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "leaveTypeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "year": {
                    "type": "integer",
                    "minimum": 2000,
                    "maximum": 2100
                  },
                  "days": {
                    "type": "number",
                    "minimum": 0.5,
                    "maximum": 365
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "leaveTypeId",
                  "year",
                  "days"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/leaveEncashment.list": {
      "post": {
        "operationId": "leaveEncashment.list",
        "summary": "List leave-encashment requests (self unless you can manage leave).",
        "x-permission": "leave.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftGroup.create": {
      "post": {
        "operationId": "shiftGroup.create",
        "summary": "Create a shiftGroup.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 50
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftGroup.list": {
      "post": {
        "operationId": "shiftGroup.list",
        "summary": "List shift groups.",
        "x-permission": "attendance.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftGroup.update": {
      "post": {
        "operationId": "shiftGroup.update",
        "summary": "Update a shiftGroup by id.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftGroup.delete": {
      "post": {
        "operationId": "shiftGroup.delete",
        "summary": "Delete a shiftGroup by id.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shift.create": {
      "post": {
        "operationId": "shift.create",
        "summary": "Create a shift.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "groupId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "fixed",
                      "flexible",
                      "night",
                      "rotational",
                      "split"
                    ]
                  },
                  "startTime": {
                    "type": "string",
                    "pattern": "^\\d{2}:\\d{2}$"
                  },
                  "endTime": {
                    "type": "string",
                    "pattern": "^\\d{2}:\\d{2}$"
                  },
                  "breakMinutes": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 600
                  },
                  "workHours": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "isNightShift": {
                    "type": "boolean"
                  },
                  "isActive": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "code",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shift.list": {
      "post": {
        "operationId": "shift.list",
        "summary": "List shifts.",
        "x-permission": "attendance.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shift.update": {
      "post": {
        "operationId": "shift.update",
        "summary": "Update a shift by id.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "groupId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "fixed",
                      "flexible",
                      "night",
                      "rotational",
                      "split"
                    ]
                  },
                  "startTime": {
                    "type": "string",
                    "pattern": "^\\d{2}:\\d{2}$"
                  },
                  "endTime": {
                    "type": "string",
                    "pattern": "^\\d{2}:\\d{2}$"
                  },
                  "breakMinutes": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 600
                  },
                  "workHours": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "isNightShift": {
                    "type": "boolean"
                  },
                  "isActive": {
                    "type": "boolean"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shift.delete": {
      "post": {
        "operationId": "shift.delete",
        "summary": "Delete a shift by id.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftSegment.create": {
      "post": {
        "operationId": "shiftSegment.create",
        "summary": "Create a shiftSegment.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shiftId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "seq": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20
                  },
                  "startTime": {
                    "type": "string",
                    "pattern": "^\\d{2}:\\d{2}$"
                  },
                  "endTime": {
                    "type": "string",
                    "pattern": "^\\d{2}:\\d{2}$"
                  }
                },
                "required": [
                  "shiftId",
                  "startTime",
                  "endTime"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftSegment.list": {
      "post": {
        "operationId": "shiftSegment.list",
        "summary": "List shift segments.",
        "x-permission": "attendance.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  },
                  "shiftId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftSegment.update": {
      "post": {
        "operationId": "shiftSegment.update",
        "summary": "Update a shiftSegment by id.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "shiftId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "seq": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20
                  },
                  "startTime": {
                    "type": "string",
                    "pattern": "^\\d{2}:\\d{2}$"
                  },
                  "endTime": {
                    "type": "string",
                    "pattern": "^\\d{2}:\\d{2}$"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftSegment.delete": {
      "post": {
        "operationId": "shiftSegment.delete",
        "summary": "Delete a shiftSegment by id.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftAssignment.create": {
      "post": {
        "operationId": "shiftAssignment.create",
        "summary": "Create a shiftAssignment.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "shiftId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date"
                  }
                },
                "required": [
                  "employeeId",
                  "shiftId",
                  "startDate"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftAssignment.list": {
      "post": {
        "operationId": "shiftAssignment.list",
        "summary": "List shift assignments.",
        "x-permission": "attendance.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "shiftId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftAssignment.update": {
      "post": {
        "operationId": "shiftAssignment.update",
        "summary": "Update a shiftAssignment by id.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "shiftId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftAssignment.delete": {
      "post": {
        "operationId": "shiftAssignment.delete",
        "summary": "Delete a shiftAssignment by id.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/geofence.create": {
      "post": {
        "operationId": "geofence.create",
        "summary": "Create a geofence.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "locationId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "latitude": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90
                  },
                  "longitude": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180
                  },
                  "radiusMeters": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100000
                  },
                  "isActive": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "locationId",
                  "name",
                  "latitude",
                  "longitude"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/geofence.list": {
      "post": {
        "operationId": "geofence.list",
        "summary": "List geofences.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  },
                  "locationId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/geofence.update": {
      "post": {
        "operationId": "geofence.update",
        "summary": "Update a geofence by id.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "locationId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "latitude": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90
                  },
                  "longitude": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180
                  },
                  "radiusMeters": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100000
                  },
                  "isActive": {
                    "type": "boolean"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/geofence.delete": {
      "post": {
        "operationId": "geofence.delete",
        "summary": "Delete a geofence by id.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/nfcTag.create": {
      "post": {
        "operationId": "nfcTag.create",
        "summary": "Create a nfcTag.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "locationId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "tagId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "isActive": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "locationId",
                  "tagId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/nfcTag.list": {
      "post": {
        "operationId": "nfcTag.list",
        "summary": "List NFC tags.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  },
                  "locationId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/nfcTag.update": {
      "post": {
        "operationId": "nfcTag.update",
        "summary": "Update a nfcTag by id.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "locationId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "tagId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "isActive": {
                    "type": "boolean"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/nfcTag.delete": {
      "post": {
        "operationId": "nfcTag.delete",
        "summary": "Delete a nfcTag by id.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/attendanceQrCode.issue": {
      "post": {
        "operationId": "attendanceQrCode.issue",
        "summary": "Issue a QR code for a site (returns the code to render as a QR).",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "locationId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "locationId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/attendanceQrCode.revoke": {
      "post": {
        "operationId": "attendanceQrCode.revoke",
        "summary": "Deactivate a site QR code.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/attendance.checkIn": {
      "post": {
        "operationId": "attendance.checkIn",
        "summary": "Check in (server time + optional GPS/QR/NFC; geofence enforced if configured).",
        "x-permission": "attendance.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "lat": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90
                  },
                  "lng": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "web",
                      "mobile"
                    ]
                  },
                  "qrCode": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "nfcTagId": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/attendance.checkOut": {
      "post": {
        "operationId": "attendance.checkOut",
        "summary": "Check out (geofence enforced if configured).",
        "x-permission": "attendance.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "lat": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90
                  },
                  "lng": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "web",
                      "mobile"
                    ]
                  },
                  "qrCode": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "nfcTagId": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/attendance.list": {
      "post": {
        "operationId": "attendance.list",
        "summary": "List attendance records for an employee / date range.",
        "x-permission": "attendance.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 60
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/attendance.calendar": {
      "post": {
        "operationId": "attendance.calendar",
        "summary": "Per-day attendance calendar (roster + actuals + approved leave) for an employee.",
        "x-permission": "attendance.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date"
                  }
                },
                "required": [
                  "startDate",
                  "endDate"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/attendance.overtimeReport": {
      "post": {
        "operationId": "attendance.overtimeReport",
        "summary": "Worked + overtime minutes per employee over a period (all employees for managers, self otherwise).",
        "x-permission": "attendance.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 500,
                    "default": 200
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "required": [
                  "startDate",
                  "endDate"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/attendance.correct": {
      "post": {
        "operationId": "attendance.correct",
        "summary": "Request a correction to an attendance record.",
        "x-permission": "attendance.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "requestedCheckInAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "requestedCheckOutAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "workDate"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/overtime.request": {
      "post": {
        "operationId": "overtime.request",
        "summary": "Request overtime approval for a date.",
        "x-permission": "attendance.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "hours": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "workDate",
                  "hours"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftSchedule.assign": {
      "post": {
        "operationId": "shiftSchedule.assign",
        "summary": "Roster a shift to an employee on a date.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "workDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "shiftId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 300
                  }
                },
                "required": [
                  "employeeId",
                  "workDate",
                  "shiftId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/openShift.post": {
      "post": {
        "operationId": "openShift.post",
        "summary": "Post an OPEN shift (unassigned) that employees can bid on.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "shiftId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 300
                  }
                },
                "required": [
                  "workDate",
                  "shiftId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftSchedule.cancel": {
      "post": {
        "operationId": "shiftSchedule.cancel",
        "summary": "Cancel a rostered shift by id.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftSchedule.list": {
      "post": {
        "operationId": "shiftSchedule.list",
        "summary": "List the roster (self unless you can manage attendance).",
        "x-permission": "attendance.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "openOnly": {
                    "type": "boolean"
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftSwap.request": {
      "post": {
        "operationId": "shiftSwap.request",
        "summary": "Request to swap one of your rostered shifts with a colleague's.",
        "x-permission": "attendance.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fromScheduleId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "toScheduleId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 300
                  }
                },
                "required": [
                  "fromScheduleId",
                  "toScheduleId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftSwap.respond": {
      "post": {
        "operationId": "shiftSwap.respond",
        "summary": "Accept or decline a shift-swap request addressed to you.",
        "x-permission": "attendance.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "swapId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "decision": {
                    "type": "string",
                    "enum": [
                      "accept",
                      "decline"
                    ]
                  }
                },
                "required": [
                  "swapId",
                  "decision"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftSwap.cancel": {
      "post": {
        "operationId": "shiftSwap.cancel",
        "summary": "Cancel a swap you requested (before it has been accepted).",
        "x-permission": "attendance.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "swapId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "swapId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftSwap.list": {
      "post": {
        "operationId": "shiftSwap.list",
        "summary": "List shift swaps that involve you (or all, if you can manage attendance).",
        "x-permission": "attendance.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 60
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftBid.place": {
      "post": {
        "operationId": "shiftBid.place",
        "summary": "Bid on an open rostered shift.",
        "x-permission": "attendance.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "scheduleId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 300
                  }
                },
                "required": [
                  "scheduleId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftBid.withdraw": {
      "post": {
        "operationId": "shiftBid.withdraw",
        "summary": "Withdraw your bid on an open shift.",
        "x-permission": "attendance.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bidId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "bidId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftBid.award": {
      "post": {
        "operationId": "shiftBid.award",
        "summary": "Award an open shift to one of its bidders.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bidId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "bidId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/shiftBid.list": {
      "post": {
        "operationId": "shiftBid.list",
        "summary": "List bids for an open shift (manager) or your own bids.",
        "x-permission": "attendance.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "scheduleId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/rotationPattern.create": {
      "post": {
        "operationId": "rotationPattern.create",
        "summary": "Create a rotationPattern.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 50
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/rotationPattern.list": {
      "post": {
        "operationId": "rotationPattern.list",
        "summary": "List rotation patterns.",
        "x-permission": "attendance.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/rotationPattern.update": {
      "post": {
        "operationId": "rotationPattern.update",
        "summary": "Update a rotationPattern by id.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/rotationPattern.delete": {
      "post": {
        "operationId": "rotationPattern.delete",
        "summary": "Delete a rotationPattern by id.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/rotationStep.create": {
      "post": {
        "operationId": "rotationStep.create",
        "summary": "Create a rotationStep.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "patternId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "seq": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 60
                  },
                  "shiftId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "patternId",
                  "seq"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/rotationStep.list": {
      "post": {
        "operationId": "rotationStep.list",
        "summary": "List rotation steps.",
        "x-permission": "attendance.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  },
                  "patternId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/rotationStep.update": {
      "post": {
        "operationId": "rotationStep.update",
        "summary": "Update a rotationStep by id.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "patternId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "seq": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 60
                  },
                  "shiftId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/rotationStep.delete": {
      "post": {
        "operationId": "rotationStep.delete",
        "summary": "Delete a rotationStep by id.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/rotationAssignment.create": {
      "post": {
        "operationId": "rotationAssignment.create",
        "summary": "Create a rotationAssignment.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "patternId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date"
                  }
                },
                "required": [
                  "employeeId",
                  "patternId",
                  "startDate"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/rotationAssignment.list": {
      "post": {
        "operationId": "rotationAssignment.list",
        "summary": "List rotation assignments.",
        "x-permission": "attendance.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "patternId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/rotationAssignment.update": {
      "post": {
        "operationId": "rotationAssignment.update",
        "summary": "Update a rotationAssignment by id.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "patternId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/rotationAssignment.delete": {
      "post": {
        "operationId": "rotationAssignment.delete",
        "summary": "Delete a rotationAssignment by id.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/roster.generate": {
      "post": {
        "operationId": "roster.generate",
        "summary": "Auto-generate the roster for a date range from rotation patterns. mode 'fill' adds missing days (idempotent); 'replace' re-stamps this generator's own rows so a pattern edit propagates.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "startDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "fill",
                      "replace"
                    ]
                  },
                  "allowPast": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "startDate",
                  "endDate"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/attendanceDevice.register": {
      "post": {
        "operationId": "attendanceDevice.register",
        "summary": "Register a biometric/punch device. Returns the device key once — store it; only the hash is kept.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "serial": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "locationId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/attendanceDevice.list": {
      "post": {
        "operationId": "attendanceDevice.list",
        "summary": "List registered devices (never exposes the key).",
        "x-permission": "attendance.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/attendanceDevice.deactivate": {
      "post": {
        "operationId": "attendanceDevice.deactivate",
        "summary": "Deactivate a device (its key stops working).",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/biometricEnrollment.create": {
      "post": {
        "operationId": "biometricEnrollment.create",
        "summary": "Create a biometricEnrollment.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "bioId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "deviceId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "isActive": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "employeeId",
                  "bioId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/biometricEnrollment.list": {
      "post": {
        "operationId": "biometricEnrollment.list",
        "summary": "List biometric enrollments.",
        "x-permission": "attendance.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/biometricEnrollment.update": {
      "post": {
        "operationId": "biometricEnrollment.update",
        "summary": "Update a biometricEnrollment by id.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "bioId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "deviceId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "isActive": {
                    "type": "boolean"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/biometricEnrollment.delete": {
      "post": {
        "operationId": "biometricEnrollment.delete",
        "summary": "Delete a biometricEnrollment by id.",
        "x-permission": "attendance.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/faceEnrollment.enroll": {
      "post": {
        "operationId": "faceEnrollment.enroll",
        "summary": "Enroll YOUR OWN face descriptor (128-d, extracted client-side by face-api.js).",
        "x-permission": "attendance.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "descriptor": {
                    "type": "array",
                    "items": {
                      "type": "number"
                    },
                    "minItems": 128,
                    "maxItems": 128
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 80
                  }
                },
                "required": [
                  "descriptor"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/faceEnrollment.list": {
      "post": {
        "operationId": "faceEnrollment.list",
        "summary": "List face enrollments (self unless you can manage attendance). Never returns the template.",
        "x-permission": "attendance.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/faceEnrollment.delete": {
      "post": {
        "operationId": "faceEnrollment.delete",
        "summary": "Delete a face enrollment (your own, or any if you can manage attendance).",
        "x-permission": "attendance.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/attendance.faceCheckIn": {
      "post": {
        "operationId": "attendance.faceCheckIn",
        "summary": "Check in via face recognition (self only; verifies your face + enforces geofence).",
        "x-permission": "attendance.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "descriptor": {
                    "type": "array",
                    "items": {
                      "type": "number"
                    },
                    "minItems": 128,
                    "maxItems": 128
                  },
                  "lat": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90
                  },
                  "lng": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180
                  }
                },
                "required": [
                  "descriptor"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/attendance.faceCheckOut": {
      "post": {
        "operationId": "attendance.faceCheckOut",
        "summary": "Check out via face recognition (self only; verifies your face + enforces geofence).",
        "x-permission": "attendance.write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "descriptor": {
                    "type": "array",
                    "items": {
                      "type": "number"
                    },
                    "minItems": 128,
                    "maxItems": 128
                  },
                  "lat": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90
                  },
                  "lng": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180
                  }
                },
                "required": [
                  "descriptor"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/salaryStructure.create": {
      "post": {
        "operationId": "salaryStructure.create",
        "summary": "Create a salaryStructure.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "currency": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 3
                  },
                  "isActive": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/salaryStructure.list": {
      "post": {
        "operationId": "salaryStructure.list",
        "summary": "List salary structures.",
        "x-permission": "payroll.read",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/salaryStructure.update": {
      "post": {
        "operationId": "salaryStructure.update",
        "summary": "Update a salaryStructure by id.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "currency": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 3
                  },
                  "isActive": {
                    "type": "boolean"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/salaryStructure.delete": {
      "post": {
        "operationId": "salaryStructure.delete",
        "summary": "Delete a salaryStructure by id.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/salaryComponent.create": {
      "post": {
        "operationId": "salaryComponent.create",
        "summary": "Create a salaryComponent.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "structureId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "earning",
                      "deduction",
                      "employer_contribution"
                    ]
                  },
                  "calcType": {
                    "type": "string",
                    "enum": [
                      "flat",
                      "percent_of_basic",
                      "percent_of_ctc",
                      "percent_of_gross",
                      "formula"
                    ]
                  },
                  "value": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "formula": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "taxable": {
                    "type": "boolean"
                  },
                  "pfApplicable": {
                    "type": "boolean"
                  },
                  "esiApplicable": {
                    "type": "boolean"
                  },
                  "gratuityApplicable": {
                    "type": "boolean"
                  },
                  "pensionApplicable": {
                    "type": "boolean"
                  },
                  "niApplicable": {
                    "type": "boolean"
                  },
                  "recurring": {
                    "type": "boolean"
                  },
                  "seq": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200
                  }
                },
                "required": [
                  "structureId",
                  "name",
                  "code",
                  "kind"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/salaryComponent.list": {
      "post": {
        "operationId": "salaryComponent.list",
        "summary": "List salary components.",
        "x-permission": "payroll.read",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  },
                  "structureId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/salaryComponent.update": {
      "post": {
        "operationId": "salaryComponent.update",
        "summary": "Update a salaryComponent by id.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "structureId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "earning",
                      "deduction",
                      "employer_contribution"
                    ]
                  },
                  "calcType": {
                    "type": "string",
                    "enum": [
                      "flat",
                      "percent_of_basic",
                      "percent_of_ctc",
                      "percent_of_gross",
                      "formula"
                    ]
                  },
                  "value": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "formula": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "taxable": {
                    "type": "boolean"
                  },
                  "pfApplicable": {
                    "type": "boolean"
                  },
                  "esiApplicable": {
                    "type": "boolean"
                  },
                  "gratuityApplicable": {
                    "type": "boolean"
                  },
                  "pensionApplicable": {
                    "type": "boolean"
                  },
                  "niApplicable": {
                    "type": "boolean"
                  },
                  "recurring": {
                    "type": "boolean"
                  },
                  "seq": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/salaryComponent.delete": {
      "post": {
        "operationId": "salaryComponent.delete",
        "summary": "Delete a salaryComponent by id.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeSalary.create": {
      "post": {
        "operationId": "employeeSalary.create",
        "summary": "Create a employeeSalary.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "structureId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "ctc": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "grossMonthly": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "currency": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 3
                  },
                  "effectiveDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "isCurrent": {
                    "type": "boolean"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 300
                  }
                },
                "required": [
                  "employeeId",
                  "structureId",
                  "ctc",
                  "effectiveDate"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeSalary.list": {
      "post": {
        "operationId": "employeeSalary.list",
        "summary": "List employee salary assignments.",
        "x-permission": "payroll.read",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeSalary.update": {
      "post": {
        "operationId": "employeeSalary.update",
        "summary": "Update a employeeSalary by id.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "structureId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "ctc": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "grossMonthly": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "currency": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 3
                  },
                  "effectiveDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "isCurrent": {
                    "type": "boolean"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeSalary.delete": {
      "post": {
        "operationId": "employeeSalary.delete",
        "summary": "Delete a employeeSalary by id.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeStatutory.create": {
      "post": {
        "operationId": "employeeStatutory.create",
        "summary": "Create a employeeStatutory.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "pfEnabled": {
                    "type": "boolean"
                  },
                  "pfOnActualWage": {
                    "type": "boolean"
                  },
                  "vpfPercent": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "internationalWorker": {
                    "type": "boolean"
                  },
                  "esiEnabled": {
                    "type": "boolean"
                  },
                  "ptState": {
                    "type": "string",
                    "maxLength": 10
                  },
                  "lwfState": {
                    "type": "string",
                    "maxLength": 10
                  }
                },
                "required": [
                  "employeeId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeStatutory.list": {
      "post": {
        "operationId": "employeeStatutory.list",
        "summary": "List employee statutory config.",
        "x-permission": "payroll.read",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeStatutory.update": {
      "post": {
        "operationId": "employeeStatutory.update",
        "summary": "Update a employeeStatutory by id.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "pfEnabled": {
                    "type": "boolean"
                  },
                  "pfOnActualWage": {
                    "type": "boolean"
                  },
                  "vpfPercent": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "internationalWorker": {
                    "type": "boolean"
                  },
                  "esiEnabled": {
                    "type": "boolean"
                  },
                  "ptState": {
                    "type": "string",
                    "maxLength": 10
                  },
                  "lwfState": {
                    "type": "string",
                    "maxLength": 10
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeStatutory.delete": {
      "post": {
        "operationId": "employeeStatutory.delete",
        "summary": "Delete a employeeStatutory by id.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeTaxDeclaration.create": {
      "post": {
        "operationId": "employeeTaxDeclaration.create",
        "summary": "Create a employeeTaxDeclaration.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "taxYear": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}$"
                  },
                  "s80c": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "s80ccd1b": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "s80ccd2": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "s80d": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "s24b": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "s80e": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "s80g": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "s80tta": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "s80ttb": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "ltaExempt": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "hraRentPaidAnnual": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "hraMetro": {
                    "type": "boolean"
                  },
                  "otherIncome": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "prevEmployerIncome": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "prevEmployerTds": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  }
                },
                "required": [
                  "employeeId",
                  "taxYear"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeTaxDeclaration.list": {
      "post": {
        "operationId": "employeeTaxDeclaration.list",
        "summary": "List employee tax declarations.",
        "x-permission": "payroll.read",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeTaxDeclaration.update": {
      "post": {
        "operationId": "employeeTaxDeclaration.update",
        "summary": "Update a employeeTaxDeclaration by id.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "taxYear": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}$"
                  },
                  "s80c": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "s80ccd1b": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "s80ccd2": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "s80d": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "s24b": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "s80e": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "s80g": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "s80tta": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "s80ttb": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "ltaExempt": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "hraRentPaidAnnual": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "hraMetro": {
                    "type": "boolean"
                  },
                  "otherIncome": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "prevEmployerIncome": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "prevEmployerTds": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeTaxDeclaration.delete": {
      "post": {
        "operationId": "employeeTaxDeclaration.delete",
        "summary": "Delete a employeeTaxDeclaration by id.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeLoan.create": {
      "post": {
        "operationId": "employeeLoan.create",
        "summary": "Create a employeeLoan.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "loanType": {
                    "type": "string",
                    "enum": [
                      "loan",
                      "advance"
                    ]
                  },
                  "principal": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "outstanding": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "installment": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "currency": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 3
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 300
                  }
                },
                "required": [
                  "employeeId",
                  "principal",
                  "installment"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeLoan.list": {
      "post": {
        "operationId": "employeeLoan.list",
        "summary": "List employee loans/advances.",
        "x-permission": "payroll.read",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 100
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "status": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeLoan.update": {
      "post": {
        "operationId": "employeeLoan.update",
        "summary": "Update a employeeLoan by id.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "loanType": {
                    "type": "string",
                    "enum": [
                      "loan",
                      "advance"
                    ]
                  },
                  "principal": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "outstanding": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "installment": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "currency": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 3
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/employeeLoan.delete": {
      "post": {
        "operationId": "employeeLoan.delete",
        "summary": "Delete a employeeLoan by id.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/payroll.createRun": {
      "post": {
        "operationId": "payroll.createRun",
        "summary": "Create a payroll run for a company + period (draft).",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "companyId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "periodStart": {
                    "type": "string",
                    "format": "date"
                  },
                  "periodEnd": {
                    "type": "string",
                    "format": "date"
                  },
                  "payDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "runType": {
                    "type": "string",
                    "enum": [
                      "regular",
                      "offcycle",
                      "fnf"
                    ]
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "companyId",
                  "periodStart",
                  "periodEnd"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/payroll.calculate": {
      "post": {
        "operationId": "payroll.calculate",
        "summary": "Calculate (preview) all payslips for a run — recalc-safe, no ledger posting yet.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "runId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "runId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/payroll.approve": {
      "post": {
        "operationId": "payroll.approve",
        "summary": "Approve a calculated run (maker-checker) — records the approver; required before finalize.",
        "x-permission": "payroll.approve",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "runId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "runId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/payroll.finalize": {
      "post": {
        "operationId": "payroll.finalize",
        "summary": "Post an APPROVED run to the hash-chained ledger and lock it (immutable).",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "runId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "runId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/payroll.listRuns": {
      "post": {
        "operationId": "payroll.listRuns",
        "summary": "List payroll runs.",
        "x-permission": "payroll.read",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "companyId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 50
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/payroll.addRunInput": {
      "post": {
        "operationId": "payroll.addRunInput",
        "summary": "Add an ad-hoc earning (bonus/incentive/variable pay) or deduction (garnishment) line to a draft/preview run. Recalculate afterwards.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "runId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "earning",
                      "deduction"
                    ]
                  },
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "amount": {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  },
                  "taxable": {
                    "type": "boolean"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 300
                  }
                },
                "required": [
                  "runId",
                  "employeeId",
                  "kind",
                  "code",
                  "name",
                  "amount"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/payroll.removeRunInput": {
      "post": {
        "operationId": "payroll.removeRunInput",
        "summary": "Remove an ad-hoc run input line (only while the run is draft/preview).",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/payroll.listRunInputs": {
      "post": {
        "operationId": "payroll.listRunInputs",
        "summary": "List ad-hoc input lines for a run.",
        "x-permission": "payroll.read",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "runId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "runId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/payroll.computeArrears": {
      "post": {
        "operationId": "payroll.computeArrears",
        "summary": "Compute retro/arrears for an employee: the delta of the current (as-of-period) salary vs what was actually paid in prior locked runs, staged as ARREARS earning input(s) on a draft/preview run.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "runId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "fromPeriodStart": {
                    "type": "string",
                    "format": "date"
                  }
                },
                "required": [
                  "runId",
                  "employeeId",
                  "fromPeriodStart"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/payroll.computeFnf": {
      "post": {
        "operationId": "payroll.computeFnf",
        "summary": "Stage full & final settlement for a leaver on an fnf run: statutory gratuity + approved leave encashment as earning inputs. Calculate then prorates salary to the exit date and recovers the full loan outstanding; add notice-pay/dues via addRunInput.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "runId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "exitReason": {
                    "type": "string",
                    "enum": [
                      "resignation",
                      "termination",
                      "retirement",
                      "death",
                      "disability"
                    ]
                  }
                },
                "required": [
                  "runId",
                  "employeeId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/payroll.generatePayslips": {
      "post": {
        "operationId": "payroll.generatePayslips",
        "summary": "Generate + store PDF payslips for every payslip in a finalized (locked) run.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "runId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "runId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/payslip.getPdfUrl": {
      "post": {
        "operationId": "payslip.getPdfUrl",
        "summary": "Get a presigned URL to download a payslip PDF (your own unless you can manage payroll).",
        "x-permission": "payroll.read",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payslipId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "payslipId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/payroll.bankAdvice": {
      "post": {
        "operationId": "payroll.bankAdvice",
        "summary": "Generate the bank-advice payout file (NEFT CSV or NACH fixed-width) for a finalized run. No money moves — this is an export.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "runId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "neft",
                      "nach"
                    ],
                    "default": "neft"
                  }
                },
                "required": [
                  "runId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/payroll.statutoryExport": {
      "post": {
        "operationId": "payroll.statutoryExport",
        "summary": "Generate a statutory return file for a finalized run (PF ECR, ESI, TDS 24Q, PT, LWF) — stored to S3, returns a file id. Validate the exact format against the current government utility before filing.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "runId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "pf_ecr",
                      "esi",
                      "tds_24q",
                      "pt",
                      "lwf"
                    ]
                  }
                },
                "required": [
                  "runId",
                  "type"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/payroll.register": {
      "post": {
        "operationId": "payroll.register",
        "summary": "Payroll register for a run: every payslip with earnings/deductions/employer breakdown + cost-to-company and grand totals.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "runId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "runId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/payroll.variance": {
      "post": {
        "operationId": "payroll.variance",
        "summary": "Per-employee gross/deduction/net deltas between two runs (same company + currency), plus joiners and leavers.",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "currentRunId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "priorRunId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "currentRunId",
                  "priorRunId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/payroll.complianceReport": {
      "post": {
        "operationId": "payroll.complianceReport",
        "summary": "Statutory compliance rollup for a FINALIZED run — per-employee amounts + totals for PF (ECR), ESI, Professional Tax, or TDS (Form 24Q).",
        "x-permission": "payroll.manage",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "runId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "statute": {
                    "type": "string",
                    "enum": [
                      "pf",
                      "esi",
                      "pt",
                      "lwf",
                      "tds"
                    ]
                  }
                },
                "required": [
                  "runId",
                  "statute"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/payroll.ytd": {
      "post": {
        "operationId": "payroll.ytd",
        "summary": "Year-to-date payroll totals for an employee in a tax year (your own unless you can manage payroll).",
        "x-permission": "payroll.read",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "taxYear": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}$"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/payslip.list": {
      "post": {
        "operationId": "payslip.list",
        "summary": "List payslips (your own unless you can manage payroll).",
        "x-permission": "payroll.read",
        "x-entitlement": "module.payroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "runId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "employeeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/ess.myProfile": {
      "post": {
        "operationId": "ess.myProfile",
        "summary": "Get my own employee profile.",
        "x-permission": "ess.self",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/ess.updateMyProfile": {
      "post": {
        "operationId": "ess.updateMyProfile",
        "summary": "Update my own contact details.",
        "x-permission": "ess.self",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phone": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "personalEmail": {
                    "type": "string",
                    "format": "email"
                  },
                  "displayName": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "avatarFileId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/ess.myLeaveBalances": {
      "post": {
        "operationId": "ess.myLeaveBalances",
        "summary": "List my leave balances.",
        "x-permission": "ess.self",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "year": {
                    "type": "integer"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/ess.myLeaveRequests": {
      "post": {
        "operationId": "ess.myLeaveRequests",
        "summary": "List my leave requests.",
        "x-permission": "ess.self",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "default": 50
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/ess.myAttendance": {
      "post": {
        "operationId": "ess.myAttendance",
        "summary": "List my recent attendance records.",
        "x-permission": "ess.self",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 60
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/ess.myDocuments": {
      "post": {
        "operationId": "ess.myDocuments",
        "summary": "List my documents (numbers masked).",
        "x-permission": "ess.self",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/ess.myApprovals": {
      "post": {
        "operationId": "ess.myApprovals",
        "summary": "List approval requests awaiting my decision.",
        "x-permission": "ess.self",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/file.requestUpload": {
      "post": {
        "operationId": "file.requestUpload",
        "summary": "Get a presigned URL to upload a file directly to storage.",
        "x-permission": "file.use",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "purpose": {
                    "type": "string",
                    "enum": [
                      "avatar",
                      "document",
                      "policy",
                      "payslip",
                      "bank_advice",
                      "statutory",
                      "other"
                    ]
                  },
                  "contentType": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "filename": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "purpose",
                  "contentType",
                  "filename"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/file.confirmUpload": {
      "post": {
        "operationId": "file.confirmUpload",
        "summary": "Confirm a file finished uploading.",
        "x-permission": "file.use",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fileId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "fileId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/file.getUrl": {
      "post": {
        "operationId": "file.getUrl",
        "summary": "Get a presigned URL to download a file.",
        "x-permission": "file.use",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fileId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "fileId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/notification.list": {
      "post": {
        "operationId": "notification.list",
        "summary": "List my notifications (newest first).",
        "x-permission": "ess.self",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "unreadOnly": {
                    "type": "boolean"
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "default": 50
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/notification.markRead": {
      "post": {
        "operationId": "notification.markRead",
        "summary": "Mark one of my notifications as read.",
        "x-permission": "ess.self",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/meta.enums": {
      "post": {
        "operationId": "meta.enums",
        "summary": "Return all system enum options (for populating dropdowns).",
        "x-permission": "org.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/meta.taxConfig": {
      "post": {
        "operationId": "meta.taxConfig",
        "summary": "Tax regimes + statutory code types for a country (renders the tax form).",
        "x-permission": "org.read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "countryCode": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2
                  }
                },
                "required": [
                  "countryCode"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/gdpr.exportUser": {
      "post": {
        "operationId": "gdpr.exportUser",
        "summary": "Export all personal data held for a user (GDPR right of access).",
        "x-permission": "gdpr.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "userId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    },
    "/v1/actions/gdpr.eraseUser": {
      "post": {
        "operationId": "gdpr.eraseUser",
        "summary": "Erase a user's personal data (GDPR right to erasure) — anonymizes and revokes access.",
        "x-permission": "gdpr.manage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "userId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Plan does not include this feature"
          },
          "403": {
            "description": "Missing permission"
          },
          "409": {
            "description": "Idempotency-Key conflict"
          }
        }
      }
    }
  }
}
