{
  "baseUrl": "https://api.kontocloud.mk",
  "operations": [
    {
      "handler": "addon::mine",
      "method": "GET",
      "path": "/api/account/ai-package",
      "id": "get_account_ai_package",
      "source": "crates/kc-api/src/addon.rs",
      "pathParams": [],
      "query": {
        "$ref": "#/$defs/api::addon::BillingScope"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AiPackageOrder"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "ai_package_orders",
          "signature": "async fn ai_package_orders (& self) -> Result < Vec < AiPackageOrder > >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "AiPackageOrder",
                    "name": "AiPackageOrder",
                    "text": "AiPackageOrder"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < AiPackageOrder >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < AiPackageOrder > >"
          }
        },
        {
          "name": "organization_ai_orders",
          "signature": "async fn organization_ai_orders (& self , tid : TenantId) -> Result < Vec < AiPackageOrder > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "AiPackageOrder",
                    "name": "AiPackageOrder",
                    "text": "AiPackageOrder"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < AiPackageOrder >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < AiPackageOrder > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "addon::allowance",
      "method": "GET",
      "path": "/api/account/ai-package/allowance",
      "id": "get_account_ai_package_allowance",
      "source": "crates/kc-api/src/addon.rs",
      "pathParams": [],
      "query": {
        "$ref": "#/$defs/api::addon::BillingScope"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AiDocumentAllowance"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "ai_document_allowance",
          "signature": "async fn ai_document_allowance (& self) -> Result < AiDocumentAllowance >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AiDocumentAllowance",
                "name": "AiDocumentAllowance",
                "text": "AiDocumentAllowance"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AiDocumentAllowance >"
          }
        },
        {
          "name": "organization_ai_allowance",
          "signature": "async fn organization_ai_allowance (& self , tid : TenantId) -> Result < AiDocumentAllowance >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AiDocumentAllowance",
                "name": "AiDocumentAllowance",
                "text": "AiDocumentAllowance"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AiDocumentAllowance >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "addon::download",
      "method": "GET",
      "path": "/api/account/ai-package/{id}/invoice",
      "id": "get_account_ai_package_id_invoice",
      "source": "crates/kc-api/src/addon.rs",
      "pathParams": [
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/pdf",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "ai_package_invoice",
          "signature": "async fn ai_package_invoice (& self , id : i64) -> Result < Vec < u8 > >",
          "params": [
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < u8 > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::device_start",
      "method": "POST",
      "path": "/api/auth/device",
      "id": "post_auth_device",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/DeviceLoginRequest"
      },
      "auth": "public",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/DeviceLoginStart"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "device_login_start",
          "signature": "async fn device_login_start (& self , r : & DeviceLoginRequest) -> Result < DeviceLoginStart >",
          "params": [
            {
              "pattern": "r",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "DeviceLoginRequest",
                    "name": "DeviceLoginRequest",
                    "text": "DeviceLoginRequest"
                  }
                ],
                "name": "reference",
                "text": "& DeviceLoginRequest"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "DeviceLoginStart",
                "name": "DeviceLoginStart",
                "text": "DeviceLoginStart"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < DeviceLoginStart >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::device_poll",
      "method": "POST",
      "path": "/api/auth/device/poll",
      "id": "post_auth_device_poll",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/DeviceCode"
      },
      "auth": "public",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/DeviceLoginPoll"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "device_login_poll",
          "signature": "async fn device_login_poll (& mut self , device_code : & str) -> Result < DeviceLoginPoll >",
          "params": [
            {
              "pattern": "device_code",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "DeviceLoginPoll",
                "name": "DeviceLoginPoll",
                "text": "DeviceLoginPoll"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < DeviceLoginPoll >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "email_verify_wait",
      "method": "GET",
      "path": "/api/auth/email-verification",
      "id": "get_auth_email_verification",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "integer",
          "format": "i32"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "email_verification_wait",
          "signature": "async fn email_verification_wait (& self) -> Result < i32 >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [],
                "base": "i32",
                "name": "i32",
                "text": "i32"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < i32 >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "email_verify_request",
      "method": "POST",
      "path": "/api/auth/email-verification",
      "id": "post_auth_email_verification",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 202,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AuthCode"
        },
        "statuses": [
          202
        ]
      },
      "rust": [
        {
          "name": "request_email_verification",
          "signature": "async fn request_email_verification (& self) -> Result < AuthCode >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AuthCode",
                "name": "AuthCode",
                "text": "AuthCode"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AuthCode >"
          }
        }
      ],
      "errors": [
        "mail_failed"
      ]
    },
    {
      "handler": "email_verify_confirm",
      "method": "POST",
      "path": "/api/auth/email-verification/confirm",
      "id": "post_auth_email_verification_confirm",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/VerifyEmail"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Me"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "verify_email",
          "signature": "async fn verify_email (& self , code : & str) -> Result < Me >",
          "params": [
            {
              "pattern": "code",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Me",
                "name": "Me",
                "text": "Me"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Me >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::login",
      "method": "POST",
      "path": "/api/auth/login",
      "id": "post_auth_login",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/Login"
      },
      "auth": "public",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/LoginStart"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "login_start",
          "signature": "async fn login_start (& mut self , email : & str , password : & str) -> Result < LoginStart >",
          "params": [
            {
              "pattern": "email",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "password",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "LoginStart",
                "name": "LoginStart",
                "text": "LoginStart"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < LoginStart >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::login_mfa",
      "method": "POST",
      "path": "/api/auth/login/mfa",
      "id": "post_auth_login_mfa",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/MfaLogin"
      },
      "auth": "public",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Session"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "login_mfa",
          "signature": "async fn login_mfa (& mut self , ticket : & str , code : & str) -> Result < Session >",
          "params": [
            {
              "pattern": "ticket",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "code",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Session",
                "name": "Session",
                "text": "Session"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Session >"
          }
        }
      ],
      "errors": [
        "mfa_locked"
      ]
    },
    {
      "handler": "security::login_passkey",
      "method": "POST",
      "path": "/api/auth/login/passkey",
      "id": "post_auth_login_passkey",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/PasskeyAssertion"
      },
      "auth": "public",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Session"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "login_passkey",
          "signature": "async fn login_passkey (& mut self , a : & PasskeyAssertion) -> Result < Session >",
          "params": [
            {
              "pattern": "a",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "PasskeyAssertion",
                    "name": "PasskeyAssertion",
                    "text": "PasskeyAssertion"
                  }
                ],
                "name": "reference",
                "text": "& PasskeyAssertion"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Session",
                "name": "Session",
                "text": "Session"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Session >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::login_passkey_options",
      "method": "POST",
      "path": "/api/auth/login/passkey/options",
      "id": "post_auth_login_passkey_options",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/MfaTicket"
      },
      "auth": "public",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PasskeyRequestOptions"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "login_passkey_options",
          "signature": "async fn login_passkey_options (& self , ticket : & str) -> Result < PasskeyRequestOptions >",
          "params": [
            {
              "pattern": "ticket",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PasskeyRequestOptions",
                "name": "PasskeyRequestOptions",
                "text": "PasskeyRequestOptions"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PasskeyRequestOptions >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "logout",
      "method": "POST",
      "path": "/api/auth/logout",
      "id": "post_auth_logout",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 204,
        "contentType": null,
        "schema": null,
        "statuses": [
          204
        ]
      },
      "rust": [
        {
          "name": "logout",
          "signature": "async fn logout (& mut self) -> Result < () >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "logout_all",
      "method": "POST",
      "path": "/api/auth/logout-all",
      "id": "post_auth_logout_all",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 204,
        "contentType": null,
        "schema": null,
        "statuses": [
          204
        ]
      },
      "rust": [
        {
          "name": "logout_all",
          "signature": "async fn logout_all (& mut self) -> Result < () >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "change_password",
      "method": "POST",
      "path": "/api/auth/password",
      "id": "post_auth_password",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/ChangePassword"
      },
      "auth": "Db",
      "response": {
        "status": 204,
        "contentType": null,
        "schema": null,
        "statuses": [
          204
        ]
      },
      "rust": [
        {
          "name": "change_password",
          "signature": "async fn change_password (& self , current : & str , new : & str) -> Result < () >",
          "params": [
            {
              "pattern": "current",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "new",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "password_reset_request",
      "method": "POST",
      "path": "/api/auth/password-reset",
      "id": "post_auth_password_reset",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/PasswordResetRequest"
      },
      "auth": "public",
      "response": {
        "status": 202,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AuthCode"
        },
        "statuses": [
          202
        ]
      },
      "rust": [
        {
          "name": "request_password_reset",
          "signature": "async fn request_password_reset (& self , email : & str) -> Result < AuthCode >",
          "params": [
            {
              "pattern": "email",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AuthCode",
                "name": "AuthCode",
                "text": "AuthCode"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AuthCode >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "password_reset_confirm",
      "method": "POST",
      "path": "/api/auth/password-reset/confirm",
      "id": "post_auth_password_reset_confirm",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/PasswordResetConfirm"
      },
      "auth": "public",
      "response": {
        "status": 204,
        "contentType": null,
        "schema": null,
        "statuses": [
          204
        ]
      },
      "rust": [
        {
          "name": "confirm_password_reset",
          "signature": "async fn confirm_password_reset (& self , code : & str , password : & str) -> Result < () >",
          "params": [
            {
              "pattern": "code",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "password",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "register",
      "method": "POST",
      "path": "/api/auth/register",
      "id": "post_auth_register",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/Register"
      },
      "auth": "public",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Me"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "register",
          "signature": "async fn register (& self , r : & Register) -> Result < Me >",
          "params": [
            {
              "pattern": "r",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "Register",
                    "name": "Register",
                    "text": "Register"
                  }
                ],
                "name": "reference",
                "text": "& Register"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Me",
                "name": "Me",
                "text": "Me"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Me >"
          }
        }
      ],
      "errors": [
        "bad_email"
      ]
    },
    {
      "handler": "security::activate_session",
      "method": "POST",
      "path": "/api/auth/session/activate",
      "id": "post_auth_session_activate",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/ActivateSession"
      },
      "auth": "SessionTicket",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Session"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "activate_session",
          "signature": "async fn activate_session (& mut self , a : & ActivateSession) -> Result < Session >",
          "params": [
            {
              "pattern": "a",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "ActivateSession",
                    "name": "ActivateSession",
                    "text": "ActivateSession"
                  }
                ],
                "name": "reference",
                "text": "& ActivateSession"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Session",
                "name": "Session",
                "text": "Session"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Session >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "close::board",
      "method": "GET",
      "path": "/api/board/{period}",
      "id": "get_board_period",
      "source": "crates/kc-api/src/close.rs",
      "pathParams": [
        {
          "name": "period",
          "schema": {
            "type": "string"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Board"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "board",
          "signature": "async fn board (& self , period : NaiveDate) -> Result < Board >",
          "params": [
            {
              "pattern": "period",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Board",
                "name": "Board",
                "text": "Board"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Board >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::my_work",
      "method": "GET",
      "path": "/api/bureau-work",
      "id": "get_bureau_work",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MyDocumentWork"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "my_document_work",
          "signature": "async fn my_document_work (& self) -> Result < Vec < MyDocumentWork > >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "MyDocumentWork",
                    "name": "MyDocumentWork",
                    "text": "MyDocumentWork"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < MyDocumentWork >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < MyDocumentWork > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::request_access",
      "method": "POST",
      "path": "/api/bureau-work-requests/{id}",
      "id": "post_bureau_work_requests_id",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "id",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "type": "string"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "null"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "request_work_access",
          "signature": "async fn request_work_access (& self , w : DocumentWorkId , email : & str) -> Result < () >",
          "params": [
            {
              "pattern": "w",
              "type": {
                "args": [],
                "base": "DocumentWorkId",
                "name": "DocumentWorkId",
                "text": "DocumentWorkId"
              }
            },
            {
              "pattern": "email",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::change_work",
      "method": "POST",
      "path": "/api/bureau-work/{id}",
      "id": "post_bureau_work_id",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "id",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/ChangeDocumentWork"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "null"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "change_document_work",
          "signature": "async fn change_document_work (& self , id : DocumentWorkId , change : & ChangeDocumentWork ,) -> Result < () >",
          "params": [
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "DocumentWorkId",
                "name": "DocumentWorkId",
                "text": "DocumentWorkId"
              }
            },
            {
              "pattern": "change",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "ChangeDocumentWork",
                    "name": "ChangeDocumentWork",
                    "text": "ChangeDocumentWork"
                  }
                ],
                "name": "reference",
                "text": "& ChangeDocumentWork"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": [
        "handoff_message"
      ]
    },
    {
      "handler": "bureau::work_info",
      "method": "GET",
      "path": "/api/bureau-work/{id}/{key}",
      "id": "get_bureau_work_id_key",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "id",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "key",
          "schema": {
            "type": "string"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "anyOf": [
            {
              "$ref": "#/$defs/DocumentWork"
            },
            {
              "type": "null"
            }
          ]
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "document_work",
          "signature": "async fn document_work (& self , scope : BureauId , key : & str) -> Result < Option < DocumentWork > >",
          "params": [
            {
              "pattern": "scope",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            },
            {
              "pattern": "key",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "DocumentWork",
                    "name": "DocumentWork",
                    "text": "DocumentWork"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < DocumentWork >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Option < DocumentWork > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::bureaus",
      "method": "GET",
      "path": "/api/bureaus",
      "id": "get_bureaus",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Bureau"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "bureaus",
          "signature": "async fn bureaus (& self) -> Result < Vec < Bureau > >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "Bureau",
                    "name": "Bureau",
                    "text": "Bureau"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < Bureau >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < Bureau > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::create_bureau",
      "method": "POST",
      "path": "/api/bureaus",
      "id": "post_bureaus",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewBureau"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Bureau"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_bureau",
          "signature": "async fn create_bureau (& self , b : & NewBureau) -> Result < Bureau >",
          "params": [
            {
              "pattern": "b",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewBureau",
                    "name": "NewBureau",
                    "text": "NewBureau"
                  }
                ],
                "name": "reference",
                "text": "& NewBureau"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Bureau",
                "name": "Bureau",
                "text": "Bureau"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Bureau >"
          }
        }
      ],
      "errors": [
        "bad_edb",
        "missing_name"
      ]
    },
    {
      "handler": "bureau::access_requests",
      "method": "GET",
      "path": "/api/bureaus/{bid}/access-requests",
      "id": "get_bureaus_bid_access_requests",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "bid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BureauAccessRequest"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "bureau_access_requests",
          "signature": "async fn bureau_access_requests (& self , b : BureauId) -> Result < Vec < BureauAccessRequest > >",
          "params": [
            {
              "pattern": "b",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "BureauAccessRequest",
                    "name": "BureauAccessRequest",
                    "text": "BureauAccessRequest"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < BureauAccessRequest >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < BureauAccessRequest > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::decide_access",
      "method": "POST",
      "path": "/api/bureaus/{bid}/access-requests/{r}",
      "id": "post_bureaus_bid_access_requests_r",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "bid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "r",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "type": "boolean"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "null"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "decide_work_access",
          "signature": "async fn decide_work_access (& self , b : BureauId , r : i64 , accept : bool) -> Result < () >",
          "params": [
            {
              "pattern": "b",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            },
            {
              "pattern": "r",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            },
            {
              "pattern": "accept",
              "type": {
                "args": [],
                "base": "bool",
                "name": "bool",
                "text": "bool"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::handovers",
      "method": "GET",
      "path": "/api/bureaus/{bid}/book-handovers",
      "id": "get_bureaus_bid_book_handovers",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "bid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/HandoverReceipt"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "bureau_handovers",
          "signature": "async fn bureau_handovers (& self , bid : BureauId) -> Result < Vec < HandoverReceipt > >",
          "params": [
            {
              "pattern": "bid",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "HandoverReceipt",
                    "name": "HandoverReceipt",
                    "text": "HandoverReceipt"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < HandoverReceipt >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < HandoverReceipt > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::handover_archive",
      "method": "GET",
      "path": "/api/bureaus/{bid}/book-handovers/{id}",
      "id": "get_bureaus_bid_book_handovers_id",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "bid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/zip",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "handover_archive",
          "signature": "async fn handover_archive (& self , bid : BureauId , id : i64) -> Result < Vec < u8 > >",
          "params": [
            {
              "pattern": "bid",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < u8 > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::client_options",
      "method": "GET",
      "path": "/api/bureaus/{bid}/client-options",
      "id": "get_bureaus_bid_client_options",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "bid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::bureau::ClientChoiceQuery"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ClientChoicePage"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "client_options",
          "signature": "async fn client_options (& self , bid : BureauId , term : & str , offset : u32 ,) -> Result < ClientChoicePage >",
          "params": [
            {
              "pattern": "bid",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            },
            {
              "pattern": "term",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "offset",
              "type": {
                "args": [],
                "base": "u32",
                "name": "u32",
                "text": "u32"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ClientChoicePage",
                "name": "ClientChoicePage",
                "text": "ClientChoicePage"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ClientChoicePage >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::clients",
      "method": "GET",
      "path": "/api/bureaus/{bid}/clients",
      "id": "get_bureaus_bid_clients",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "bid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BureauClient"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "bureau_clients",
          "signature": "async fn bureau_clients (& self , bid : BureauId) -> Result < Vec < BureauClient > >",
          "params": [
            {
              "pattern": "bid",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "BureauClient",
                    "name": "BureauClient",
                    "text": "BureauClient"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < BureauClient >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < BureauClient > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::link_client",
      "method": "POST",
      "path": "/api/bureaus/{bid}/clients",
      "id": "post_bureaus_bid_clients",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "bid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/BureauClientLink"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BureauClient"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "link_bureau_client",
          "signature": "async fn link_bureau_client (& self , bid : BureauId , tid : TenantId , reason : & str ,) -> Result < Vec < BureauClient > >",
          "params": [
            {
              "pattern": "bid",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            },
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "reason",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "BureauClient",
                    "name": "BureauClient",
                    "text": "BureauClient"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < BureauClient >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < BureauClient > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::unlink_client",
      "method": "POST",
      "path": "/api/bureaus/{bid}/clients/unlink",
      "id": "post_bureaus_bid_clients_unlink",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "bid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/BureauClientLink"
      },
      "auth": "Db",
      "response": {
        "status": 204,
        "contentType": null,
        "schema": null,
        "statuses": [
          204
        ]
      },
      "rust": [
        {
          "name": "unlink_bureau_client",
          "signature": "async fn unlink_bureau_client (& self , bid : BureauId , tid : TenantId , reason : & str ,) -> Result < () >",
          "params": [
            {
              "pattern": "bid",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            },
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "reason",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::assign",
      "method": "POST",
      "path": "/api/bureaus/{bid}/clients/{tid}/assignment",
      "id": "post_bureaus_bid_clients_tid_assignment",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "bid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/api::bureau::Assignment"
      },
      "auth": "Db",
      "response": {
        "status": 204,
        "contentType": null,
        "schema": null,
        "statuses": [
          204
        ]
      },
      "rust": [
        {
          "name": "assign_bureau_client",
          "signature": "async fn assign_bureau_client (& self , bid : BureauId , tid : TenantId , email : & str , enabled : bool ,) -> Result < () >",
          "params": [
            {
              "pattern": "bid",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            },
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "email",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "enabled",
              "type": {
                "args": [],
                "base": "bool",
                "name": "bool",
                "text": "bool"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::set_manager",
      "method": "POST",
      "path": "/api/bureaus/{bid}/clients/{tid}/manager",
      "id": "post_bureaus_bid_clients_tid_manager",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "bid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "null"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "set_client_manager",
          "signature": "async fn set_client_manager (& self , bid : BureauId , tid : TenantId , email : Option < String > ,) -> Result < () >",
          "params": [
            {
              "pattern": "bid",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            },
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "email",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "String",
                    "name": "String",
                    "text": "String"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < String >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "grid_window::bureau",
      "method": "POST",
      "path": "/api/bureaus/{bid}/grids/{register}",
      "id": "post_bureaus_bid_grids_register",
      "source": "crates/kc-api/src/grid_window.rs",
      "pathParams": [
        {
          "name": "bid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "register",
          "schema": {
            "type": "string"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/GridQuery"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/GridPage"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "bureau_grid",
          "signature": "async fn bureau_grid (& self , bid : BureauId , register : & str , query : & grid_page :: GridQuery ,) -> Result < grid_page :: GridPage >",
          "params": [
            {
              "pattern": "bid",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            },
            {
              "pattern": "register",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "query",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "GridQuery",
                    "name": "grid_page::GridQuery",
                    "text": "grid_page :: GridQuery"
                  }
                ],
                "name": "reference",
                "text": "& grid_page :: GridQuery"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "GridPage",
                "name": "grid_page::GridPage",
                "text": "grid_page :: GridPage"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < grid_page :: GridPage >"
          }
        }
      ],
      "errors": [
        "unknown_grid"
      ]
    },
    {
      "handler": "inbox::board",
      "method": "GET",
      "path": "/api/bureaus/{bid}/inbox-board",
      "id": "get_bureaus_bid_inbox_board",
      "source": "crates/kc-api/src/inbox.rs",
      "pathParams": [
        {
          "name": "bid",
          "schema": {
            "$ref": "#/$defs/BureauId"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/InboxBoardFilter"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/InboxBoardPage"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "inbox_board",
          "signature": "async fn inbox_board (& self , bid : BureauId , filter : & InboxBoardFilter ,) -> Result < InboxBoardPage >",
          "params": [
            {
              "pattern": "bid",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            },
            {
              "pattern": "filter",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "InboxBoardFilter",
                    "name": "InboxBoardFilter",
                    "text": "InboxBoardFilter"
                  }
                ],
                "name": "reference",
                "text": "& InboxBoardFilter"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "InboxBoardPage",
                "name": "InboxBoardPage",
                "text": "InboxBoardPage"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < InboxBoardPage >"
          }
        }
      ],
      "errors": [
        "inbox_assignees",
        "search_length"
      ]
    },
    {
      "handler": "inbox::board_staff",
      "method": "GET",
      "path": "/api/bureaus/{bid}/inbox-board/staff",
      "id": "get_bureaus_bid_inbox_board_staff",
      "source": "crates/kc-api/src/inbox.rs",
      "pathParams": [
        {
          "name": "bid",
          "schema": {
            "$ref": "#/$defs/BureauId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InboxBoardPerson"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "inbox_board_staff",
          "signature": "async fn inbox_board_staff (& self , bid : BureauId) -> Result < Vec < InboxBoardPerson > >",
          "params": [
            {
              "pattern": "bid",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "InboxBoardPerson",
                    "name": "InboxBoardPerson",
                    "text": "InboxBoardPerson"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < InboxBoardPerson >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < InboxBoardPerson > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "inbox::board_avatar",
      "method": "GET",
      "path": "/api/bureaus/{bid}/inbox-board/staff/{user}/avatar",
      "id": "get_bureaus_bid_inbox_board_staff_user_avatar",
      "source": "crates/kc-api/src/inbox.rs",
      "pathParams": [
        {
          "name": "bid",
          "schema": {
            "$ref": "#/$defs/BureauId"
          }
        },
        {
          "name": "user",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "image/*",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [],
      "errors": []
    },
    {
      "handler": "inbox::counts",
      "method": "GET",
      "path": "/api/bureaus/{bid}/inbox-counts",
      "id": "get_bureaus_bid_inbox_counts",
      "source": "crates/kc-api/src/inbox.rs",
      "pathParams": [
        {
          "name": "bid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::inbox::WorkQuery"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/InboxCounts"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "bureau_inbox_counts",
          "signature": "async fn bureau_inbox_counts (& self , bid : BureauId , client : Option < TenantId > ,) -> Result < InboxCounts >",
          "params": [
            {
              "pattern": "bid",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            },
            {
              "pattern": "client",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "TenantId",
                    "name": "TenantId",
                    "text": "TenantId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < TenantId >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "InboxCounts",
                "name": "InboxCounts",
                "text": "InboxCounts"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < InboxCounts >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "inbox::work_groups",
      "method": "GET",
      "path": "/api/bureaus/{bid}/inbox-groups/{folder}",
      "id": "get_bureaus_bid_inbox_groups_folder",
      "source": "crates/kc-api/src/inbox.rs",
      "pathParams": [
        {
          "name": "bid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "folder",
          "schema": {
            "type": "string"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::inbox::WorkQuery"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/InboxGroupsPage"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "bureau_inbox_groups",
          "signature": "async fn bureau_inbox_groups (& self , bid : BureauId , folder : & str , client : Option < TenantId > , term : & str , offset : u32 ,) -> Result < InboxGroupsPage >",
          "params": [
            {
              "pattern": "bid",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            },
            {
              "pattern": "folder",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "client",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "TenantId",
                    "name": "TenantId",
                    "text": "TenantId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < TenantId >"
              }
            },
            {
              "pattern": "term",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "offset",
              "type": {
                "args": [],
                "base": "u32",
                "name": "u32",
                "text": "u32"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "InboxGroupsPage",
                "name": "InboxGroupsPage",
                "text": "InboxGroupsPage"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < InboxGroupsPage >"
          }
        }
      ],
      "errors": [
        "inbox_folder",
        "search_length"
      ]
    },
    {
      "handler": "bureau::members",
      "method": "GET",
      "path": "/api/bureaus/{bid}/members",
      "id": "get_bureaus_bid_members",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "bid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BureauMember"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "bureau_members",
          "signature": "async fn bureau_members (& self , bid : BureauId) -> Result < Vec < BureauMember > >",
          "params": [
            {
              "pattern": "bid",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "BureauMember",
                    "name": "BureauMember",
                    "text": "BureauMember"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < BureauMember >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < BureauMember > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::set_member",
      "method": "POST",
      "path": "/api/bureaus/{bid}/members",
      "id": "post_bureaus_bid_members",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "bid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SetBureauMember"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BureauMember"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "set_bureau_member",
          "signature": "async fn set_bureau_member (& self , bid : BureauId , email : & str , role : Option < BureauRole > ,) -> Result < Vec < BureauMember > >",
          "params": [
            {
              "pattern": "bid",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            },
            {
              "pattern": "email",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "role",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "BureauRole",
                    "name": "BureauRole",
                    "text": "BureauRole"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < BureauRole >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "BureauMember",
                    "name": "BureauMember",
                    "text": "BureauMember"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < BureauMember >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < BureauMember > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::practice_offline_permit",
      "method": "GET",
      "path": "/api/bureaus/{bid}/offline-permit",
      "id": "get_bureaus_bid_offline_permit",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [
        {
          "name": "bid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PracticeOfflinePermit"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "practice_offline_permit",
          "signature": "async fn practice_offline_permit (& self , bid : BureauId) -> Result < PracticeOfflinePermit >",
          "params": [
            {
              "pattern": "bid",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PracticeOfflinePermit",
                "name": "PracticeOfflinePermit",
                "text": "PracticeOfflinePermit"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PracticeOfflinePermit >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::routing",
      "method": "GET",
      "path": "/api/bureaus/{bid}/routing",
      "id": "get_bureaus_bid_routing",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "bid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/RoutingSettings"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "bureau_routing",
          "signature": "async fn bureau_routing (& self , bid : BureauId) -> Result < RoutingSettings >",
          "params": [
            {
              "pattern": "bid",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "RoutingSettings",
                "name": "RoutingSettings",
                "text": "RoutingSettings"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < RoutingSettings >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::set_routing",
      "method": "POST",
      "path": "/api/bureaus/{bid}/routing",
      "id": "post_bureaus_bid_routing",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "bid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/RoutingMode"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "null"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "set_bureau_routing",
          "signature": "async fn set_bureau_routing (& self , bid : BureauId , mode : RoutingMode) -> Result < () >",
          "params": [
            {
              "pattern": "bid",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            },
            {
              "pattern": "mode",
              "type": {
                "args": [],
                "base": "RoutingMode",
                "name": "RoutingMode",
                "text": "RoutingMode"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::workspace_clients",
      "method": "GET",
      "path": "/api/bureaus/{bid}/workspace-clients",
      "id": "get_bureaus_bid_workspace_clients",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "bid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::bureau::WorkspaceQuery"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Tenant"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "workspace_clients",
          "signature": "async fn workspace_clients (& self , bid : BureauId , selected : Option < TenantId > , all : bool ,) -> Result < Vec < Tenant > >",
          "params": [
            {
              "pattern": "bid",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            },
            {
              "pattern": "selected",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "TenantId",
                    "name": "TenantId",
                    "text": "TenantId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < TenantId >"
              }
            },
            {
              "pattern": "all",
              "type": {
                "args": [],
                "base": "bool",
                "name": "bool",
                "text": "bool"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "Tenant",
                    "name": "Tenant",
                    "text": "Tenant"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < Tenant >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < Tenant > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "control::calendar",
      "method": "GET",
      "path": "/api/calendar/{year}",
      "id": "get_calendar_year",
      "source": "crates/kc-api/src/control.rs",
      "pathParams": [
        {
          "name": "year",
          "schema": {
            "type": "integer",
            "format": "i32"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/WorkCalendar"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "calendar",
          "signature": "async fn calendar (& self , year : i32) -> Result < WorkCalendar >",
          "params": [
            {
              "pattern": "year",
              "type": {
                "args": [],
                "base": "i32",
                "name": "i32",
                "text": "i32"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "WorkCalendar",
                "name": "WorkCalendar",
                "text": "WorkCalendar"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < WorkCalendar >"
          }
        }
      ],
      "errors": [
        "bad_period",
        "internal"
      ]
    },
    {
      "handler": "bureau::my_clients",
      "method": "GET",
      "path": "/api/clients",
      "id": "get_clients",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ClientOverview"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "my_clients",
          "signature": "async fn my_clients (& self) -> Result < Vec < ClientOverview > >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "ClientOverview",
                    "name": "ClientOverview",
                    "text": "ClientOverview"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < ClientOverview >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < ClientOverview > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "desktop::download",
      "method": "GET",
      "path": "/api/desktop/download",
      "id": "get_desktop_download",
      "source": "crates/kc-api/src/desktop.rs",
      "pathParams": [],
      "query": {
        "$ref": "#/$defs/api::desktop::DownloadQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/DesktopDownload"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "desktop_download",
          "signature": "async fn desktop_download (& self , target : & str , version : Option < & str > ,) -> Result < DesktopDownload >",
          "params": [
            {
              "pattern": "target",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "version",
              "type": {
                "args": [
                  {
                    "args": [
                      {
                        "args": [],
                        "base": "str",
                        "name": "str",
                        "text": "str"
                      }
                    ],
                    "name": "reference",
                    "text": "& str"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < & str >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "DesktopDownload",
                "name": "DesktopDownload",
                "text": "DesktopDownload"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < DesktopDownload >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "desktop::get_public",
      "method": "GET",
      "path": "/api/desktop/get/{target}",
      "id": "get_desktop_get_target",
      "source": "crates/kc-api/src/desktop.rs",
      "pathParams": [
        {
          "name": "target",
          "schema": {
            "type": "string"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "public",
      "response": {
        "status": 302,
        "contentType": null,
        "schema": null,
        "statuses": [
          302
        ]
      },
      "rust": [],
      "errors": []
    },
    {
      "handler": "desktop::latest",
      "method": "GET",
      "path": "/api/desktop/latest",
      "id": "get_desktop_latest",
      "source": "crates/kc-api/src/desktop.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "public",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/DesktopLatest"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "desktop_latest",
          "signature": "async fn desktop_latest (& self) -> Result < DesktopLatest >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [],
                "base": "DesktopLatest",
                "name": "DesktopLatest",
                "text": "DesktopLatest"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < DesktopLatest >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "desktop::releases",
      "method": "GET",
      "path": "/api/desktop/releases",
      "id": "get_desktop_releases",
      "source": "crates/kc-api/src/desktop.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/DesktopReleases"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "desktop_releases",
          "signature": "async fn desktop_releases (& self) -> Result < DesktopReleases >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [],
                "base": "DesktopReleases",
                "name": "DesktopReleases",
                "text": "DesktopReleases"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < DesktopReleases >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "desktop::update",
      "method": "GET",
      "path": "/api/desktop/update",
      "id": "get_desktop_update",
      "source": "crates/kc-api/src/desktop.rs",
      "pathParams": [],
      "query": {
        "$ref": "#/$defs/api::desktop::UpdateQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/DesktopUpdateCheck"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "desktop_update",
          "signature": "async fn desktop_update (& self , target : & str , version : & str) -> Result < DesktopUpdateCheck >",
          "params": [
            {
              "pattern": "target",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "version",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "DesktopUpdateCheck",
                "name": "DesktopUpdateCheck",
                "text": "DesktopUpdateCheck"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < DesktopUpdateCheck >"
          }
        }
      ],
      "errors": [
        "desktop_version_invalid"
      ]
    },
    {
      "handler": "inbox::clients",
      "method": "GET",
      "path": "/api/document-inbox",
      "id": "get_document_inbox",
      "source": "crates/kc-api/src/inbox.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InboxClient"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "inbox_clients",
          "signature": "async fn inbox_clients (& self) -> Result < Vec < InboxClient > >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "InboxClient",
                    "name": "InboxClient",
                    "text": "InboxClient"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < InboxClient >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < InboxClient > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "filings::rules",
      "method": "GET",
      "path": "/api/filing-correction-rules",
      "id": "get_filing_correction_rules",
      "source": "crates/kc-api/src/filings.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CorrectionRule"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "filing_correction_rules",
          "signature": "async fn filing_correction_rules (& self) -> Result < Vec < CorrectionRule > >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "CorrectionRule",
                    "name": "CorrectionRule",
                    "text": "CorrectionRule"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < CorrectionRule >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < CorrectionRule > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "intake::boxes",
      "method": "GET",
      "path": "/api/intake",
      "id": "get_intake",
      "source": "crates/kc-api/src/intake.rs",
      "pathParams": [],
      "query": {
        "$ref": "#/$defs/api::intake::BoxScope"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IntakeBox"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "intake_boxes",
          "signature": "async fn intake_boxes (& self) -> Result < Vec < IntakeBox > >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "IntakeBox",
                    "name": "IntakeBox",
                    "text": "IntakeBox"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < IntakeBox >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < IntakeBox > >"
          }
        },
        {
          "name": "bureau_intake_boxes",
          "signature": "async fn bureau_intake_boxes (& self , bid : BureauId) -> Result < Vec < IntakeBox > >",
          "params": [
            {
              "pattern": "bid",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "IntakeBox",
                    "name": "IntakeBox",
                    "text": "IntakeBox"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < IntakeBox >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < IntakeBox > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "intake::items",
      "method": "GET",
      "path": "/api/intake/{box}/documents",
      "id": "get_intake_box_documents",
      "source": "crates/kc-api/src/intake.rs",
      "pathParams": [
        {
          "name": "box",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::intake::ItemQuery"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IntakeItem"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "intake_items",
          "signature": "async fn intake_items (& self , id : IntakeBoxId) -> Result < Vec < IntakeItem > >",
          "params": [
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "IntakeBoxId",
                "name": "IntakeBoxId",
                "text": "IntakeBoxId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "IntakeItem",
                    "name": "IntakeItem",
                    "text": "IntakeItem"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < IntakeItem >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < IntakeItem > >"
          }
        },
        {
          "name": "intake_item",
          "signature": "async fn intake_item (& self , id : IntakeBoxId , doc : IntakeDocumentId ,) -> Result < Option < IntakeItem > >",
          "params": [
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "IntakeBoxId",
                "name": "IntakeBoxId",
                "text": "IntakeBoxId"
              }
            },
            {
              "pattern": "doc",
              "type": {
                "args": [],
                "base": "IntakeDocumentId",
                "name": "IntakeDocumentId",
                "text": "IntakeDocumentId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "IntakeItem",
                    "name": "IntakeItem",
                    "text": "IntakeItem"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < IntakeItem >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Option < IntakeItem > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "intake::upload",
      "method": "POST",
      "path": "/api/intake/{box}/documents",
      "id": "post_intake_box_documents",
      "source": "crates/kc-api/src/intake.rs",
      "pathParams": [
        {
          "name": "box",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::intake::Source"
      },
      "body": {
        "type": "string",
        "format": "binary"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "intake_receive",
          "signature": "async fn intake_receive (& self , id : IntakeBoxId , name : & str , mime : & str , data : Vec < u8 > , camera : bool ,) -> Result < IntakeDocumentId >",
          "params": [
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "IntakeBoxId",
                "name": "IntakeBoxId",
                "text": "IntakeBoxId"
              }
            },
            {
              "pattern": "name",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "mime",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "data",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            },
            {
              "pattern": "camera",
              "type": {
                "args": [],
                "base": "bool",
                "name": "bool",
                "text": "bool"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "IntakeDocumentId",
                "name": "IntakeDocumentId",
                "text": "IntakeDocumentId"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < IntakeDocumentId >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "intake::original",
      "method": "GET",
      "path": "/api/intake/{box}/documents/{id}",
      "id": "get_intake_box_documents_id",
      "source": "crates/kc-api/src/intake.rs",
      "pathParams": [
        {
          "name": "box",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/octet-stream",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "intake_original",
          "signature": "async fn intake_original (& self , id : IntakeBoxId , doc : IntakeDocumentId) -> Result < Vec < u8 > >",
          "params": [
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "IntakeBoxId",
                "name": "IntakeBoxId",
                "text": "IntakeBoxId"
              }
            },
            {
              "pattern": "doc",
              "type": {
                "args": [],
                "base": "IntakeDocumentId",
                "name": "IntakeDocumentId",
                "text": "IntakeDocumentId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < u8 > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "intake::assign",
      "method": "POST",
      "path": "/api/intake/{box}/documents/{id}/assign",
      "id": "post_intake_box_documents_id_assign",
      "source": "crates/kc-api/src/intake.rs",
      "pathParams": [
        {
          "name": "box",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "type": "string",
        "format": "uuid"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "null"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "assign_intake",
          "signature": "async fn assign_intake (& self , id : IntakeBoxId , doc : IntakeDocumentId , tenant : TenantId ,) -> Result < () >",
          "params": [
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "IntakeBoxId",
                "name": "IntakeBoxId",
                "text": "IntakeBoxId"
              }
            },
            {
              "pattern": "doc",
              "type": {
                "args": [],
                "base": "IntakeDocumentId",
                "name": "IntakeDocumentId",
                "text": "IntakeDocumentId"
              }
            },
            {
              "pattern": "tenant",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "intake::confirm",
      "method": "POST",
      "path": "/api/intake/{box}/documents/{id}/confirm",
      "id": "post_intake_box_documents_id_confirm",
      "source": "crates/kc-api/src/intake.rs",
      "pathParams": [
        {
          "name": "box",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "type": "integer",
        "format": "i32"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "null"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "confirm_intake",
          "signature": "async fn confirm_intake (& self , id : IntakeBoxId , doc : IntakeDocumentId , credits : i32 ,) -> Result < () >",
          "params": [
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "IntakeBoxId",
                "name": "IntakeBoxId",
                "text": "IntakeBoxId"
              }
            },
            {
              "pattern": "doc",
              "type": {
                "args": [],
                "base": "IntakeDocumentId",
                "name": "IntakeDocumentId",
                "text": "IntakeDocumentId"
              }
            },
            {
              "pattern": "credits",
              "type": {
                "args": [],
                "base": "i32",
                "name": "i32",
                "text": "i32"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "intake::enable",
      "method": "POST",
      "path": "/api/intake/{box}/enable",
      "id": "post_intake_box_enable",
      "source": "crates/kc-api/src/intake.rs",
      "pathParams": [
        {
          "name": "box",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/api::intake::Enable"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "null"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "enable_intake",
          "signature": "async fn enable_intake (& self , id : IntakeBoxId , bureau : bool) -> Result < () >",
          "params": [
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "IntakeBoxId",
                "name": "IntakeBoxId",
                "text": "IntakeBoxId"
              }
            },
            {
              "pattern": "bureau",
              "type": {
                "args": [],
                "base": "bool",
                "name": "bool",
                "text": "bool"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "intake::order",
      "method": "POST",
      "path": "/api/intake/{box}/orders",
      "id": "post_intake_box_orders",
      "source": "crates/kc-api/src/intake.rs",
      "pathParams": [
        {
          "name": "box",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/api::intake::Buy"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "integer",
          "format": "i64"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "intake_order",
          "signature": "async fn intake_order (& self , id : IntakeBoxId , gross : i64) -> Result < i64 >",
          "params": [
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "IntakeBoxId",
                "name": "IntakeBoxId",
                "text": "IntakeBoxId"
              }
            },
            {
              "pattern": "gross",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < i64 >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "intake::hook",
      "method": "POST",
      "path": "/api/intake/{box}/webhook",
      "id": "post_intake_box_webhook",
      "source": "crates/kc-api/src/intake.rs",
      "pathParams": [
        {
          "name": "box",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/IntakeWebhook"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "intake_hook",
          "signature": "async fn intake_hook (& self , id : IntakeBoxId , change : & IntakeWebhook ,) -> Result < Option < String > >",
          "params": [
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "IntakeBoxId",
                "name": "IntakeBoxId",
                "text": "IntakeBoxId"
              }
            },
            {
              "pattern": "change",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "IntakeWebhook",
                    "name": "IntakeWebhook",
                    "text": "IntakeWebhook"
                  }
                ],
                "name": "reference",
                "text": "& IntakeWebhook"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "String",
                    "name": "String",
                    "text": "String"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < String >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Option < String > >"
          }
        }
      ],
      "errors": [
        "forbidden",
        "hook_url",
        "random",
        "secret_key"
      ]
    },
    {
      "handler": "accept_invitation",
      "method": "POST",
      "path": "/api/invitations/accept",
      "id": "post_invitations_accept",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/AcceptInvitation"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Tenant"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "accept_invitation",
          "signature": "async fn accept_invitation (& self , code : & str) -> Result < Tenant >",
          "params": [
            {
              "pattern": "code",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Tenant",
                "name": "Tenant",
                "text": "Tenant"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Tenant >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "me",
      "method": "GET",
      "path": "/api/me",
      "id": "get_me",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Me"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "me",
          "signature": "async fn me (& self) -> Result < Me >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Me",
                "name": "Me",
                "text": "Me"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Me >"
          }
        },
        {
          "name": "activity_anchor",
          "signature": "async fn activity_anchor (& self , tenant : Option < TenantId >) -> Result < i64 >",
          "params": [
            {
              "pattern": "tenant",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "TenantId",
                    "name": "TenantId",
                    "text": "TenantId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < TenantId >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < i64 >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::my_activity",
      "method": "GET",
      "path": "/api/me/activity",
      "id": "get_me_activity",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": {
        "$ref": "#/$defs/api::security::Page"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ActivityEntry"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "my_activity",
          "signature": "async fn my_activity (& self , before : Option < i64 >) -> Result < Vec < ActivityEntry > >",
          "params": [
            {
              "pattern": "before",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i64",
                    "name": "i64",
                    "text": "i64"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i64 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "ActivityEntry",
                    "name": "ActivityEntry",
                    "text": "ActivityEntry"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < ActivityEntry >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < ActivityEntry > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "api_keys::list",
      "method": "GET",
      "path": "/api/me/api-keys",
      "id": "get_me_api_keys",
      "source": "crates/kc-api/src/api_keys.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IntegrationKey"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "api_keys",
          "signature": "async fn api_keys (& self) -> Result < Vec < IntegrationKey > >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "IntegrationKey",
                    "name": "IntegrationKey",
                    "text": "IntegrationKey"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < IntegrationKey >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < IntegrationKey > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "api_keys::issue",
      "method": "POST",
      "path": "/api/me/api-keys",
      "id": "post_me_api_keys",
      "source": "crates/kc-api/src/api_keys.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewIntegrationKey"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/IssuedIntegrationKey"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "issue_api_key",
          "signature": "async fn issue_api_key (& self , name : String) -> Result < IssuedIntegrationKey >",
          "params": [
            {
              "pattern": "name",
              "type": {
                "args": [],
                "base": "String",
                "name": "String",
                "text": "String"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "IssuedIntegrationKey",
                "name": "IssuedIntegrationKey",
                "text": "IssuedIntegrationKey"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < IssuedIntegrationKey >"
          }
        }
      ],
      "errors": [
        "invalid_key_name"
      ]
    },
    {
      "handler": "api_keys::revoke",
      "method": "POST",
      "path": "/api/me/api-keys/{id}/revoke",
      "id": "post_me_api_keys_id_revoke",
      "source": "crates/kc-api/src/api_keys.rs",
      "pathParams": [
        {
          "name": "id",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "boolean"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "revoke_api_key",
          "signature": "async fn revoke_api_key (& self , id : IntegrationKeyId) -> Result < bool >",
          "params": [
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "IntegrationKeyId",
                "name": "IntegrationKeyId",
                "text": "IntegrationKeyId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "bool",
                "name": "bool",
                "text": "bool"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < bool >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::avatar",
      "method": "GET",
      "path": "/api/me/avatar",
      "id": "get_me_avatar",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "image/*",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [],
      "errors": []
    },
    {
      "handler": "security::set_avatar",
      "method": "POST",
      "path": "/api/me/avatar",
      "id": "post_me_avatar",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "type": "string",
        "format": "binary"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Me"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "set_avatar",
          "signature": "async fn set_avatar (& self , content_type : & str , content : Vec < u8 >) -> Result < Me >",
          "params": [
            {
              "pattern": "content_type",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "content",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Me",
                "name": "Me",
                "text": "Me"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Me >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::clear_avatar",
      "method": "POST",
      "path": "/api/me/avatar/delete",
      "id": "post_me_avatar_delete",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Me"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "clear_avatar",
          "signature": "async fn clear_avatar (& self) -> Result < Me >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Me",
                "name": "Me",
                "text": "Me"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Me >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::browser_logins",
      "method": "GET",
      "path": "/api/me/browser-logins",
      "id": "get_me_browser_logins",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/BrowserLoginSummary"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "browser_logins",
          "signature": "async fn browser_logins (& self) -> Result < BrowserLoginSummary >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [],
                "base": "BrowserLoginSummary",
                "name": "BrowserLoginSummary",
                "text": "BrowserLoginSummary"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < BrowserLoginSummary >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::record_browser_login",
      "method": "POST",
      "path": "/api/me/browser-logins",
      "id": "post_me_browser_logins",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/BrowserLoginSample"
      },
      "auth": "Db",
      "response": {
        "status": 204,
        "contentType": null,
        "schema": null,
        "statuses": [
          204
        ]
      },
      "rust": [
        {
          "name": "record_browser_login",
          "signature": "async fn record_browser_login (& self , fingerprint : & str) -> Result < () >",
          "params": [
            {
              "pattern": "fingerprint",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "configuration::get",
      "method": "GET",
      "path": "/api/me/configuration",
      "id": "get_me_configuration",
      "source": "crates/kc-api/src/configuration.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ConfigSnapshot"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "shared_configuration",
          "signature": "async fn shared_configuration (& self) -> Result < ConfigSnapshot >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ConfigSnapshot",
                "name": "ConfigSnapshot",
                "text": "ConfigSnapshot"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ConfigSnapshot >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "configuration::apply",
      "method": "POST",
      "path": "/api/me/configuration",
      "id": "post_me_configuration",
      "source": "crates/kc-api/src/configuration.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/ConfigImport"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ConfigPreview"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "apply_configuration",
          "signature": "async fn apply_configuration (& self , request : & ConfigImport) -> Result < ConfigPreview >",
          "params": [
            {
              "pattern": "request",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "ConfigImport",
                    "name": "ConfigImport",
                    "text": "ConfigImport"
                  }
                ],
                "name": "reference",
                "text": "& ConfigImport"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ConfigPreview",
                "name": "ConfigPreview",
                "text": "ConfigPreview"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ConfigPreview >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "configuration::preview",
      "method": "POST",
      "path": "/api/me/configuration/preview",
      "id": "post_me_configuration_preview",
      "source": "crates/kc-api/src/configuration.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/ConfigImport"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ConfigPreview"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "preview_configuration",
          "signature": "async fn preview_configuration (& self , request : & ConfigImport) -> Result < ConfigPreview >",
          "params": [
            {
              "pattern": "request",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "ConfigImport",
                    "name": "ConfigImport",
                    "text": "ConfigImport"
                  }
                ],
                "name": "reference",
                "text": "& ConfigImport"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ConfigPreview",
                "name": "ConfigPreview",
                "text": "ConfigPreview"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ConfigPreview >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::device_info",
      "method": "GET",
      "path": "/api/me/device-login/{code}",
      "id": "get_me_device_login_code",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [
        {
          "name": "code",
          "schema": {
            "type": "string"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/DeviceLoginInfo"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "device_login_info",
          "signature": "async fn device_login_info (& self , user_code : & str) -> Result < DeviceLoginInfo >",
          "params": [
            {
              "pattern": "user_code",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "DeviceLoginInfo",
                "name": "DeviceLoginInfo",
                "text": "DeviceLoginInfo"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < DeviceLoginInfo >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::device_decide",
      "method": "POST",
      "path": "/api/me/device-login/{code}/decide",
      "id": "post_me_device_login_code_decide",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [
        {
          "name": "code",
          "schema": {
            "type": "string"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/DeviceLoginDecision"
      },
      "auth": "Db",
      "response": {
        "status": 204,
        "contentType": null,
        "schema": null,
        "statuses": [
          204
        ]
      },
      "rust": [
        {
          "name": "device_login_decide",
          "signature": "async fn device_login_decide (& self , user_code : & str , approve : bool) -> Result < () >",
          "params": [
            {
              "pattern": "user_code",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "approve",
              "type": {
                "args": [],
                "base": "bool",
                "name": "bool",
                "text": "bool"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::devices",
      "method": "GET",
      "path": "/api/me/devices",
      "id": "get_me_devices",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RegisteredDevice"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "devices",
          "signature": "async fn devices (& self) -> Result < Vec < RegisteredDevice > >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "RegisteredDevice",
                    "name": "RegisteredDevice",
                    "text": "RegisteredDevice"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < RegisteredDevice >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < RegisteredDevice > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::revoke_device",
      "method": "POST",
      "path": "/api/me/devices/{id}/revoke",
      "id": "post_me_devices_id_revoke",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [
        {
          "name": "id",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/PasswordConfirm"
      },
      "auth": "Db",
      "response": {
        "status": 204,
        "contentType": null,
        "schema": null,
        "statuses": [
          204
        ]
      },
      "rust": [
        {
          "name": "revoke_device",
          "signature": "async fn revoke_device (& self , id : TenantId , password : & str) -> Result < () >",
          "params": [
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "password",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::account_upload_cert",
      "method": "POST",
      "path": "/api/me/efaktura/certificate",
      "id": "post_me_efaktura_certificate",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/UploadCert"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceSetup"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "upload_account_einvoice_cert",
          "signature": "async fn upload_account_einvoice_cert (& self , p12 : & [u8] , password : & str ,) -> Result < EinvoiceSetup >",
          "params": [
            {
              "pattern": "p12",
              "type": {
                "args": [
                  {
                    "args": [
                      {
                        "args": [],
                        "base": "u8",
                        "name": "u8",
                        "text": "u8"
                      }
                    ],
                    "name": "slice",
                    "text": "[u8]"
                  }
                ],
                "name": "reference",
                "text": "& [u8]"
              }
            },
            {
              "pattern": "password",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceSetup",
                "name": "EinvoiceSetup",
                "text": "EinvoiceSetup"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceSetup >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::account_upload_local_cert",
      "method": "POST",
      "path": "/api/me/efaktura/certificate/local",
      "id": "post_me_efaktura_certificate_local",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/LocalCert"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceSetup"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "register_account_local_einvoice_cert",
          "signature": "async fn register_account_local_einvoice_cert (& self , cert : & [u8]) -> Result < EinvoiceSetup >",
          "params": [
            {
              "pattern": "cert",
              "type": {
                "args": [
                  {
                    "args": [
                      {
                        "args": [],
                        "base": "u8",
                        "name": "u8",
                        "text": "u8"
                      }
                    ],
                    "name": "slice",
                    "text": "[u8]"
                  }
                ],
                "name": "reference",
                "text": "& [u8]"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceSetup",
                "name": "EinvoiceSetup",
                "text": "EinvoiceSetup"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceSetup >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::account_lock_cert",
      "method": "POST",
      "path": "/api/me/efaktura/certificate/lock",
      "id": "post_me_efaktura_certificate_lock",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceSetup"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "lock_account_einvoice_cert",
          "signature": "async fn lock_account_einvoice_cert (& self) -> Result < EinvoiceSetup >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceSetup",
                "name": "EinvoiceSetup",
                "text": "EinvoiceSetup"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceSetup >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::account_remove_cert",
      "method": "POST",
      "path": "/api/me/efaktura/certificate/remove",
      "id": "post_me_efaktura_certificate_remove",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceSetup"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "remove_account_einvoice_cert",
          "signature": "async fn remove_account_einvoice_cert (& self) -> Result < EinvoiceSetup >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceSetup",
                "name": "EinvoiceSetup",
                "text": "EinvoiceSetup"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceSetup >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::account_unlock_cert",
      "method": "POST",
      "path": "/api/me/efaktura/certificate/unlock",
      "id": "post_me_efaktura_certificate_unlock",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/UnlockCert"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceSetup"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "unlock_account_einvoice_cert",
          "signature": "async fn unlock_account_einvoice_cert (& self , password : & str) -> Result < EinvoiceSetup >",
          "params": [
            {
              "pattern": "password",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceSetup",
                "name": "EinvoiceSetup",
                "text": "EinvoiceSetup"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceSetup >"
          }
        }
      ],
      "errors": [
        "certificate_locked",
        "certificate_missing"
      ]
    },
    {
      "handler": "efaktura::settings_overview",
      "method": "GET",
      "path": "/api/me/efaktura/companies",
      "id": "get_me_efaktura_companies",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UjpCompanySettings"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "einvoice_settings_overview",
          "signature": "async fn einvoice_settings_overview (& self) -> Result < Vec < UjpCompanySettings > >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "UjpCompanySettings",
                    "name": "UjpCompanySettings",
                    "text": "UjpCompanySettings"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < UjpCompanySettings >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < UjpCompanySettings > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::account_setup",
      "method": "GET",
      "path": "/api/me/efaktura/settings",
      "id": "get_me_efaktura_settings",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceSetup"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "account_einvoice_setup",
          "signature": "async fn account_einvoice_setup (& self) -> Result < EinvoiceSetup >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceSetup",
                "name": "EinvoiceSetup",
                "text": "EinvoiceSetup"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceSetup >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::account_set_settings",
      "method": "POST",
      "path": "/api/me/efaktura/settings",
      "id": "post_me_efaktura_settings",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/SetEinvoiceSettings"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceSetup"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "set_account_einvoice_settings",
          "signature": "async fn set_account_einvoice_settings (& self , n : & SetEinvoiceSettings ,) -> Result < EinvoiceSetup >",
          "params": [
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "SetEinvoiceSettings",
                    "name": "SetEinvoiceSettings",
                    "text": "SetEinvoiceSettings"
                  }
                ],
                "name": "reference",
                "text": "& SetEinvoiceSettings"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceSetup",
                "name": "EinvoiceSetup",
                "text": "EinvoiceSetup"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceSetup >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "full_export::export",
      "method": "GET",
      "path": "/api/me/export",
      "id": "get_me_export",
      "source": "crates/kc-api/src/full_export.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/zip",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "full_export",
          "signature": "async fn full_export (& self) -> Result < Vec < u8 > >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < u8 > >"
          }
        }
      ],
      "errors": [
        "export_busy",
        "hash_mismatch",
        "mfa_required"
      ]
    },
    {
      "handler": "grid_window::personal",
      "method": "POST",
      "path": "/api/me/grids/{register}",
      "id": "post_me_grids_register",
      "source": "crates/kc-api/src/grid_window.rs",
      "pathParams": [
        {
          "name": "register",
          "schema": {
            "type": "string"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/GridQuery"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/GridPage"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "personal_grid",
          "signature": "async fn personal_grid (& self , register : & str , query : & grid_page :: GridQuery ,) -> Result < grid_page :: GridPage >",
          "params": [
            {
              "pattern": "register",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "query",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "GridQuery",
                    "name": "grid_page::GridQuery",
                    "text": "grid_page :: GridQuery"
                  }
                ],
                "name": "reference",
                "text": "& grid_page :: GridQuery"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "GridPage",
                "name": "grid_page::GridPage",
                "text": "grid_page :: GridPage"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < grid_page :: GridPage >"
          }
        }
      ],
      "errors": [
        "unknown_grid"
      ]
    },
    {
      "handler": "security::set_name",
      "method": "POST",
      "path": "/api/me/name",
      "id": "post_me_name",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/SetProfileName"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Me"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "set_profile_name",
          "signature": "async fn set_profile_name (& self , name : & str) -> Result < Me >",
          "params": [
            {
              "pattern": "name",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Me",
                "name": "Me",
                "text": "Me"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Me >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::offline_permit",
      "method": "GET",
      "path": "/api/me/offline-permit",
      "id": "get_me_offline_permit",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/OfflinePermit"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "offline_permit",
          "signature": "async fn offline_permit (& self) -> Result < OfflinePermit >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [],
                "base": "OfflinePermit",
                "name": "OfflinePermit",
                "text": "OfflinePermit"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < OfflinePermit >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::passkey_add",
      "method": "POST",
      "path": "/api/me/passkeys",
      "id": "post_me_passkeys",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/PasskeyRegistration"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/RecoveryCodes"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "add_passkey",
          "signature": "async fn add_passkey (& self , r : & PasskeyRegistration) -> Result < RecoveryCodes >",
          "params": [
            {
              "pattern": "r",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "PasskeyRegistration",
                    "name": "PasskeyRegistration",
                    "text": "PasskeyRegistration"
                  }
                ],
                "name": "reference",
                "text": "& PasskeyRegistration"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "RecoveryCodes",
                "name": "RecoveryCodes",
                "text": "RecoveryCodes"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < RecoveryCodes >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::passkey_options",
      "method": "POST",
      "path": "/api/me/passkeys/options",
      "id": "post_me_passkeys_options",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PasskeyCreationOptions"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "passkey_options",
          "signature": "async fn passkey_options (& self) -> Result < PasskeyCreationOptions >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PasskeyCreationOptions",
                "name": "PasskeyCreationOptions",
                "text": "PasskeyCreationOptions"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PasskeyCreationOptions >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::passkey_remove",
      "method": "POST",
      "path": "/api/me/passkeys/{id}/delete",
      "id": "post_me_passkeys_id_delete",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/PasswordConfirm"
      },
      "auth": "Db",
      "response": {
        "status": 204,
        "contentType": null,
        "schema": null,
        "statuses": [
          204
        ]
      },
      "rust": [
        {
          "name": "remove_passkey",
          "signature": "async fn remove_passkey (& self , id : i64 , password : & str) -> Result < () >",
          "params": [
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            },
            {
              "pattern": "password",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "preferences",
      "method": "GET",
      "path": "/api/me/preferences",
      "id": "get_me_preferences",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "preferences",
          "signature": "async fn preferences (& self) -> Result < std :: collections :: BTreeMap < String , String > >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "String",
                    "name": "String",
                    "text": "String"
                  },
                  {
                    "args": [],
                    "base": "String",
                    "name": "String",
                    "text": "String"
                  }
                ],
                "base": "BTreeMap",
                "name": "std::collections::BTreeMap",
                "text": "std :: collections :: BTreeMap < String , String >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < std :: collections :: BTreeMap < String , String > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "set_preference",
      "method": "POST",
      "path": "/api/me/preferences",
      "id": "post_me_preferences",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/SetPreference"
      },
      "auth": "Db",
      "response": {
        "status": 204,
        "contentType": null,
        "schema": null,
        "statuses": [
          204
        ]
      },
      "rust": [
        {
          "name": "set_preference",
          "signature": "async fn set_preference (& self , key : & str , value : & str) -> Result < () >",
          "params": [
            {
              "pattern": "key",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "value",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::recovery_codes",
      "method": "POST",
      "path": "/api/me/recovery-codes",
      "id": "post_me_recovery_codes",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/PasswordConfirm"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/RecoveryCodes"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "regenerate_recovery_codes",
          "signature": "async fn regenerate_recovery_codes (& self , password : & str) -> Result < RecoveryCodes >",
          "params": [
            {
              "pattern": "password",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "RecoveryCodes",
                "name": "RecoveryCodes",
                "text": "RecoveryCodes"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < RecoveryCodes >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::security_info",
      "method": "GET",
      "path": "/api/me/security",
      "id": "get_me_security",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": {
        "$ref": "#/$defs/api::security::SecurityQuery"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AccountSecurityInfo"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "account_security",
          "signature": "async fn account_security (& self) -> Result < AccountSecurityInfo >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AccountSecurityInfo",
                "name": "AccountSecurityInfo",
                "text": "AccountSecurityInfo"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AccountSecurityInfo >"
          }
        },
        {
          "name": "security_summary",
          "signature": "async fn security_summary (& self) -> Result < AccountSecurityInfo >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AccountSecurityInfo",
                "name": "AccountSecurityInfo",
                "text": "AccountSecurityInfo"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AccountSecurityInfo >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "support::account_overview",
      "method": "GET",
      "path": "/api/me/support",
      "id": "get_me_support",
      "source": "crates/kc-api/src/support.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SupportOverview"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "account_support",
          "signature": "async fn account_support (& self) -> Result < SupportOverview >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SupportOverview",
                "name": "SupportOverview",
                "text": "SupportOverview"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SupportOverview >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "support::account_chat_session",
      "method": "POST",
      "path": "/api/me/support/session",
      "id": "post_me_support_session",
      "source": "crates/kc-api/src/support.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ChatSession"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "account_chat_session",
          "signature": "async fn account_chat_session (& self) -> Result < ChatSession >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ChatSession",
                "name": "ChatSession",
                "text": "ChatSession"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ChatSession >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::totp_begin",
      "method": "POST",
      "path": "/api/me/totp/begin",
      "id": "post_me_totp_begin",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TotpSetup"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "totp_begin",
          "signature": "async fn totp_begin (& self) -> Result < TotpSetup >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TotpSetup",
                "name": "TotpSetup",
                "text": "TotpSetup"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TotpSetup >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::totp_disable",
      "method": "POST",
      "path": "/api/me/totp/disable",
      "id": "post_me_totp_disable",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/PasswordConfirm"
      },
      "auth": "Db",
      "response": {
        "status": 204,
        "contentType": null,
        "schema": null,
        "statuses": [
          204
        ]
      },
      "rust": [
        {
          "name": "totp_disable",
          "signature": "async fn totp_disable (& self , password : & str) -> Result < () >",
          "params": [
            {
              "pattern": "password",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::totp_enable",
      "method": "POST",
      "path": "/api/me/totp/enable",
      "id": "post_me_totp_enable",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [],
      "query": null,
      "body": {
        "$ref": "#/$defs/TotpCode"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/RecoveryCodes"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "totp_enable",
          "signature": "async fn totp_enable (& self , code : & str) -> Result < RecoveryCodes >",
          "params": [
            {
              "pattern": "code",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "RecoveryCodes",
                "name": "RecoveryCodes",
                "text": "RecoveryCodes"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < RecoveryCodes >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "organization::directory",
      "method": "GET",
      "path": "/api/organizations",
      "id": "get_organizations",
      "source": "crates/kc-api/src/organization.rs",
      "pathParams": [],
      "query": {
        "$ref": "#/$defs/api::organization::DirectoryQuery"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/OrganizationDirectory"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "organizations",
          "signature": "async fn organizations (& self , tenant : Option < TenantId >) -> Result < OrganizationDirectory >",
          "params": [
            {
              "pattern": "tenant",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "TenantId",
                    "name": "TenantId",
                    "text": "TenantId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < TenantId >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "OrganizationDirectory",
                "name": "OrganizationDirectory",
                "text": "OrganizationDirectory"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < OrganizationDirectory >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "organization::save_logo",
      "method": "POST",
      "path": "/api/organizations/{id}/logo",
      "id": "post_organizations_id_logo",
      "source": "crates/kc-api/src/organization.rs",
      "pathParams": [
        {
          "name": "id",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "type": "string",
        "format": "binary"
      },
      "auth": "Db",
      "response": {
        "status": 204,
        "contentType": null,
        "schema": null,
        "statuses": [
          204
        ]
      },
      "rust": [
        {
          "name": "set_organization_logo",
          "signature": "async fn set_organization_logo (& self , id : BureauId , png : Vec < u8 >) -> Result < () >",
          "params": [
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            },
            {
              "pattern": "png",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": [
        "bureau_forbidden",
        "internal",
        "logo_invalid"
      ]
    },
    {
      "handler": "organization::download_logo",
      "method": "GET",
      "path": "/api/organizations/{id}/logo.png",
      "id": "get_organizations_id_logo_png",
      "source": "crates/kc-api/src/organization.rs",
      "pathParams": [
        {
          "name": "id",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "image/png",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "organization_logo_png",
          "signature": "async fn organization_logo_png (& self , id : BureauId) -> Result < Vec < u8 > >",
          "params": [
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < u8 > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "organization::remove_logo",
      "method": "POST",
      "path": "/api/organizations/{id}/logo/remove",
      "id": "post_organizations_id_logo_remove",
      "source": "crates/kc-api/src/organization.rs",
      "pathParams": [
        {
          "name": "id",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 204,
        "contentType": null,
        "schema": null,
        "statuses": [
          204
        ]
      },
      "rust": [
        {
          "name": "remove_organization_logo",
          "signature": "async fn remove_organization_logo (& self , id : BureauId) -> Result < () >",
          "params": [
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "organization::profile",
      "method": "GET",
      "path": "/api/organizations/{id}/profile",
      "id": "get_organizations_id_profile",
      "source": "crates/kc-api/src/organization.rs",
      "pathParams": [
        {
          "name": "id",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/OrganizationProfile"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "organization_profile",
          "signature": "async fn organization_profile (& self , id : BureauId) -> Result < OrganizationProfile >",
          "params": [
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "OrganizationProfile",
                "name": "OrganizationProfile",
                "text": "OrganizationProfile"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < OrganizationProfile >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "organization::save_profile",
      "method": "POST",
      "path": "/api/organizations/{id}/profile",
      "id": "post_organizations_id_profile",
      "source": "crates/kc-api/src/organization.rs",
      "pathParams": [
        {
          "name": "id",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/OrganizationProfile"
      },
      "auth": "Db",
      "response": {
        "status": 204,
        "contentType": null,
        "schema": null,
        "statuses": [
          204
        ]
      },
      "rust": [
        {
          "name": "set_organization_profile",
          "signature": "async fn set_organization_profile (& self , id : BureauId , profile : & OrganizationProfile ,) -> Result < () >",
          "params": [
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            },
            {
              "pattern": "profile",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "OrganizationProfile",
                    "name": "OrganizationProfile",
                    "text": "OrganizationProfile"
                  }
                ],
                "name": "reference",
                "text": "& OrganizationProfile"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "sign_requests::info",
      "method": "GET",
      "path": "/api/sign/{token}",
      "id": "get_sign_token",
      "source": "crates/kc-api/src/sign_requests.rs",
      "pathParams": [
        {
          "name": "token",
          "schema": {
            "type": "string"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "link",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SignInfo"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "sign_info",
          "signature": "async fn sign_info (& self , token : & str) -> Result < SignInfo >",
          "params": [
            {
              "pattern": "token",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SignInfo",
                "name": "SignInfo",
                "text": "SignInfo"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SignInfo >"
          }
        }
      ],
      "errors": [
        "internal"
      ]
    },
    {
      "handler": "sign_requests::decline",
      "method": "POST",
      "path": "/api/sign/{token}/decline",
      "id": "post_sign_token_decline",
      "source": "crates/kc-api/src/sign_requests.rs",
      "pathParams": [
        {
          "name": "token",
          "schema": {
            "type": "string"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SignDecline"
      },
      "auth": "link",
      "response": {
        "status": 204,
        "contentType": null,
        "schema": null,
        "statuses": [
          204
        ]
      },
      "rust": [
        {
          "name": "sign_decline",
          "signature": "async fn sign_decline (& self , token : & str , reason : & str) -> Result < () >",
          "params": [
            {
              "pattern": "token",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "reason",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": [
        "bad_request"
      ]
    },
    {
      "handler": "sign_requests::document",
      "method": "GET",
      "path": "/api/sign/{token}/document",
      "id": "get_sign_token_document",
      "source": "crates/kc-api/src/sign_requests.rs",
      "pathParams": [
        {
          "name": "token",
          "schema": {
            "type": "string"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "link",
      "response": {
        "status": 200,
        "contentType": "application/pdf",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "sign_document",
          "signature": "async fn sign_document (& self , token : & str) -> Result < Vec < u8 > >",
          "params": [
            {
              "pattern": "token",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < u8 > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "sign_requests::finish",
      "method": "POST",
      "path": "/api/sign/{token}/finish",
      "id": "post_sign_token_finish",
      "source": "crates/kc-api/src/sign_requests.rs",
      "pathParams": [
        {
          "name": "token",
          "schema": {
            "type": "string"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SignFinish"
      },
      "auth": "link",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SignFinished"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "sign_finish",
          "signature": "async fn sign_finish (& self , token : & str , f : & SignFinish) -> Result < SignFinished >",
          "params": [
            {
              "pattern": "token",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "f",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "SignFinish",
                    "name": "SignFinish",
                    "text": "SignFinish"
                  }
                ],
                "name": "reference",
                "text": "& SignFinish"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SignFinished",
                "name": "SignFinished",
                "text": "SignFinished"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SignFinished >"
          }
        }
      ],
      "errors": [
        "bad_request",
        "bad_signature",
        "sign_document_changed"
      ]
    },
    {
      "handler": "sign_requests::prepare",
      "method": "POST",
      "path": "/api/sign/{token}/prepare",
      "id": "post_sign_token_prepare",
      "source": "crates/kc-api/src/sign_requests.rs",
      "pathParams": [
        {
          "name": "token",
          "schema": {
            "type": "string"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SignPrepare"
      },
      "auth": "link",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SignPrepared"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "sign_prepare",
          "signature": "async fn sign_prepare (& self , token : & str , p : & SignPrepare) -> Result < SignPrepared >",
          "params": [
            {
              "pattern": "token",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "p",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "SignPrepare",
                    "name": "SignPrepare",
                    "text": "SignPrepare"
                  }
                ],
                "name": "reference",
                "text": "& SignPrepare"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SignPrepared",
                "name": "SignPrepared",
                "text": "SignPrepared"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SignPrepared >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "absences::list",
      "method": "GET",
      "path": "/api/t/{tid}/absences",
      "id": "get_t_tid_absences",
      "source": "crates/kc-api/src/absences.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::absences::ListQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Absence"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "absences",
          "signature": "async fn absences (& self , tid : TenantId , year : Option < i32 > , employee_id : Option < EmployeeId > ,) -> Result < Vec < Absence > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            },
            {
              "pattern": "employee_id",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "EmployeeId",
                    "name": "EmployeeId",
                    "text": "EmployeeId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < EmployeeId >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "Absence",
                    "name": "Absence",
                    "text": "Absence"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < Absence >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < Absence > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "absences::record",
      "method": "POST",
      "path": "/api/t/{tid}/absences",
      "id": "post_t_tid_absences",
      "source": "crates/kc-api/src/absences.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewAbsence"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Absence"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "record_absence",
          "signature": "async fn record_absence (& self , tid : TenantId , n : & NewAbsence) -> Result < Absence >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewAbsence",
                    "name": "NewAbsence",
                    "text": "NewAbsence"
                  }
                ],
                "name": "reference",
                "text": "& NewAbsence"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Absence",
                "name": "Absence",
                "text": "Absence"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Absence >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "absences::cancel",
      "method": "POST",
      "path": "/api/t/{tid}/absences/{id}/cancel",
      "id": "post_t_tid_absences_id_cancel",
      "source": "crates/kc-api/src/absences.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelAbsence"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Absence"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cancel_absence",
          "signature": "async fn cancel_absence (& self , tid : TenantId , id : AbsenceId , c : & CancelAbsence ,) -> Result < Absence >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AbsenceId",
                "name": "AbsenceId",
                "text": "AbsenceId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "CancelAbsence",
                    "name": "CancelAbsence",
                    "text": "CancelAbsence"
                  }
                ],
                "name": "reference",
                "text": "& CancelAbsence"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Absence",
                "name": "Absence",
                "text": "Absence"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Absence >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "list_accounts",
      "method": "GET",
      "path": "/api/t/{tid}/accounts",
      "id": "get_t_tid_accounts",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "BookDb",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Account"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "accounts",
          "signature": "async fn accounts (& self , tid : TenantId) -> Result < Vec < Account > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "Account",
                    "name": "Account",
                    "text": "Account"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < Account >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < Account > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "create_account",
      "method": "POST",
      "path": "/api/t/{tid}/accounts",
      "id": "post_t_tid_accounts",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewAccount"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Account"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_account",
          "signature": "async fn create_account (& self , tid : TenantId , a : & NewAccount) -> Result < Account >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "a",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewAccount",
                    "name": "NewAccount",
                    "text": "NewAccount"
                  }
                ],
                "name": "reference",
                "text": "& NewAccount"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Account",
                "name": "Account",
                "text": "Account"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Account >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "account_card",
      "method": "GET",
      "path": "/api/t/{tid}/accounts/{code}/card",
      "id": "get_t_tid_accounts_code_card",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "code",
          "schema": {
            "type": "string"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::LedgerQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CardRow"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "card",
          "signature": "async fn card (& self , tid : TenantId , account : & str , from : Option < NaiveDate > , to : Option < NaiveDate > ,) -> Result < Vec < CardRow > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "account",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "from",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            },
            {
              "pattern": "to",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "CardRow",
                    "name": "CardRow",
                    "text": "CardRow"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < CardRow >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < CardRow > >"
          }
        },
        {
          "name": "card_for_center",
          "signature": "async fn card_for_center (& self , tid : TenantId , account : & str , from : Option < NaiveDate > , to : Option < NaiveDate > , center : CostCenterId ,) -> Result < Vec < CardRow > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "account",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "from",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            },
            {
              "pattern": "to",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            },
            {
              "pattern": "center",
              "type": {
                "args": [],
                "base": "CostCenterId",
                "name": "CostCenterId",
                "text": "CostCenterId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "CardRow",
                    "name": "CardRow",
                    "text": "CardRow"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < CardRow >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < CardRow > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "security::tenant_activity",
      "method": "GET",
      "path": "/api/t/{tid}/activity",
      "id": "get_t_tid_activity",
      "source": "crates/kc-api/src/security.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::security::Page"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ActivityEntry"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "tenant_activity",
          "signature": "async fn tenant_activity (& self , tid : TenantId , before : Option < i64 > ,) -> Result < Vec < ActivityEntry > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "before",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i64",
                    "name": "i64",
                    "text": "i64"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i64 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "ActivityEntry",
                    "name": "ActivityEntry",
                    "text": "ActivityEntry"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < ActivityEntry >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < ActivityEntry > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "partners::ageing",
      "method": "GET",
      "path": "/api/t/{tid}/ageing",
      "id": "get_t_tid_ageing",
      "source": "crates/kc-api/src/partners.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::partners::DateQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AgeingRow"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "ageing",
          "signature": "async fn ageing (& self , tid : TenantId , date : Option < NaiveDate >) -> Result < Vec < AgeingRow > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "date",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "AgeingRow",
                    "name": "AgeingRow",
                    "text": "AgeingRow"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < AgeingRow >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < AgeingRow > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "agreements::list",
      "method": "GET",
      "path": "/api/t/{tid}/agreements",
      "id": "get_t_tid_agreements",
      "source": "crates/kc-api/src/agreements.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AgreementSummary"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "agreements",
          "signature": "async fn agreements (& self , tid : TenantId) -> Result < Vec < AgreementSummary > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "AgreementSummary",
                    "name": "AgreementSummary",
                    "text": "AgreementSummary"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < AgreementSummary >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < AgreementSummary > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "agreements::create",
      "method": "POST",
      "path": "/api/t/{tid}/agreements",
      "id": "post_t_tid_agreements",
      "source": "crates/kc-api/src/agreements.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewAgreement"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AgreementDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_agreement",
          "signature": "async fn create_agreement (& self , tid : TenantId , n : & NewAgreement ,) -> Result < AgreementDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewAgreement",
                    "name": "NewAgreement",
                    "text": "NewAgreement"
                  }
                ],
                "name": "reference",
                "text": "& NewAgreement"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AgreementDetail",
                "name": "AgreementDetail",
                "text": "AgreementDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AgreementDetail >"
          }
        }
      ],
      "errors": [
        "bad_contract"
      ]
    },
    {
      "handler": "agreements::get_one",
      "method": "GET",
      "path": "/api/t/{tid}/agreements/{id}",
      "id": "get_t_tid_agreements_id",
      "source": "crates/kc-api/src/agreements.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/AgreementId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AgreementDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "agreement",
          "signature": "async fn agreement (& self , tid : TenantId , id : AgreementId) -> Result < AgreementDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AgreementId",
                "name": "AgreementId",
                "text": "AgreementId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AgreementDetail",
                "name": "AgreementDetail",
                "text": "AgreementDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AgreementDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "agreements::add_document",
      "method": "POST",
      "path": "/api/t/{tid}/agreements/{id}/documents",
      "id": "post_t_tid_agreements_id_documents",
      "source": "crates/kc-api/src/agreements.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/AgreementId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewAgreementDocument"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AgreementDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_agreement_document",
          "signature": "async fn add_agreement_document (& self , tid : TenantId , id : AgreementId , d : & NewAgreementDocument ,) -> Result < AgreementDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AgreementId",
                "name": "AgreementId",
                "text": "AgreementId"
              }
            },
            {
              "pattern": "d",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewAgreementDocument",
                    "name": "NewAgreementDocument",
                    "text": "NewAgreementDocument"
                  }
                ],
                "name": "reference",
                "text": "& NewAgreementDocument"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AgreementDetail",
                "name": "AgreementDetail",
                "text": "AgreementDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AgreementDetail >"
          }
        }
      ],
      "errors": [
        "bad_document"
      ]
    },
    {
      "handler": "agreements::sign",
      "method": "POST",
      "path": "/api/t/{tid}/agreements/{id}/documents/{doc}/sign",
      "id": "post_t_tid_agreements_id_documents_doc_sign",
      "source": "crates/kc-api/src/agreements.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/AgreementId"
          }
        },
        {
          "name": "doc",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AgreementDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "sign_agreement",
          "signature": "async fn sign_agreement (& self , tid : TenantId , id : AgreementId , doc : i64 ,) -> Result < AgreementDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AgreementId",
                "name": "AgreementId",
                "text": "AgreementId"
              }
            },
            {
              "pattern": "doc",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AgreementDetail",
                "name": "AgreementDetail",
                "text": "AgreementDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AgreementDetail >"
          }
        }
      ],
      "errors": [
        "sign_failed"
      ]
    },
    {
      "handler": "agreements::add_signature",
      "method": "POST",
      "path": "/api/t/{tid}/agreements/{id}/documents/{doc}/signatures",
      "id": "post_t_tid_agreements_id_documents_doc_signatures",
      "source": "crates/kc-api/src/agreements.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/AgreementId"
          }
        },
        {
          "name": "doc",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/AddSignature"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AgreementDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_agreement_signature",
          "signature": "async fn add_agreement_signature (& self , tid : TenantId , id : AgreementId , doc : i64 , attachment_id : AttachmentId ,) -> Result < AgreementDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AgreementId",
                "name": "AgreementId",
                "text": "AgreementId"
              }
            },
            {
              "pattern": "doc",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            },
            {
              "pattern": "attachment_id",
              "type": {
                "args": [],
                "base": "AttachmentId",
                "name": "AttachmentId",
                "text": "AttachmentId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AgreementDetail",
                "name": "AgreementDetail",
                "text": "AgreementDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AgreementDetail >"
          }
        }
      ],
      "errors": [
        "bad_signature",
        "signature_exists"
      ]
    },
    {
      "handler": "agreements::event",
      "method": "POST",
      "path": "/api/t/{tid}/agreements/{id}/events",
      "id": "post_t_tid_agreements_id_events",
      "source": "crates/kc-api/src/agreements.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/AgreementId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/AgreementEventReq"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AgreementDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "agreement_event",
          "signature": "async fn agreement_event (& self , tid : TenantId , id : AgreementId , e : & AgreementEventReq ,) -> Result < AgreementDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AgreementId",
                "name": "AgreementId",
                "text": "AgreementId"
              }
            },
            {
              "pattern": "e",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "AgreementEventReq",
                    "name": "AgreementEventReq",
                    "text": "AgreementEventReq"
                  }
                ],
                "name": "reference",
                "text": "& AgreementEventReq"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AgreementDetail",
                "name": "AgreementDetail",
                "text": "AgreementDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AgreementDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "agreements::add_party",
      "method": "POST",
      "path": "/api/t/{tid}/agreements/{id}/parties",
      "id": "post_t_tid_agreements_id_parties",
      "source": "crates/kc-api/src/agreements.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/AgreementId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewParty"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AgreementDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_agreement_party",
          "signature": "async fn add_agreement_party (& self , tid : TenantId , id : AgreementId , p : & NewParty ,) -> Result < AgreementDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AgreementId",
                "name": "AgreementId",
                "text": "AgreementId"
              }
            },
            {
              "pattern": "p",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewParty",
                    "name": "NewParty",
                    "text": "NewParty"
                  }
                ],
                "name": "reference",
                "text": "& NewParty"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AgreementDetail",
                "name": "AgreementDetail",
                "text": "AgreementDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AgreementDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "agreements::report",
      "method": "GET",
      "path": "/api/t/{tid}/agreements/{id}/report",
      "id": "get_t_tid_agreements_id_report",
      "source": "crates/kc-api/src/agreements.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/AgreementId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "text/html",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "agreement_report",
          "signature": "async fn agreement_report (& self , tid : TenantId , id : AgreementId) -> Result < String >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AgreementId",
                "name": "AgreementId",
                "text": "AgreementId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "String",
                "name": "String",
                "text": "String"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < String >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "sign_requests::list",
      "method": "GET",
      "path": "/api/t/{tid}/agreements/{id}/sign-requests",
      "id": "get_t_tid_agreements_id_sign_requests",
      "source": "crates/kc-api/src/sign_requests.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/AgreementId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SignRequest"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "sign_requests",
          "signature": "async fn sign_requests (& self , tid : TenantId , id : AgreementId) -> Result < Vec < SignRequest > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AgreementId",
                "name": "AgreementId",
                "text": "AgreementId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "SignRequest",
                    "name": "SignRequest",
                    "text": "SignRequest"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < SignRequest >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < SignRequest > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "sign_requests::create",
      "method": "POST",
      "path": "/api/t/{tid}/agreements/{id}/sign-requests",
      "id": "post_t_tid_agreements_id_sign_requests",
      "source": "crates/kc-api/src/sign_requests.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/AgreementId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewSignRequest"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SignRequest"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_sign_request",
          "signature": "async fn create_sign_request (& self , tid : TenantId , id : AgreementId , n : & NewSignRequest ,) -> Result < SignRequest >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AgreementId",
                "name": "AgreementId",
                "text": "AgreementId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewSignRequest",
                    "name": "NewSignRequest",
                    "text": "NewSignRequest"
                  }
                ],
                "name": "reference",
                "text": "& NewSignRequest"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SignRequest",
                "name": "SignRequest",
                "text": "SignRequest"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SignRequest >"
          }
        }
      ],
      "errors": [
        "sign_internal",
        "sign_request_invalid"
      ]
    },
    {
      "handler": "sign_requests::cancel",
      "method": "POST",
      "path": "/api/t/{tid}/agreements/{id}/sign-requests/{rid}/cancel",
      "id": "post_t_tid_agreements_id_sign_requests_rid_cancel",
      "source": "crates/kc-api/src/sign_requests.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/AgreementId"
          }
        },
        {
          "name": "rid",
          "schema": {
            "$ref": "#/$defs/SignRequestId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SignCancel"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SignRequest"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "cancel_sign_request",
          "signature": "async fn cancel_sign_request (& self , tid : TenantId , id : AgreementId , rid : SignRequestId , reason : & str ,) -> Result < SignRequest >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AgreementId",
                "name": "AgreementId",
                "text": "AgreementId"
              }
            },
            {
              "pattern": "rid",
              "type": {
                "args": [],
                "base": "SignRequestId",
                "name": "SignRequestId",
                "text": "SignRequestId"
              }
            },
            {
              "pattern": "reason",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SignRequest",
                "name": "SignRequest",
                "text": "SignRequest"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SignRequest >"
          }
        }
      ],
      "errors": [
        "sign_request_closed"
      ]
    },
    {
      "handler": "sign_requests::decline_internal",
      "method": "POST",
      "path": "/api/t/{tid}/agreements/{id}/sign-requests/{rid}/decline",
      "id": "post_t_tid_agreements_id_sign_requests_rid_decline",
      "source": "crates/kc-api/src/sign_requests.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/AgreementId"
          }
        },
        {
          "name": "rid",
          "schema": {
            "$ref": "#/$defs/SignRequestId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SignDecline"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SignRequest"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "sign_request_decline",
          "signature": "async fn sign_request_decline (& self , tid : TenantId , id : AgreementId , rid : SignRequestId , reason : & str ,) -> Result < SignRequest >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AgreementId",
                "name": "AgreementId",
                "text": "AgreementId"
              }
            },
            {
              "pattern": "rid",
              "type": {
                "args": [],
                "base": "SignRequestId",
                "name": "SignRequestId",
                "text": "SignRequestId"
              }
            },
            {
              "pattern": "reason",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SignRequest",
                "name": "SignRequest",
                "text": "SignRequest"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SignRequest >"
          }
        }
      ],
      "errors": [
        "bad_request"
      ]
    },
    {
      "handler": "sign_requests::resend",
      "method": "POST",
      "path": "/api/t/{tid}/agreements/{id}/sign-requests/{rid}/resend",
      "id": "post_t_tid_agreements_id_sign_requests_rid_resend",
      "source": "crates/kc-api/src/sign_requests.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/AgreementId"
          }
        },
        {
          "name": "rid",
          "schema": {
            "$ref": "#/$defs/SignRequestId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SignRequest"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "resend_sign_request",
          "signature": "async fn resend_sign_request (& self , tid : TenantId , id : AgreementId , rid : SignRequestId ,) -> Result < SignRequest >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AgreementId",
                "name": "AgreementId",
                "text": "AgreementId"
              }
            },
            {
              "pattern": "rid",
              "type": {
                "args": [],
                "base": "SignRequestId",
                "name": "SignRequestId",
                "text": "SignRequestId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SignRequest",
                "name": "SignRequest",
                "text": "SignRequest"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SignRequest >"
          }
        }
      ],
      "errors": [
        "sign_internal",
        "sign_request_closed"
      ]
    },
    {
      "handler": "sign_requests::sign_internal",
      "method": "POST",
      "path": "/api/t/{tid}/agreements/{id}/sign-requests/{rid}/sign",
      "id": "post_t_tid_agreements_id_sign_requests_rid_sign",
      "source": "crates/kc-api/src/sign_requests.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/AgreementId"
          }
        },
        {
          "name": "rid",
          "schema": {
            "$ref": "#/$defs/SignRequestId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SignRequest"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "sign_request_sign",
          "signature": "async fn sign_request_sign (& self , tid : TenantId , id : AgreementId , rid : SignRequestId ,) -> Result < SignRequest >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AgreementId",
                "name": "AgreementId",
                "text": "AgreementId"
              }
            },
            {
              "pattern": "rid",
              "type": {
                "args": [],
                "base": "SignRequestId",
                "name": "SignRequestId",
                "text": "SignRequestId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SignRequest",
                "name": "SignRequest",
                "text": "SignRequest"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SignRequest >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "addon::draft",
      "method": "POST",
      "path": "/api/t/{tid}/ai-package/drafts",
      "id": "post_t_tid_ai_package_drafts",
      "source": "crates/kc-api/src/addon.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::addon::AiConfirmation"
      },
      "body": {
        "type": "string",
        "format": "binary"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Draft"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "ai_package_draft",
          "signature": "async fn ai_package_draft (& self , tid : TenantId , filename : & str , mime : & str , content : Vec < u8 > ,) -> Result < Draft >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "filename",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "mime",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "content",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Draft",
                "name": "Draft",
                "text": "Draft"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Draft >"
          }
        },
        {
          "name": "ai_package_draft_confirmed",
          "signature": "async fn ai_package_draft_confirmed (& self , tid : TenantId , filename : & str , mime : & str , content : Vec < u8 > , confirmed_credits : Option < i32 > ,) -> Result < Draft >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "filename",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "mime",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "content",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            },
            {
              "pattern": "confirmed_credits",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Draft",
                "name": "Draft",
                "text": "Draft"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Draft >"
          }
        }
      ],
      "errors": [
        "ai_not_configured",
        "ai_read_failed",
        "amount",
        "date",
        "duplicate_invoice",
        "expense_account",
        "incomplete_invoice",
        "invalid_invoice",
        "supplier",
        "too_large",
        "unsupported_document"
      ]
    },
    {
      "handler": "addon::order",
      "method": "POST",
      "path": "/api/t/{tid}/ai-package/orders",
      "id": "post_t_tid_ai_package_orders",
      "source": "crates/kc-api/src/addon.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::addon::OrderQuantity"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "integer",
          "format": "i64"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "order_ai_package",
          "signature": "async fn order_ai_package (& self , tid : TenantId) -> Result < i64 >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < i64 >"
          }
        },
        {
          "name": "order_ai_packages",
          "signature": "async fn order_ai_packages (& self , tid : TenantId , packs : i32) -> Result < i64 >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "packs",
              "type": {
                "args": [],
                "base": "i32",
                "name": "i32",
                "text": "i32"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < i64 >"
          }
        },
        {
          "name": "order_ai_packages_at_price",
          "signature": "async fn order_ai_packages_at_price (& self , tid : TenantId , packs : i32 , expected_gross : i64 ,) -> Result < i64 >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "packs",
              "type": {
                "args": [],
                "base": "i32",
                "name": "i32",
                "text": "i32"
              }
            },
            {
              "pattern": "expected_gross",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < i64 >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "control::approval",
      "method": "GET",
      "path": "/api/t/{tid}/approval",
      "id": "get_t_tid_approval",
      "source": "crates/kc-api/src/control.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ApprovalSetting"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "approval",
          "signature": "async fn approval (& self , tid : TenantId) -> Result < ApprovalSetting >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ApprovalSetting",
                "name": "ApprovalSetting",
                "text": "ApprovalSetting"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ApprovalSetting >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "control::set_approval",
      "method": "POST",
      "path": "/api/t/{tid}/approval",
      "id": "post_t_tid_approval",
      "source": "crates/kc-api/src/control.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SetApproval"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ApprovalSetting"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "set_approval",
          "signature": "async fn set_approval (& self , tid : TenantId , enabled : bool , reason : & str ,) -> Result < ApprovalSetting >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "enabled",
              "type": {
                "args": [],
                "base": "bool",
                "name": "bool",
                "text": "bool"
              }
            },
            {
              "pattern": "reason",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ApprovalSetting",
                "name": "ApprovalSetting",
                "text": "ApprovalSetting"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ApprovalSetting >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "archive::archive",
      "method": "GET",
      "path": "/api/t/{tid}/archive",
      "id": "get_t_tid_archive",
      "source": "crates/kc-api/src/archive.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/zip",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "archive",
          "signature": "async fn archive (& self , tid : TenantId) -> Result < Vec < u8 > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < u8 > >"
          }
        }
      ],
      "errors": [
        "archive_too_large",
        "hash_mismatch",
        "internal"
      ]
    },
    {
      "handler": "fixed_assets::counts",
      "method": "GET",
      "path": "/api/t/{tid}/asset-counts",
      "id": "get_t_tid_asset_counts",
      "source": "crates/kc-api/src/fixed_assets.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AssetCount"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "asset_counts",
          "signature": "async fn asset_counts (& self , tid : TenantId) -> Result < Vec < AssetCount > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "AssetCount",
                    "name": "AssetCount",
                    "text": "AssetCount"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < AssetCount >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < AssetCount > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "fixed_assets::create_count",
      "method": "POST",
      "path": "/api/t/{tid}/asset-counts",
      "id": "post_t_tid_asset_counts",
      "source": "crates/kc-api/src/fixed_assets.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewAssetCount"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AssetCountDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_asset_count",
          "signature": "async fn create_asset_count (& self , tid : TenantId , n : & NewAssetCount ,) -> Result < AssetCountDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewAssetCount",
                    "name": "NewAssetCount",
                    "text": "NewAssetCount"
                  }
                ],
                "name": "reference",
                "text": "& NewAssetCount"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AssetCountDetail",
                "name": "AssetCountDetail",
                "text": "AssetCountDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AssetCountDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "fixed_assets::count",
      "method": "GET",
      "path": "/api/t/{tid}/asset-counts/{id}",
      "id": "get_t_tid_asset_counts_id",
      "source": "crates/kc-api/src/fixed_assets.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AssetCountDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "asset_count",
          "signature": "async fn asset_count (& self , tid : TenantId , id : AssetCountId) -> Result < AssetCountDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AssetCountId",
                "name": "AssetCountId",
                "text": "AssetCountId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AssetCountDetail",
                "name": "AssetCountDetail",
                "text": "AssetCountDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AssetCountDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "fixed_assets::book_count",
      "method": "POST",
      "path": "/api/t/{tid}/asset-counts/{id}/book",
      "id": "post_t_tid_asset_counts_id_book",
      "source": "crates/kc-api/src/fixed_assets.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/BookAssetCount"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AssetCountDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "book_asset_count",
          "signature": "async fn book_asset_count (& self , tid : TenantId , id : AssetCountId , b : & BookAssetCount ,) -> Result < AssetCountDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AssetCountId",
                "name": "AssetCountId",
                "text": "AssetCountId"
              }
            },
            {
              "pattern": "b",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "BookAssetCount",
                    "name": "BookAssetCount",
                    "text": "BookAssetCount"
                  }
                ],
                "name": "reference",
                "text": "& BookAssetCount"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AssetCountDetail",
                "name": "AssetCountDetail",
                "text": "AssetCountDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AssetCountDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "fixed_assets::cancel_count",
      "method": "POST",
      "path": "/api/t/{tid}/asset-counts/{id}/cancel",
      "id": "post_t_tid_asset_counts_id_cancel",
      "source": "crates/kc-api/src/fixed_assets.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelAssetDocument"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AssetCountDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cancel_asset_count",
          "signature": "async fn cancel_asset_count (& self , tid : TenantId , id : AssetCountId , c : & CancelAssetDocument ,) -> Result < AssetCountDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AssetCountId",
                "name": "AssetCountId",
                "text": "AssetCountId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "CancelAssetDocument",
                    "name": "CancelAssetDocument",
                    "text": "CancelAssetDocument"
                  }
                ],
                "name": "reference",
                "text": "& CancelAssetDocument"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AssetCountDetail",
                "name": "AssetCountDetail",
                "text": "AssetCountDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AssetCountDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "fixed_assets::count_entry",
      "method": "POST",
      "path": "/api/t/{tid}/asset-counts/{id}/entries",
      "id": "post_t_tid_asset_counts_id_entries",
      "source": "crates/kc-api/src/fixed_assets.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewAssetCountEntry"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AssetCountDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "asset_count_entry",
          "signature": "async fn asset_count_entry (& self , tid : TenantId , id : AssetCountId , n : & NewAssetCountEntry ,) -> Result < AssetCountDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AssetCountId",
                "name": "AssetCountId",
                "text": "AssetCountId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewAssetCountEntry",
                    "name": "NewAssetCountEntry",
                    "text": "NewAssetCountEntry"
                  }
                ],
                "name": "reference",
                "text": "& NewAssetCountEntry"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AssetCountDetail",
                "name": "AssetCountDetail",
                "text": "AssetCountDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AssetCountDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "fixed_assets::lock_count",
      "method": "POST",
      "path": "/api/t/{tid}/asset-counts/{id}/lock",
      "id": "post_t_tid_asset_counts_id_lock",
      "source": "crates/kc-api/src/fixed_assets.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AssetCountDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "lock_asset_count",
          "signature": "async fn lock_asset_count (& self , tid : TenantId , id : AssetCountId ,) -> Result < AssetCountDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AssetCountId",
                "name": "AssetCountId",
                "text": "AssetCountId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AssetCountDetail",
                "name": "AssetCountDetail",
                "text": "AssetCountDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AssetCountDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "fixed_assets::count_sheet",
      "method": "GET",
      "path": "/api/t/{tid}/asset-counts/{id}/sheet",
      "id": "get_t_tid_asset_counts_id_sheet",
      "source": "crates/kc-api/src/fixed_assets.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "text/html",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "asset_count_sheet",
          "signature": "async fn asset_count_sheet (& self , tid : TenantId , id : AssetCountId) -> Result < String >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AssetCountId",
                "name": "AssetCountId",
                "text": "AssetCountId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "String",
                "name": "String",
                "text": "String"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < String >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "fixed_assets::disposals",
      "method": "GET",
      "path": "/api/t/{tid}/asset-disposals",
      "id": "get_t_tid_asset_disposals",
      "source": "crates/kc-api/src/fixed_assets.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::fixed_assets::AssetQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AssetDisposal"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "asset_disposals",
          "signature": "async fn asset_disposals (& self , tid : TenantId , asset : Option < AssetId > ,) -> Result < Vec < AssetDisposal > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "asset",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "AssetId",
                    "name": "AssetId",
                    "text": "AssetId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < AssetId >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "AssetDisposal",
                    "name": "AssetDisposal",
                    "text": "AssetDisposal"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < AssetDisposal >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < AssetDisposal > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "fixed_assets::dispose",
      "method": "POST",
      "path": "/api/t/{tid}/asset-disposals",
      "id": "post_t_tid_asset_disposals",
      "source": "crates/kc-api/src/fixed_assets.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewAssetDisposal"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AssetDisposal"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "dispose_asset",
          "signature": "async fn dispose_asset (& self , tid : TenantId , n : & NewAssetDisposal ,) -> Result < AssetDisposal >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewAssetDisposal",
                    "name": "NewAssetDisposal",
                    "text": "NewAssetDisposal"
                  }
                ],
                "name": "reference",
                "text": "& NewAssetDisposal"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AssetDisposal",
                "name": "AssetDisposal",
                "text": "AssetDisposal"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AssetDisposal >"
          }
        }
      ],
      "errors": [
        "bad_fixed_asset_document"
      ]
    },
    {
      "handler": "fixed_assets::cancel_disposal",
      "method": "POST",
      "path": "/api/t/{tid}/asset-disposals/{id}/cancel",
      "id": "post_t_tid_asset_disposals_id_cancel",
      "source": "crates/kc-api/src/fixed_assets.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelAssetDocument"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AssetDisposal"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cancel_asset_disposal",
          "signature": "async fn cancel_asset_disposal (& self , tid : TenantId , id : AssetDisposalId , c : & CancelAssetDocument ,) -> Result < AssetDisposal >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AssetDisposalId",
                "name": "AssetDisposalId",
                "text": "AssetDisposalId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "CancelAssetDocument",
                    "name": "CancelAssetDocument",
                    "text": "CancelAssetDocument"
                  }
                ],
                "name": "reference",
                "text": "& CancelAssetDocument"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AssetDisposal",
                "name": "AssetDisposal",
                "text": "AssetDisposal"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AssetDisposal >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "fixed_assets::revaluations",
      "method": "GET",
      "path": "/api/t/{tid}/asset-revaluations",
      "id": "get_t_tid_asset_revaluations",
      "source": "crates/kc-api/src/fixed_assets.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::fixed_assets::AssetQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AssetRevaluation"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "asset_revaluations",
          "signature": "async fn asset_revaluations (& self , tid : TenantId , asset : Option < AssetId > ,) -> Result < Vec < AssetRevaluation > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "asset",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "AssetId",
                    "name": "AssetId",
                    "text": "AssetId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < AssetId >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "AssetRevaluation",
                    "name": "AssetRevaluation",
                    "text": "AssetRevaluation"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < AssetRevaluation >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < AssetRevaluation > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "fixed_assets::revalue",
      "method": "POST",
      "path": "/api/t/{tid}/asset-revaluations",
      "id": "post_t_tid_asset_revaluations",
      "source": "crates/kc-api/src/fixed_assets.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewAssetRevaluation"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AssetRevaluation"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "revalue_asset",
          "signature": "async fn revalue_asset (& self , tid : TenantId , n : & NewAssetRevaluation ,) -> Result < AssetRevaluation >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewAssetRevaluation",
                    "name": "NewAssetRevaluation",
                    "text": "NewAssetRevaluation"
                  }
                ],
                "name": "reference",
                "text": "& NewAssetRevaluation"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AssetRevaluation",
                "name": "AssetRevaluation",
                "text": "AssetRevaluation"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AssetRevaluation >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "fixed_assets::cancel_revaluation",
      "method": "POST",
      "path": "/api/t/{tid}/asset-revaluations/{id}/cancel",
      "id": "post_t_tid_asset_revaluations_id_cancel",
      "source": "crates/kc-api/src/fixed_assets.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelAssetDocument"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AssetRevaluation"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cancel_asset_revaluation",
          "signature": "async fn cancel_asset_revaluation (& self , tid : TenantId , id : AssetRevaluationId , c : & CancelAssetDocument ,) -> Result < AssetRevaluation >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AssetRevaluationId",
                "name": "AssetRevaluationId",
                "text": "AssetRevaluationId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "CancelAssetDocument",
                    "name": "CancelAssetDocument",
                    "text": "CancelAssetDocument"
                  }
                ],
                "name": "reference",
                "text": "& CancelAssetDocument"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AssetRevaluation",
                "name": "AssetRevaluation",
                "text": "AssetRevaluation"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AssetRevaluation >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "list_assets",
      "method": "GET",
      "path": "/api/t/{tid}/assets",
      "id": "get_t_tid_assets",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FixedAsset"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "assets",
          "signature": "async fn assets (& self , tid : TenantId) -> Result < Vec < FixedAsset > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "FixedAsset",
                    "name": "FixedAsset",
                    "text": "FixedAsset"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < FixedAsset >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < FixedAsset > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "create_asset",
      "method": "POST",
      "path": "/api/t/{tid}/assets",
      "id": "post_t_tid_assets",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewFixedAsset"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/FixedAsset"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_asset",
          "signature": "async fn create_asset (& self , tid : TenantId , a : & NewFixedAsset) -> Result < FixedAsset >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "a",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewFixedAsset",
                    "name": "NewFixedAsset",
                    "text": "NewFixedAsset"
                  }
                ],
                "name": "reference",
                "text": "& NewFixedAsset"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "FixedAsset",
                "name": "FixedAsset",
                "text": "FixedAsset"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < FixedAsset >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "asset_card",
      "method": "GET",
      "path": "/api/t/{tid}/assets/{id}",
      "id": "get_t_tid_assets_id",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AssetCard"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "asset_card",
          "signature": "async fn asset_card (& self , tid : TenantId , id : AssetId) -> Result < AssetCard >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AssetId",
                "name": "AssetId",
                "text": "AssetId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AssetCard",
                "name": "AssetCard",
                "text": "AssetCard"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AssetCard >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "fixed_assets::assignments",
      "method": "GET",
      "path": "/api/t/{tid}/assets/{id}/assignments",
      "id": "get_t_tid_assets_id_assignments",
      "source": "crates/kc-api/src/fixed_assets.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AssetAssignment"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "asset_assignments",
          "signature": "async fn asset_assignments (& self , tid : TenantId , id : AssetId ,) -> Result < Vec < AssetAssignment > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AssetId",
                "name": "AssetId",
                "text": "AssetId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "AssetAssignment",
                    "name": "AssetAssignment",
                    "text": "AssetAssignment"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < AssetAssignment >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < AssetAssignment > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "fixed_assets::add_assignment",
      "method": "POST",
      "path": "/api/t/{tid}/assets/{id}/assignments",
      "id": "post_t_tid_assets_id_assignments",
      "source": "crates/kc-api/src/fixed_assets.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewAssetAssignment"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AssetAssignment"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_asset_assignment",
          "signature": "async fn add_asset_assignment (& self , tid : TenantId , id : AssetId , n : & NewAssetAssignment ,) -> Result < AssetAssignment >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AssetId",
                "name": "AssetId",
                "text": "AssetId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewAssetAssignment",
                    "name": "NewAssetAssignment",
                    "text": "NewAssetAssignment"
                  }
                ],
                "name": "reference",
                "text": "& NewAssetAssignment"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AssetAssignment",
                "name": "AssetAssignment",
                "text": "AssetAssignment"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AssetAssignment >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "list_attachments",
      "method": "GET",
      "path": "/api/t/{tid}/attachments",
      "id": "get_t_tid_attachments",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AttachmentMeta"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "attachments",
          "signature": "async fn attachments (& self , tid : TenantId) -> Result < Vec < AttachmentMeta > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "AttachmentMeta",
                    "name": "AttachmentMeta",
                    "text": "AttachmentMeta"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < AttachmentMeta >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < AttachmentMeta > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "upload_attachment",
      "method": "POST",
      "path": "/api/t/{tid}/attachments",
      "id": "post_t_tid_attachments",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::UploadQ"
      },
      "body": {
        "type": "string",
        "format": "binary"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AttachmentMeta"
        },
        "statuses": [
          200,
          201
        ]
      },
      "rust": [
        {
          "name": "upload_attachment",
          "signature": "async fn upload_attachment (& self , tid : TenantId , filename : & str , content_type : & str , content : Vec < u8 > ,) -> Result < AttachmentMeta >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "filename",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "content_type",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "content",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AttachmentMeta",
                "name": "AttachmentMeta",
                "text": "AttachmentMeta"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AttachmentMeta >"
          }
        },
        {
          "name": "upload_attachment_as_pdf",
          "signature": "async fn upload_attachment_as_pdf (& self , tid : TenantId , filename : & str , content_type : & str , content : Vec < u8 > ,) -> Result < AttachmentMeta >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "filename",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "content_type",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "content",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AttachmentMeta",
                "name": "AttachmentMeta",
                "text": "AttachmentMeta"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AttachmentMeta >"
          }
        }
      ],
      "errors": [
        "bad_request",
        "convert_failed",
        "convert_unsupported",
        "too_large"
      ]
    },
    {
      "handler": "download_attachment",
      "method": "GET",
      "path": "/api/t/{tid}/attachments/{aid}",
      "id": "get_t_tid_attachments_aid",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "aid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/octet-stream",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "download_attachment",
          "signature": "async fn download_attachment (& self , tid : TenantId , id : AttachmentId) -> Result < Download >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "AttachmentId",
                "name": "AttachmentId",
                "text": "AttachmentId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Download",
                "name": "Download",
                "text": "Download"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Download >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "audit",
      "method": "GET",
      "path": "/api/t/{tid}/audit",
      "id": "get_t_tid_audit",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::LimitQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AuditEvent"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "audit",
          "signature": "async fn audit (& self , tid : TenantId , limit : usize) -> Result < Vec < AuditEvent > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "limit",
              "type": {
                "args": [],
                "base": "usize",
                "name": "usize",
                "text": "usize"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "AuditEvent",
                    "name": "AuditEvent",
                    "text": "AuditEvent"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < AuditEvent >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < AuditEvent > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bank::accounts",
      "method": "GET",
      "path": "/api/t/{tid}/bank/accounts",
      "id": "get_t_tid_bank_accounts",
      "source": "crates/kc-api/src/bank.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BankAccount"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "bank_accounts",
          "signature": "async fn bank_accounts (& self , tid : TenantId) -> Result < Vec < BankAccount > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "BankAccount",
                    "name": "BankAccount",
                    "text": "BankAccount"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < BankAccount >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < BankAccount > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bank::create_account",
      "method": "POST",
      "path": "/api/t/{tid}/bank/accounts",
      "id": "post_t_tid_bank_accounts",
      "source": "crates/kc-api/src/bank.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewBankAccount"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/BankAccount"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_bank_account",
          "signature": "async fn create_bank_account (& self , tid : TenantId , a : & NewBankAccount ,) -> Result < BankAccount >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "a",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewBankAccount",
                    "name": "NewBankAccount",
                    "text": "NewBankAccount"
                  }
                ],
                "name": "reference",
                "text": "& NewBankAccount"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "BankAccount",
                "name": "BankAccount",
                "text": "BankAccount"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < BankAccount >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bank::cancel_assignment",
      "method": "POST",
      "path": "/api/t/{tid}/bank/assignments/{id}/cancel",
      "id": "post_t_tid_bank_assignments_id_cancel",
      "source": "crates/kc-api/src/bank.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelMatch"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/BankStatementDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "bank_cancel_assignment",
          "signature": "async fn bank_cancel_assignment (& self , tid : TenantId , id : i64 , reason : & str ,) -> Result < BankStatementDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            },
            {
              "pattern": "reason",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "BankStatementDetail",
                "name": "BankStatementDetail",
                "text": "BankStatementDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < BankStatementDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bank::import",
      "method": "POST",
      "path": "/api/t/{tid}/bank/import",
      "id": "post_t_tid_bank_import",
      "source": "crates/kc-api/src/bank.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/ImportStatement"
      },
      "body": {
        "type": "string",
        "format": "binary"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/BankStatementDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "import_statement",
          "signature": "async fn import_statement (& self , tid : TenantId , filename : & str , content : Vec < u8 > , q : & ImportStatement ,) -> Result < BankStatementDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "filename",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "content",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            },
            {
              "pattern": "q",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "ImportStatement",
                    "name": "ImportStatement",
                    "text": "ImportStatement"
                  }
                ],
                "name": "reference",
                "text": "& ImportStatement"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "BankStatementDetail",
                "name": "BankStatementDetail",
                "text": "BankStatementDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < BankStatementDetail >"
          }
        }
      ],
      "errors": [
        "bad_filename",
        "statement_unbalanced",
        "unknown_bank_account"
      ]
    },
    {
      "handler": "bank::profiles",
      "method": "GET",
      "path": "/api/t/{tid}/bank/profiles",
      "id": "get_t_tid_bank_profiles",
      "source": "crates/kc-api/src/bank.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BankProfile"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "bank_profiles",
          "signature": "async fn bank_profiles (& self , tid : TenantId) -> Result < Vec < BankProfile > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "BankProfile",
                    "name": "BankProfile",
                    "text": "BankProfile"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < BankProfile >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < BankProfile > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bank::create_profile",
      "method": "POST",
      "path": "/api/t/{tid}/bank/profiles",
      "id": "post_t_tid_bank_profiles",
      "source": "crates/kc-api/src/bank.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewBankProfile"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/BankProfile"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_bank_profile",
          "signature": "async fn create_bank_profile (& self , tid : TenantId , p : & NewBankProfile ,) -> Result < BankProfile >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "p",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewBankProfile",
                    "name": "NewBankProfile",
                    "text": "NewBankProfile"
                  }
                ],
                "name": "reference",
                "text": "& NewBankProfile"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "BankProfile",
                "name": "BankProfile",
                "text": "BankProfile"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < BankProfile >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "schemes::rules",
      "method": "GET",
      "path": "/api/t/{tid}/bank/rules",
      "id": "get_t_tid_bank_rules",
      "source": "crates/kc-api/src/schemes.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BankRule"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "bank_rules",
          "signature": "async fn bank_rules (& self , tid : TenantId) -> Result < Vec < BankRule > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "BankRule",
                    "name": "BankRule",
                    "text": "BankRule"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < BankRule >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < BankRule > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "schemes::create_rule",
      "method": "POST",
      "path": "/api/t/{tid}/bank/rules",
      "id": "post_t_tid_bank_rules",
      "source": "crates/kc-api/src/schemes.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewBankRule"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/BankRule"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_bank_rule",
          "signature": "async fn create_bank_rule (& self , tid : TenantId , r : & NewBankRule) -> Result < BankRule >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "r",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewBankRule",
                    "name": "NewBankRule",
                    "text": "NewBankRule"
                  }
                ],
                "name": "reference",
                "text": "& NewBankRule"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "BankRule",
                "name": "BankRule",
                "text": "BankRule"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < BankRule >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "schemes::policies",
      "method": "GET",
      "path": "/api/t/{tid}/bank/rules/{id}/automation",
      "id": "get_t_tid_bank_rules_id_automation",
      "source": "crates/kc-api/src/schemes.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BankAutomation"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "bank_automation",
          "signature": "async fn bank_automation (& self , tid : TenantId , id : BankRuleId ,) -> Result < Vec < BankAutomation > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "BankRuleId",
                "name": "BankRuleId",
                "text": "BankRuleId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "BankAutomation",
                    "name": "BankAutomation",
                    "text": "BankAutomation"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < BankAutomation >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < BankAutomation > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "schemes::set_policy",
      "method": "POST",
      "path": "/api/t/{tid}/bank/rules/{id}/automation",
      "id": "post_t_tid_bank_rules_id_automation",
      "source": "crates/kc-api/src/schemes.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/BankAutomation"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "integer",
          "format": "i64"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "set_bank_automation",
          "signature": "async fn set_bank_automation (& self , tid : TenantId , id : BankRuleId , p : & BankAutomation ,) -> Result < i64 >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "BankRuleId",
                "name": "BankRuleId",
                "text": "BankRuleId"
              }
            },
            {
              "pattern": "p",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "BankAutomation",
                    "name": "BankAutomation",
                    "text": "BankAutomation"
                  }
                ],
                "name": "reference",
                "text": "& BankAutomation"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < i64 >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "schemes::policy_preview",
      "method": "POST",
      "path": "/api/t/{tid}/bank/rules/{id}/automation/preview",
      "id": "post_t_tid_bank_rules_id_automation_preview",
      "source": "crates/kc-api/src/schemes.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/BankAutomation"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RulePreviewLine"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "preview_bank_automation",
          "signature": "async fn preview_bank_automation (& self , tid : TenantId , id : BankRuleId , p : & BankAutomation ,) -> Result < Vec < RulePreviewLine > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "BankRuleId",
                "name": "BankRuleId",
                "text": "BankRuleId"
              }
            },
            {
              "pattern": "p",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "BankAutomation",
                    "name": "BankAutomation",
                    "text": "BankAutomation"
                  }
                ],
                "name": "reference",
                "text": "& BankAutomation"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "RulePreviewLine",
                    "name": "RulePreviewLine",
                    "text": "RulePreviewLine"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < RulePreviewLine >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < RulePreviewLine > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "schemes::deactivate_rule",
      "method": "POST",
      "path": "/api/t/{tid}/bank/rules/{id}/deactivate",
      "id": "post_t_tid_bank_rules_id_deactivate",
      "source": "crates/kc-api/src/schemes.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/BankRuleId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelMatch"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/BankRule"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "deactivate_bank_rule",
          "signature": "async fn deactivate_bank_rule (& self , tid : TenantId , id : BankRuleId , reason : & str ,) -> Result < BankRule >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "BankRuleId",
                "name": "BankRuleId",
                "text": "BankRuleId"
              }
            },
            {
              "pattern": "reason",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "BankRule",
                "name": "BankRule",
                "text": "BankRule"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < BankRule >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bank::statements",
      "method": "GET",
      "path": "/api/t/{tid}/bank/statements",
      "id": "get_t_tid_bank_statements",
      "source": "crates/kc-api/src/bank.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::bank::StatementsQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BankStatement"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "bank_statements",
          "signature": "async fn bank_statements (& self , tid : TenantId , account : Option < BankAccountId > ,) -> Result < Vec < BankStatement > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "account",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "BankAccountId",
                    "name": "BankAccountId",
                    "text": "BankAccountId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < BankAccountId >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "BankStatement",
                    "name": "BankStatement",
                    "text": "BankStatement"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < BankStatement >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < BankStatement > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bank::statement",
      "method": "GET",
      "path": "/api/t/{tid}/bank/statements/{id}",
      "id": "get_t_tid_bank_statements_id",
      "source": "crates/kc-api/src/bank.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/StatementId"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::bank::StatementQuery"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/BankStatementDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "bank_statement_summary",
          "signature": "async fn bank_statement_summary (& self , tid : TenantId , id : StatementId ,) -> Result < BankStatementDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "StatementId",
                "name": "StatementId",
                "text": "StatementId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "BankStatementDetail",
                "name": "BankStatementDetail",
                "text": "BankStatementDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < BankStatementDetail >"
          }
        },
        {
          "name": "bank_statement",
          "signature": "async fn bank_statement (& self , tid : TenantId , id : StatementId ,) -> Result < BankStatementDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "StatementId",
                "name": "StatementId",
                "text": "StatementId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "BankStatementDetail",
                "name": "BankStatementDetail",
                "text": "BankStatementDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < BankStatementDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "schemes::apply_rules",
      "method": "POST",
      "path": "/api/t/{tid}/bank/statements/{id}/apply-rules",
      "id": "post_t_tid_bank_statements_id_apply_rules",
      "source": "crates/kc-api/src/schemes.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/StatementId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AutoMatchResult"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "bank_apply_rules",
          "signature": "async fn bank_apply_rules (& self , tid : TenantId , id : StatementId ,) -> Result < AutoMatchResult >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "StatementId",
                "name": "StatementId",
                "text": "StatementId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AutoMatchResult",
                "name": "AutoMatchResult",
                "text": "AutoMatchResult"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AutoMatchResult >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bank::assign",
      "method": "POST",
      "path": "/api/t/{tid}/bank/statements/{id}/assignments",
      "id": "post_t_tid_bank_statements_id_assignments",
      "source": "crates/kc-api/src/bank.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/StatementId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewBankAssignment"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/BankStatementDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "bank_assign",
          "signature": "async fn bank_assign (& self , tid : TenantId , id : StatementId , a : & NewBankAssignment ,) -> Result < BankStatementDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "StatementId",
                "name": "StatementId",
                "text": "StatementId"
              }
            },
            {
              "pattern": "a",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewBankAssignment",
                    "name": "NewBankAssignment",
                    "text": "NewBankAssignment"
                  }
                ],
                "name": "reference",
                "text": "& NewBankAssignment"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "BankStatementDetail",
                "name": "BankStatementDetail",
                "text": "BankStatementDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < BankStatementDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bank::auto_match",
      "method": "POST",
      "path": "/api/t/{tid}/bank/statements/{id}/auto-match",
      "id": "post_t_tid_bank_statements_id_auto_match",
      "source": "crates/kc-api/src/bank.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/StatementId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AutoMatchResult"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "bank_auto_match",
          "signature": "async fn bank_auto_match (& self , tid : TenantId , id : StatementId) -> Result < AutoMatchResult >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "StatementId",
                "name": "StatementId",
                "text": "StatementId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AutoMatchResult",
                "name": "AutoMatchResult",
                "text": "AutoMatchResult"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AutoMatchResult >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bank::post",
      "method": "POST",
      "path": "/api/t/{tid}/bank/statements/{id}/post",
      "id": "post_t_tid_bank_statements_id_post",
      "source": "crates/kc-api/src/bank.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/StatementId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Entry"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "post_statement",
          "signature": "async fn post_statement (& self , tid : TenantId , id : StatementId) -> Result < Entry >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "StatementId",
                "name": "StatementId",
                "text": "StatementId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Entry",
                "name": "Entry",
                "text": "Entry"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Entry >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "schemes::rule_suggestions",
      "method": "GET",
      "path": "/api/t/{tid}/bank/statements/{id}/rule-suggestions",
      "id": "get_t_tid_bank_statements_id_rule_suggestions",
      "source": "crates/kc-api/src/schemes.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/StatementId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BankRuleSuggestion"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "bank_rule_suggestions",
          "signature": "async fn bank_rule_suggestions (& self , tid : TenantId , id : StatementId ,) -> Result < Vec < BankRuleSuggestion > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "StatementId",
                "name": "StatementId",
                "text": "StatementId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "BankRuleSuggestion",
                    "name": "BankRuleSuggestion",
                    "text": "BankRuleSuggestion"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < BankRuleSuggestion >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < BankRuleSuggestion > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bank::suggestions",
      "method": "GET",
      "path": "/api/t/{tid}/bank/statements/{id}/suggestions",
      "id": "get_t_tid_bank_statements_id_suggestions",
      "source": "crates/kc-api/src/bank.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/StatementId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BankSuggestion"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "bank_suggestions",
          "signature": "async fn bank_suggestions (& self , tid : TenantId , id : StatementId ,) -> Result < Vec < BankSuggestion > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "StatementId",
                "name": "StatementId",
                "text": "StatementId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "BankSuggestion",
                    "name": "BankSuggestion",
                    "text": "BankSuggestion"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < BankSuggestion >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < BankSuggestion > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::transfer_books",
      "method": "POST",
      "path": "/api/t/{tid}/book-handovers",
      "id": "post_t_tid_book_handovers",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/BookTransfer"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "integer",
          "format": "i64"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "transfer_books",
          "signature": "async fn transfer_books (& self , tid : TenantId , transfer : & BookTransfer) -> Result < i64 >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "transfer",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "BookTransfer",
                    "name": "BookTransfer",
                    "text": "BookTransfer"
                  }
                ],
                "name": "reference",
                "text": "& BookTransfer"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < i64 >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::book_destination",
      "method": "GET",
      "path": "/api/t/{tid}/book-handovers/destinations/{bid}",
      "id": "get_t_tid_book_handovers_destinations_bid",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "bid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/BookDestination"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "book_destination",
          "signature": "async fn book_destination (& self , tid : TenantId , bid : BureauId) -> Result < BookDestination >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "bid",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "BookDestination",
                "name": "BookDestination",
                "text": "BookDestination"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < BookDestination >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::carried_count",
      "method": "GET",
      "path": "/api/t/{tid}/book-handovers/open-items",
      "id": "get_t_tid_book_handovers_open_items",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "integer",
          "format": "i64"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "carried_items_count",
          "signature": "async fn carried_items_count (& self , tid : TenantId) -> Result < i64 >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < i64 >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::carried_archive",
      "method": "GET",
      "path": "/api/t/{tid}/book-handovers/open-items/archive",
      "id": "get_t_tid_book_handovers_open_items_archive",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/zip",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "carried_items_archive",
          "signature": "async fn carried_items_archive (& self , tid : TenantId) -> Result < Vec < u8 > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < u8 > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::mandate",
      "method": "GET",
      "path": "/api/t/{tid}/bureau",
      "id": "get_t_tid_bureau",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "client_bureau",
          "signature": "async fn client_bureau (& self , tid : TenantId) -> Result < Option < BureauId > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "BureauId",
                    "name": "BureauId",
                    "text": "BureauId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < BureauId >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Option < BureauId > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bureau::authorize",
      "method": "POST",
      "path": "/api/t/{tid}/bureau/{bid}",
      "id": "post_t_tid_bureau_bid",
      "source": "crates/kc-api/src/bureau.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "bid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/api::bureau::Mandate"
      },
      "auth": "Db",
      "response": {
        "status": 204,
        "contentType": null,
        "schema": null,
        "statuses": [
          204
        ]
      },
      "rust": [
        {
          "name": "authorize_bureau",
          "signature": "async fn authorize_bureau (& self , bid : BureauId , tid : TenantId , reason : & str) -> Result < () >",
          "params": [
            {
              "pattern": "bid",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            },
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "reason",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "buyout_note::list",
      "method": "GET",
      "path": "/api/t/{tid}/buyout-notes",
      "id": "get_t_tid_buyout_notes",
      "source": "crates/kc-api/src/buyout_note.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::buyout_note::ListQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BuyoutNote"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "buyout_notes",
          "signature": "async fn buyout_notes (& self , tid : TenantId , year : Option < i32 >) -> Result < Vec < BuyoutNote > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "BuyoutNote",
                    "name": "BuyoutNote",
                    "text": "BuyoutNote"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < BuyoutNote >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < BuyoutNote > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "buyout_note::create",
      "method": "POST",
      "path": "/api/t/{tid}/buyout-notes",
      "id": "post_t_tid_buyout_notes",
      "source": "crates/kc-api/src/buyout_note.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewBuyoutNote"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/BuyoutNoteDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_buyout_note",
          "signature": "async fn create_buyout_note (& self , tid : TenantId , n : & NewBuyoutNote ,) -> Result < BuyoutNoteDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewBuyoutNote",
                    "name": "NewBuyoutNote",
                    "text": "NewBuyoutNote"
                  }
                ],
                "name": "reference",
                "text": "& NewBuyoutNote"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "BuyoutNoteDetail",
                "name": "BuyoutNoteDetail",
                "text": "BuyoutNoteDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < BuyoutNoteDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "buyout_note::preview",
      "method": "POST",
      "path": "/api/t/{tid}/buyout-notes/preview",
      "id": "post_t_tid_buyout_notes_preview",
      "source": "crates/kc-api/src/buyout_note.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewBuyoutNote"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/BuyoutNoteDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "preview_buyout_note",
          "signature": "async fn preview_buyout_note (& self , tid : TenantId , n : & NewBuyoutNote ,) -> Result < BuyoutNoteDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewBuyoutNote",
                    "name": "NewBuyoutNote",
                    "text": "NewBuyoutNote"
                  }
                ],
                "name": "reference",
                "text": "& NewBuyoutNote"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "BuyoutNoteDetail",
                "name": "BuyoutNoteDetail",
                "text": "BuyoutNoteDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < BuyoutNoteDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "buyout_note::get",
      "method": "GET",
      "path": "/api/t/{tid}/buyout-notes/{id}",
      "id": "get_t_tid_buyout_notes_id",
      "source": "crates/kc-api/src/buyout_note.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/BuyoutNoteDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "buyout_note",
          "signature": "async fn buyout_note (& self , tid : TenantId , id : BuyoutNoteId) -> Result < BuyoutNoteDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "BuyoutNoteId",
                "name": "BuyoutNoteId",
                "text": "BuyoutNoteId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "BuyoutNoteDetail",
                "name": "BuyoutNoteDetail",
                "text": "BuyoutNoteDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < BuyoutNoteDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "buyout_note::cancel",
      "method": "POST",
      "path": "/api/t/{tid}/buyout-notes/{id}/cancel",
      "id": "post_t_tid_buyout_notes_id_cancel",
      "source": "crates/kc-api/src/buyout_note.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelBuyoutNote"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/BuyoutNoteDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "cancel_buyout_note",
          "signature": "async fn cancel_buyout_note (& self , tid : TenantId , id : BuyoutNoteId , c : & CancelBuyoutNote ,) -> Result < BuyoutNoteDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "BuyoutNoteId",
                "name": "BuyoutNoteId",
                "text": "BuyoutNoteId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "CancelBuyoutNote",
                    "name": "CancelBuyoutNote",
                    "text": "CancelBuyoutNote"
                  }
                ],
                "name": "reference",
                "text": "& CancelBuyoutNote"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "BuyoutNoteDetail",
                "name": "BuyoutNoteDetail",
                "text": "BuyoutNoteDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < BuyoutNoteDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "cash_book",
      "method": "GET",
      "path": "/api/t/{tid}/cash-book",
      "id": "get_t_tid_cash_book",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::CashBookQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/CashBook"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cash_book",
          "signature": "async fn cash_book (& self , tid : TenantId , account : & str , from : Option < NaiveDate > , to : Option < NaiveDate > ,) -> Result < CashBook >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "account",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "from",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            },
            {
              "pattern": "to",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "CashBook",
                "name": "CashBook",
                "text": "CashBook"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < CashBook >"
          }
        }
      ],
      "errors": [
        "not_cash_account"
      ]
    },
    {
      "handler": "overview::cash_flow",
      "method": "GET",
      "path": "/api/t/{tid}/cash-flow",
      "id": "get_t_tid_cash_flow",
      "source": "crates/kc-api/src/overview.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::RangeQ"
      },
      "body": null,
      "auth": "BookDb",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/CashFlow"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cash_flow",
          "signature": "async fn cash_flow (& self , tid : TenantId , from : Option < NaiveDate > , to : Option < NaiveDate > ,) -> Result < CashFlow >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "from",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            },
            {
              "pattern": "to",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "CashFlow",
                "name": "CashFlow",
                "text": "CashFlow"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < CashFlow >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "close::month_close",
      "method": "GET",
      "path": "/api/t/{tid}/close/{period}",
      "id": "get_t_tid_close_period",
      "source": "crates/kc-api/src/close.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "period",
          "schema": {
            "type": "string"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/MonthClose"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "month_close",
          "signature": "async fn month_close (& self , tid : TenantId , period : NaiveDate) -> Result < MonthClose >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "period",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "MonthClose",
                "name": "MonthClose",
                "text": "MonthClose"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < MonthClose >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "close::mark_step",
      "method": "POST",
      "path": "/api/t/{tid}/close/{period}/{task}",
      "id": "post_t_tid_close_period_task",
      "source": "crates/kc-api/src/close.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "period",
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "task",
          "schema": {
            "type": "string"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/MarkCloseStep"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/MonthClose"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "mark_close_step",
          "signature": "async fn mark_close_step (& self , tid : TenantId , period : NaiveDate , task : CloseTask , state : CloseMarkState , note : & str ,) -> Result < MonthClose >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "period",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            },
            {
              "pattern": "task",
              "type": {
                "args": [],
                "base": "CloseTask",
                "name": "CloseTask",
                "text": "CloseTask"
              }
            },
            {
              "pattern": "state",
              "type": {
                "args": [],
                "base": "CloseMarkState",
                "name": "CloseMarkState",
                "text": "CloseMarkState"
              }
            },
            {
              "pattern": "note",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "MonthClose",
                "name": "MonthClose",
                "text": "MonthClose"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < MonthClose >"
          }
        }
      ],
      "errors": [
        "bad_close_task",
        "note_required"
      ]
    },
    {
      "handler": "efaktura::suggest",
      "method": "GET",
      "path": "/api/t/{tid}/company-suggest",
      "id": "get_t_tid_company_suggest",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::efaktura::SuggestQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompanySuggestion"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "company_suggest",
          "signature": "async fn company_suggest (& self , tid : TenantId , q : & str) -> Result < Vec < CompanySuggestion > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "q",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "CompanySuggestion",
                    "name": "CompanySuggestion",
                    "text": "CompanySuggestion"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < CompanySuggestion >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < CompanySuggestion > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "compensations::list",
      "method": "GET",
      "path": "/api/t/{tid}/compensations",
      "id": "get_t_tid_compensations",
      "source": "crates/kc-api/src/compensations.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Compensation"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "compensations",
          "signature": "async fn compensations (& self , tid : TenantId) -> Result < Vec < Compensation > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "Compensation",
                    "name": "Compensation",
                    "text": "Compensation"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < Compensation >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < Compensation > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "compensations::create",
      "method": "POST",
      "path": "/api/t/{tid}/compensations",
      "id": "post_t_tid_compensations",
      "source": "crates/kc-api/src/compensations.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewCompensation"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Compensation"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_compensation",
          "signature": "async fn create_compensation (& self , tid : TenantId , n : & NewCompensation ,) -> Result < Compensation >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewCompensation",
                    "name": "NewCompensation",
                    "text": "NewCompensation"
                  }
                ],
                "name": "reference",
                "text": "& NewCompensation"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Compensation",
                "name": "Compensation",
                "text": "Compensation"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Compensation >"
          }
        }
      ],
      "errors": [
        "bad_amount"
      ]
    },
    {
      "handler": "compensations::proposal",
      "method": "GET",
      "path": "/api/t/{tid}/compensations/proposal",
      "id": "get_t_tid_compensations_proposal",
      "source": "crates/kc-api/src/compensations.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::compensations::ProposalQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompensationProposal"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "compensation_proposal",
          "signature": "async fn compensation_proposal (& self , tid : TenantId , date : Option < NaiveDate > ,) -> Result < Vec < CompensationProposal > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "date",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "CompensationProposal",
                    "name": "CompensationProposal",
                    "text": "CompensationProposal"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < CompensationProposal >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < CompensationProposal > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "compensations::get_one",
      "method": "GET",
      "path": "/api/t/{tid}/compensations/{id}",
      "id": "get_t_tid_compensations_id",
      "source": "crates/kc-api/src/compensations.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Compensation"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "compensation",
          "signature": "async fn compensation (& self , tid : TenantId , id : CompensationId) -> Result < Compensation >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "CompensationId",
                "name": "CompensationId",
                "text": "CompensationId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Compensation",
                "name": "Compensation",
                "text": "Compensation"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Compensation >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "compensations::cancel",
      "method": "POST",
      "path": "/api/t/{tid}/compensations/{id}/cancel",
      "id": "post_t_tid_compensations_id_cancel",
      "source": "crates/kc-api/src/compensations.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelCompensation"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Compensation"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cancel_compensation",
          "signature": "async fn cancel_compensation (& self , tid : TenantId , id : CompensationId , c : & CancelCompensation ,) -> Result < Compensation >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "CompensationId",
                "name": "CompensationId",
                "text": "CompensationId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "CancelCompensation",
                    "name": "CancelCompensation",
                    "text": "CancelCompensation"
                  }
                ],
                "name": "reference",
                "text": "& CancelCompensation"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Compensation",
                "name": "Compensation",
                "text": "Compensation"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Compensation >"
          }
        }
      ],
      "errors": [
        "already_cancelled"
      ]
    },
    {
      "handler": "compensations::statement",
      "method": "GET",
      "path": "/api/t/{tid}/compensations/{id}/statement",
      "id": "get_t_tid_compensations_id_statement",
      "source": "crates/kc-api/src/compensations.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "text/html",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "compensation_statement",
          "signature": "async fn compensation_statement (& self , tid : TenantId , id : CompensationId ,) -> Result < String >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "CompensationId",
                "name": "CompensationId",
                "text": "CompensationId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "String",
                "name": "String",
                "text": "String"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < String >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "contact_email",
      "method": "GET",
      "path": "/api/t/{tid}/contact-email",
      "id": "get_t_tid_contact_email",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ContactEmail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "contact_email",
          "signature": "async fn contact_email (& self , tid : TenantId) -> Result < ContactEmail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ContactEmail",
                "name": "ContactEmail",
                "text": "ContactEmail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ContactEmail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "set_contact_email",
      "method": "POST",
      "path": "/api/t/{tid}/contact-email",
      "id": "post_t_tid_contact_email",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SetContactEmail"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ContactEmail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "set_contact_email",
          "signature": "async fn set_contact_email (& self , tid : TenantId , email : & str) -> Result < ContactEmail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "email",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ContactEmail",
                "name": "ContactEmail",
                "text": "ContactEmail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ContactEmail >"
          }
        }
      ],
      "errors": [
        "contact_email_invalid"
      ]
    },
    {
      "handler": "payroll::change_contract",
      "method": "POST",
      "path": "/api/t/{tid}/contracts/{id}",
      "id": "post_t_tid_contracts_id",
      "source": "crates/kc-api/src/payroll.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/ContractId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/ContractChange"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Contract"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "change_contract",
          "signature": "async fn change_contract (& self , tid : TenantId , id : ContractId , ch : & ContractChange ,) -> Result < Contract >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "ContractId",
                "name": "ContractId",
                "text": "ContractId"
              }
            },
            {
              "pattern": "ch",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "ContractChange",
                    "name": "ContractChange",
                    "text": "ContractChange"
                  }
                ],
                "name": "reference",
                "text": "& ContractChange"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Contract",
                "name": "Contract",
                "text": "Contract"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Contract >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "cost_centers::result",
      "method": "GET",
      "path": "/api/t/{tid}/cost-center-result",
      "id": "get_t_tid_cost_center_result",
      "source": "crates/kc-api/src/cost_centers.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::cost_centers::ResultQ"
      },
      "body": null,
      "auth": "BookDb",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CostCenterResultRow"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cost_center_result",
          "signature": "async fn cost_center_result (& self , tid : TenantId , from : NaiveDate , to : NaiveDate ,) -> Result < Vec < CostCenterResultRow > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "from",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            },
            {
              "pattern": "to",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "CostCenterResultRow",
                    "name": "CostCenterResultRow",
                    "text": "CostCenterResultRow"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < CostCenterResultRow >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < CostCenterResultRow > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "cost_centers::rules",
      "method": "GET",
      "path": "/api/t/{tid}/cost-center-rules",
      "id": "get_t_tid_cost_center_rules",
      "source": "crates/kc-api/src/cost_centers.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CostCenterRule"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cost_center_rules",
          "signature": "async fn cost_center_rules (& self , tid : TenantId) -> Result < Vec < CostCenterRule > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "CostCenterRule",
                    "name": "CostCenterRule",
                    "text": "CostCenterRule"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < CostCenterRule >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < CostCenterRule > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "cost_centers::add_rule",
      "method": "POST",
      "path": "/api/t/{tid}/cost-center-rules",
      "id": "post_t_tid_cost_center_rules",
      "source": "crates/kc-api/src/cost_centers.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewCostCenterRule"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/CostCenterRule"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_cost_center_rule",
          "signature": "async fn add_cost_center_rule (& self , tid : TenantId , r : & NewCostCenterRule ,) -> Result < CostCenterRule >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "r",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewCostCenterRule",
                    "name": "NewCostCenterRule",
                    "text": "NewCostCenterRule"
                  }
                ],
                "name": "reference",
                "text": "& NewCostCenterRule"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "CostCenterRule",
                "name": "CostCenterRule",
                "text": "CostCenterRule"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < CostCenterRule >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "cost_centers::list",
      "method": "GET",
      "path": "/api/t/{tid}/cost-centers",
      "id": "get_t_tid_cost_centers",
      "source": "crates/kc-api/src/cost_centers.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CostCenter"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cost_centers",
          "signature": "async fn cost_centers (& self , tid : TenantId) -> Result < Vec < CostCenter > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "CostCenter",
                    "name": "CostCenter",
                    "text": "CostCenter"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < CostCenter >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < CostCenter > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "cost_centers::create",
      "method": "POST",
      "path": "/api/t/{tid}/cost-centers",
      "id": "post_t_tid_cost_centers",
      "source": "crates/kc-api/src/cost_centers.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewCostCenter"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/CostCenter"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_cost_center",
          "signature": "async fn create_cost_center (& self , tid : TenantId , c : & NewCostCenter) -> Result < CostCenter >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewCostCenter",
                    "name": "NewCostCenter",
                    "text": "NewCostCenter"
                  }
                ],
                "name": "reference",
                "text": "& NewCostCenter"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "CostCenter",
                "name": "CostCenter",
                "text": "CostCenter"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < CostCenter >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "cost_centers::change",
      "method": "POST",
      "path": "/api/t/{tid}/cost-centers/{id}",
      "id": "post_t_tid_cost_centers_id",
      "source": "crates/kc-api/src/cost_centers.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CostCenterChange"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/CostCenter"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "change_cost_center",
          "signature": "async fn change_cost_center (& self , tid : TenantId , id : CostCenterId , c : & CostCenterChange ,) -> Result < CostCenter >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "CostCenterId",
                "name": "CostCenterId",
                "text": "CostCenterId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "CostCenterChange",
                    "name": "CostCenterChange",
                    "text": "CostCenterChange"
                  }
                ],
                "name": "reference",
                "text": "& CostCenterChange"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "CostCenter",
                "name": "CostCenter",
                "text": "CostCenter"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < CostCenter >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "customs::list",
      "method": "GET",
      "path": "/api/t/{tid}/customs-declarations",
      "id": "get_t_tid_customs_declarations",
      "source": "crates/kc-api/src/customs.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::customs::ListQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CustomsDeclaration"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "customs_declarations",
          "signature": "async fn customs_declarations (& self , tid : TenantId , year : Option < i32 > ,) -> Result < Vec < CustomsDeclaration > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "CustomsDeclaration",
                    "name": "CustomsDeclaration",
                    "text": "CustomsDeclaration"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < CustomsDeclaration >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < CustomsDeclaration > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "customs::create",
      "method": "POST",
      "path": "/api/t/{tid}/customs-declarations",
      "id": "post_t_tid_customs_declarations",
      "source": "crates/kc-api/src/customs.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewCustomsDeclaration"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/CustomsDeclarationDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_customs_declaration",
          "signature": "async fn create_customs_declaration (& self , tid : TenantId , n : & NewCustomsDeclaration ,) -> Result < CustomsDeclarationDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewCustomsDeclaration",
                    "name": "NewCustomsDeclaration",
                    "text": "NewCustomsDeclaration"
                  }
                ],
                "name": "reference",
                "text": "& NewCustomsDeclaration"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "CustomsDeclarationDetail",
                "name": "CustomsDeclarationDetail",
                "text": "CustomsDeclarationDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < CustomsDeclarationDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "customs::preview",
      "method": "POST",
      "path": "/api/t/{tid}/customs-declarations/preview",
      "id": "post_t_tid_customs_declarations_preview",
      "source": "crates/kc-api/src/customs.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewCustomsDeclaration"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/CustomsDeclarationDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "preview_customs_declaration",
          "signature": "async fn preview_customs_declaration (& self , tid : TenantId , n : & NewCustomsDeclaration ,) -> Result < CustomsDeclarationDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewCustomsDeclaration",
                    "name": "NewCustomsDeclaration",
                    "text": "NewCustomsDeclaration"
                  }
                ],
                "name": "reference",
                "text": "& NewCustomsDeclaration"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "CustomsDeclarationDetail",
                "name": "CustomsDeclarationDetail",
                "text": "CustomsDeclarationDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < CustomsDeclarationDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "customs::get",
      "method": "GET",
      "path": "/api/t/{tid}/customs-declarations/{id}",
      "id": "get_t_tid_customs_declarations_id",
      "source": "crates/kc-api/src/customs.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/CustomsDeclarationDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "customs_declaration",
          "signature": "async fn customs_declaration (& self , tid : TenantId , id : CustomsDeclarationId ,) -> Result < CustomsDeclarationDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "CustomsDeclarationId",
                "name": "CustomsDeclarationId",
                "text": "CustomsDeclarationId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "CustomsDeclarationDetail",
                "name": "CustomsDeclarationDetail",
                "text": "CustomsDeclarationDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < CustomsDeclarationDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "customs::cancel",
      "method": "POST",
      "path": "/api/t/{tid}/customs-declarations/{id}/cancel",
      "id": "post_t_tid_customs_declarations_id_cancel",
      "source": "crates/kc-api/src/customs.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelCustomsDeclaration"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/CustomsDeclarationDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "cancel_customs_declaration",
          "signature": "async fn cancel_customs_declaration (& self , tid : TenantId , id : CustomsDeclarationId , c : & CancelCustomsDeclaration ,) -> Result < CustomsDeclarationDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "CustomsDeclarationId",
                "name": "CustomsDeclarationId",
                "text": "CustomsDeclarationId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "CancelCustomsDeclaration",
                    "name": "CancelCustomsDeclaration",
                    "text": "CancelCustomsDeclaration"
                  }
                ],
                "name": "reference",
                "text": "& CancelCustomsDeclaration"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "CustomsDeclarationDetail",
                "name": "CustomsDeclarationDetail",
                "text": "CustomsDeclarationDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < CustomsDeclarationDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "daily_turnover::list",
      "method": "GET",
      "path": "/api/t/{tid}/daily-turnovers",
      "id": "get_t_tid_daily_turnovers",
      "source": "crates/kc-api/src/daily_turnover.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::daily_turnover::ListQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DailyTurnover"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "daily_turnovers",
          "signature": "async fn daily_turnovers (& self , tid : TenantId , year : Option < i32 > ,) -> Result < Vec < DailyTurnover > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "DailyTurnover",
                    "name": "DailyTurnover",
                    "text": "DailyTurnover"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < DailyTurnover >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < DailyTurnover > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "daily_turnover::create",
      "method": "POST",
      "path": "/api/t/{tid}/daily-turnovers",
      "id": "post_t_tid_daily_turnovers",
      "source": "crates/kc-api/src/daily_turnover.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewDailyTurnover"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/DailyTurnoverDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_daily_turnover",
          "signature": "async fn create_daily_turnover (& self , tid : TenantId , n : & NewDailyTurnover ,) -> Result < DailyTurnoverDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewDailyTurnover",
                    "name": "NewDailyTurnover",
                    "text": "NewDailyTurnover"
                  }
                ],
                "name": "reference",
                "text": "& NewDailyTurnover"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "DailyTurnoverDetail",
                "name": "DailyTurnoverDetail",
                "text": "DailyTurnoverDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < DailyTurnoverDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "daily_turnover::preview",
      "method": "POST",
      "path": "/api/t/{tid}/daily-turnovers/preview",
      "id": "post_t_tid_daily_turnovers_preview",
      "source": "crates/kc-api/src/daily_turnover.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewDailyTurnover"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/DailyTurnoverDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "preview_daily_turnover",
          "signature": "async fn preview_daily_turnover (& self , tid : TenantId , n : & NewDailyTurnover ,) -> Result < DailyTurnoverDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewDailyTurnover",
                    "name": "NewDailyTurnover",
                    "text": "NewDailyTurnover"
                  }
                ],
                "name": "reference",
                "text": "& NewDailyTurnover"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "DailyTurnoverDetail",
                "name": "DailyTurnoverDetail",
                "text": "DailyTurnoverDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < DailyTurnoverDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "daily_turnover::get",
      "method": "GET",
      "path": "/api/t/{tid}/daily-turnovers/{id}",
      "id": "get_t_tid_daily_turnovers_id",
      "source": "crates/kc-api/src/daily_turnover.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/DailyTurnoverDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "daily_turnover",
          "signature": "async fn daily_turnover (& self , tid : TenantId , id : DailyTurnoverId ,) -> Result < DailyTurnoverDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "DailyTurnoverId",
                "name": "DailyTurnoverId",
                "text": "DailyTurnoverId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "DailyTurnoverDetail",
                "name": "DailyTurnoverDetail",
                "text": "DailyTurnoverDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < DailyTurnoverDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "daily_turnover::cancel",
      "method": "POST",
      "path": "/api/t/{tid}/daily-turnovers/{id}/cancel",
      "id": "post_t_tid_daily_turnovers_id_cancel",
      "source": "crates/kc-api/src/daily_turnover.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelDailyTurnover"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/DailyTurnoverDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "cancel_daily_turnover",
          "signature": "async fn cancel_daily_turnover (& self , tid : TenantId , id : DailyTurnoverId , c : & CancelDailyTurnover ,) -> Result < DailyTurnoverDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "DailyTurnoverId",
                "name": "DailyTurnoverId",
                "text": "DailyTurnoverId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "CancelDailyTurnover",
                    "name": "CancelDailyTurnover",
                    "text": "CancelDailyTurnover"
                  }
                ],
                "name": "reference",
                "text": "& CancelDailyTurnover"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "DailyTurnoverDetail",
                "name": "DailyTurnoverDetail",
                "text": "DailyTurnoverDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < DailyTurnoverDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "control::deadline_rules",
      "method": "GET",
      "path": "/api/t/{tid}/deadline-rules",
      "id": "get_t_tid_deadline_rules",
      "source": "crates/kc-api/src/control.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DeadlineRule"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "deadline_rules",
          "signature": "async fn deadline_rules (& self , tid : TenantId) -> Result < Vec < DeadlineRule > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "DeadlineRule",
                    "name": "DeadlineRule",
                    "text": "DeadlineRule"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < DeadlineRule >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < DeadlineRule > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "control::set_deadline_rule",
      "method": "POST",
      "path": "/api/t/{tid}/deadline-rules/{code}",
      "id": "post_t_tid_deadline_rules_code",
      "source": "crates/kc-api/src/control.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "code",
          "schema": {
            "type": "string"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SetDeadlineRule"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DeadlineRule"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "set_deadline_rule",
          "signature": "async fn set_deadline_rule (& self , tid : TenantId , code : & str , enabled : bool , reason : & str ,) -> Result < Vec < DeadlineRule > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "code",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "enabled",
              "type": {
                "args": [],
                "base": "bool",
                "name": "bool",
                "text": "bool"
              }
            },
            {
              "pattern": "reason",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "DeadlineRule",
                    "name": "DeadlineRule",
                    "text": "DeadlineRule"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < DeadlineRule >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < DeadlineRule > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "control::deadlines",
      "method": "GET",
      "path": "/api/t/{tid}/deadlines",
      "id": "get_t_tid_deadlines",
      "source": "crates/kc-api/src/control.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::control::DeadlinesQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Deadline"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "deadlines",
          "signature": "async fn deadlines (& self , tid : TenantId , from : Option < NaiveDate > , to : Option < NaiveDate > , status : Option < & str > ,) -> Result < Vec < Deadline > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "from",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            },
            {
              "pattern": "to",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            },
            {
              "pattern": "status",
              "type": {
                "args": [
                  {
                    "args": [
                      {
                        "args": [],
                        "base": "str",
                        "name": "str",
                        "text": "str"
                      }
                    ],
                    "name": "reference",
                    "text": "& str"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < & str >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "Deadline",
                    "name": "Deadline",
                    "text": "Deadline"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < Deadline >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < Deadline > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "control::generate_deadlines",
      "method": "POST",
      "path": "/api/t/{tid}/deadlines/generate",
      "id": "post_t_tid_deadlines_generate",
      "source": "crates/kc-api/src/control.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/GenerateDeadlines"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/GeneratedDeadlines"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "generate_deadlines",
          "signature": "async fn generate_deadlines (& self , tid : TenantId , from : NaiveDate , to : NaiveDate ,) -> Result < GeneratedDeadlines >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "from",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            },
            {
              "pattern": "to",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "GeneratedDeadlines",
                "name": "GeneratedDeadlines",
                "text": "GeneratedDeadlines"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < GeneratedDeadlines >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "control::mark_deadline",
      "method": "POST",
      "path": "/api/t/{tid}/deadlines/{id}/mark",
      "id": "post_t_tid_deadlines_id_mark",
      "source": "crates/kc-api/src/control.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/DeadlineId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/MarkDeadline"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Deadline"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "mark_deadline",
          "signature": "async fn mark_deadline (& self , tid : TenantId , id : DeadlineId , done : bool , note : & str ,) -> Result < Deadline >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "DeadlineId",
                "name": "DeadlineId",
                "text": "DeadlineId"
              }
            },
            {
              "pattern": "done",
              "type": {
                "args": [],
                "base": "bool",
                "name": "bool",
                "text": "bool"
              }
            },
            {
              "pattern": "note",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Deadline",
                "name": "Deadline",
                "text": "Deadline"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Deadline >"
          }
        }
      ],
      "errors": [
        "note_required"
      ]
    },
    {
      "handler": "depreciation",
      "method": "POST",
      "path": "/api/t/{tid}/depreciation",
      "id": "post_t_tid_depreciation",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/DepreciationRun"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Entry"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "depreciate",
          "signature": "async fn depreciate (& self , tid : TenantId , r : & DepreciationRun) -> Result < Entry >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "r",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "DepreciationRun",
                    "name": "DepreciationRun",
                    "text": "DepreciationRun"
                  }
                ],
                "name": "reference",
                "text": "& DepreciationRun"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Entry",
                "name": "Entry",
                "text": "Entry"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Entry >"
          }
        }
      ],
      "errors": [
        "nothing_to_depreciate"
      ]
    },
    {
      "handler": "fixed_assets::depreciation_groups",
      "method": "GET",
      "path": "/api/t/{tid}/depreciation/groups",
      "id": "get_t_tid_depreciation_groups",
      "source": "crates/kc-api/src/fixed_assets.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DepreciationGroup"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "depreciation_groups",
          "signature": "async fn depreciation_groups (& self , tid : TenantId) -> Result < Vec < DepreciationGroup > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "DepreciationGroup",
                    "name": "DepreciationGroup",
                    "text": "DepreciationGroup"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < DepreciationGroup >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < DepreciationGroup > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "fixed_assets::tax_depreciation",
      "method": "GET",
      "path": "/api/t/{tid}/depreciation/tax",
      "id": "get_t_tid_depreciation_tax",
      "source": "crates/kc-api/src/fixed_assets.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::fixed_assets::TaxYearQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TaxDepreciationReport"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "tax_depreciation",
          "signature": "async fn tax_depreciation (& self , tid : TenantId , year : Option < i32 > ,) -> Result < TaxDepreciationReport >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TaxDepreciationReport",
                "name": "TaxDepreciationReport",
                "text": "TaxDepreciationReport"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TaxDepreciationReport >"
          }
        }
      ],
      "errors": [
        "bad_year"
      ]
    },
    {
      "handler": "tenant_details",
      "method": "GET",
      "path": "/api/t/{tid}/details",
      "id": "get_t_tid_details",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TenantDetails"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "tenant_details",
          "signature": "async fn tenant_details (& self , id : TenantId) -> Result < TenantDetails >",
          "params": [
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TenantDetails",
                "name": "TenantDetails",
                "text": "TenantDetails"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TenantDetails >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "inbox::documents",
      "method": "GET",
      "path": "/api/t/{tid}/document-inbox",
      "id": "get_t_tid_document_inbox",
      "source": "crates/kc-api/src/inbox.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::inbox::Filter"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InboxDocument"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "inbox_document",
          "signature": "async fn inbox_document (& self , tid : TenantId , key : & str) -> Result < Option < InboxDocument > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "key",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "InboxDocument",
                    "name": "InboxDocument",
                    "text": "InboxDocument"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < InboxDocument >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Option < InboxDocument > >"
          }
        },
        {
          "name": "inbox_documents",
          "signature": "async fn inbox_documents (& self , tid : TenantId , done : bool) -> Result < Vec < InboxDocument > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "done",
              "type": {
                "args": [],
                "base": "bool",
                "name": "bool",
                "text": "bool"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "InboxDocument",
                    "name": "InboxDocument",
                    "text": "InboxDocument"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < InboxDocument >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < InboxDocument > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "inbox::receive",
      "method": "POST",
      "path": "/api/t/{tid}/document-inbox",
      "id": "post_t_tid_document_inbox",
      "source": "crates/kc-api/src/inbox.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "type": "string",
        "format": "binary"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AttachmentMeta"
        },
        "statuses": [
          200,
          201
        ]
      },
      "rust": [
        {
          "name": "receive_document",
          "signature": "async fn receive_document (& self , tid : TenantId , filename : & str , content_type : & str , content : Vec < u8 > ,) -> Result < AttachmentMeta >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "filename",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "content_type",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "content",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AttachmentMeta",
                "name": "AttachmentMeta",
                "text": "AttachmentMeta"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AttachmentMeta >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "inbox::update",
      "method": "POST",
      "path": "/api/t/{tid}/document-inbox/{key}",
      "id": "post_t_tid_document_inbox_key",
      "source": "crates/kc-api/src/inbox.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "key",
          "schema": {
            "type": "string"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/InboxUpdate"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "integer",
          "format": "i64"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "update_inbox_document",
          "signature": "async fn update_inbox_document (& self , tid : TenantId , key : & str , change : & InboxUpdate ,) -> Result < i64 >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "key",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "change",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "InboxUpdate",
                    "name": "InboxUpdate",
                    "text": "InboxUpdate"
                  }
                ],
                "name": "reference",
                "text": "& InboxUpdate"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < i64 >"
          }
        }
      ],
      "errors": [
        "inbox_changed",
        "inbox_note"
      ]
    },
    {
      "handler": "readings::list",
      "method": "GET",
      "path": "/api/t/{tid}/document-readings",
      "id": "get_t_tid_document_readings",
      "source": "crates/kc-api/src/readings.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::readings::ReadingListQuery"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/DocumentReadings"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "document_readings",
          "signature": "async fn document_readings (& self , tid : TenantId) -> Result < DocumentReadings >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "DocumentReadings",
                "name": "DocumentReadings",
                "text": "DocumentReadings"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < DocumentReadings >"
          }
        },
        {
          "name": "document_reading_settings",
          "signature": "async fn document_reading_settings (& self , tid : TenantId) -> Result < DocumentReadings >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "DocumentReadings",
                "name": "DocumentReadings",
                "text": "DocumentReadings"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < DocumentReadings >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "readings::create",
      "method": "POST",
      "path": "/api/t/{tid}/document-readings",
      "id": "post_t_tid_document_readings",
      "source": "crates/kc-api/src/readings.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::addon::AiConfirmation"
      },
      "body": {
        "type": "string",
        "format": "binary"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/DocumentReading"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "read_document",
          "signature": "async fn read_document (& self , tid : TenantId , filename : & str , content_type : & str , content : Vec < u8 > ,) -> Result < DocumentReading >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "filename",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "content_type",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "content",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "DocumentReading",
                "name": "DocumentReading",
                "text": "DocumentReading"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < DocumentReading >"
          }
        },
        {
          "name": "read_document_confirmed",
          "signature": "async fn read_document_confirmed (& self , tid : TenantId , filename : & str , content_type : & str , content : Vec < u8 > , confirmed_credits : Option < i32 > ,) -> Result < DocumentReading >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "filename",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "content_type",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "content",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            },
            {
              "pattern": "confirmed_credits",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "DocumentReading",
                "name": "DocumentReading",
                "text": "DocumentReading"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < DocumentReading >"
          }
        }
      ],
      "errors": [
        "ai_read_failed",
        "too_large",
        "unsupported_document"
      ]
    },
    {
      "handler": "addon::estimate",
      "method": "POST",
      "path": "/api/t/{tid}/document-readings/estimate",
      "id": "post_t_tid_document_readings_estimate",
      "source": "crates/kc-api/src/addon.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "type": "string",
        "format": "binary"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AiDocumentEstimate"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "document_ai_estimate",
          "signature": "async fn document_ai_estimate (& self , tid : TenantId , mime : & str , content : Vec < u8 > ,) -> Result < AiDocumentEstimate >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "mime",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "content",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AiDocumentEstimate",
                "name": "AiDocumentEstimate",
                "text": "AiDocumentEstimate"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AiDocumentEstimate >"
          }
        }
      ],
      "errors": [
        "unsupported_document"
      ]
    },
    {
      "handler": "readings::detail",
      "method": "GET",
      "path": "/api/t/{tid}/document-readings/{id}",
      "id": "get_t_tid_document_readings_id",
      "source": "crates/kc-api/src/readings.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/DocumentReading"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "document_reading",
          "signature": "async fn document_reading (& self , tid : TenantId , id : i64) -> Result < DocumentReading >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "DocumentReading",
                "name": "DocumentReading",
                "text": "DocumentReading"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < DocumentReading >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "readings::draft",
      "method": "POST",
      "path": "/api/t/{tid}/document-readings/{id}/draft",
      "id": "post_t_tid_document_readings_id_draft",
      "source": "crates/kc-api/src/readings.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewEntry"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Draft"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "document_reading_draft",
          "signature": "async fn document_reading_draft (& self , tid : TenantId , id : i64 , e : & NewEntry ,) -> Result < Draft >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            },
            {
              "pattern": "e",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewEntry",
                    "name": "NewEntry",
                    "text": "NewEntry"
                  }
                ],
                "name": "reference",
                "text": "& NewEntry"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Draft",
                "name": "Draft",
                "text": "Draft"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Draft >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "readings::save_invoice",
      "method": "POST",
      "path": "/api/t/{tid}/document-readings/{id}/invoice",
      "id": "post_t_tid_document_readings_id_invoice",
      "source": "crates/kc-api/src/readings.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SaveInvoiceDraft"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/DocumentReading"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "save_reading_invoice",
          "signature": "async fn save_reading_invoice (& self , tid : TenantId , id : i64 , b : & SaveInvoiceDraft ,) -> Result < DocumentReading >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            },
            {
              "pattern": "b",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "SaveInvoiceDraft",
                    "name": "SaveInvoiceDraft",
                    "text": "SaveInvoiceDraft"
                  }
                ],
                "name": "reference",
                "text": "& SaveInvoiceDraft"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "DocumentReading",
                "name": "DocumentReading",
                "text": "DocumentReading"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < DocumentReading >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "readings::send",
      "method": "POST",
      "path": "/api/t/{tid}/document-readings/{id}/send",
      "id": "post_t_tid_document_readings_id_send",
      "source": "crates/kc-api/src/readings.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "send_reading_invoice",
          "signature": "async fn send_reading_invoice (& self , tid : TenantId , id : i64) -> Result < EinvoiceDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceDetail",
                "name": "EinvoiceDetail",
                "text": "EinvoiceDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceDetail >"
          }
        }
      ],
      "errors": [
        "document_reading_state",
        "invoice_incomplete",
        "invoice_not_ours"
      ]
    },
    {
      "handler": "control::drafts",
      "method": "GET",
      "path": "/api/t/{tid}/drafts",
      "id": "get_t_tid_drafts",
      "source": "crates/kc-api/src/control.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::control::DraftsQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DraftSummary"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "drafts",
          "signature": "async fn drafts (& self , tid : TenantId , status : Option < & str >) -> Result < Vec < DraftSummary > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "status",
              "type": {
                "args": [
                  {
                    "args": [
                      {
                        "args": [],
                        "base": "str",
                        "name": "str",
                        "text": "str"
                      }
                    ],
                    "name": "reference",
                    "text": "& str"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < & str >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "DraftSummary",
                    "name": "DraftSummary",
                    "text": "DraftSummary"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < DraftSummary >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < DraftSummary > >"
          }
        },
        {
          "name": "pending_drafts",
          "signature": "async fn pending_drafts (& self , tid : TenantId) -> Result < Vec < DraftSummary > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "DraftSummary",
                    "name": "DraftSummary",
                    "text": "DraftSummary"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < DraftSummary >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < DraftSummary > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "control::create_draft",
      "method": "POST",
      "path": "/api/t/{tid}/drafts",
      "id": "post_t_tid_drafts",
      "source": "crates/kc-api/src/control.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewEntry"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Draft"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_draft",
          "signature": "async fn create_draft (& self , tid : TenantId , e : & NewEntry) -> Result < Draft >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "e",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewEntry",
                    "name": "NewEntry",
                    "text": "NewEntry"
                  }
                ],
                "name": "reference",
                "text": "& NewEntry"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Draft",
                "name": "Draft",
                "text": "Draft"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Draft >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "control::approve_selected",
      "method": "POST",
      "path": "/api/t/{tid}/drafts/approve-selected",
      "id": "post_t_tid_drafts_approve_selected",
      "source": "crates/kc-api/src/control.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "type": "array",
        "items": {
          "$ref": "#/$defs/DraftSelection"
        }
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "integer",
          "format": "usize",
          "minimum": 0
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "approve_selected",
          "signature": "async fn approve_selected (& self , tid : TenantId , v : & [DraftSelection]) -> Result < usize >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "v",
              "type": {
                "args": [
                  {
                    "args": [
                      {
                        "args": [],
                        "base": "DraftSelection",
                        "name": "DraftSelection",
                        "text": "DraftSelection"
                      }
                    ],
                    "name": "slice",
                    "text": "[DraftSelection]"
                  }
                ],
                "name": "reference",
                "text": "& [DraftSelection]"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "usize",
                "name": "usize",
                "text": "usize"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < usize >"
          }
        }
      ],
      "errors": [
        "draft_changed",
        "invalid_selection"
      ]
    },
    {
      "handler": "control::offline_draft",
      "method": "POST",
      "path": "/api/t/{tid}/drafts/offline",
      "id": "post_t_tid_drafts_offline",
      "source": "crates/kc-api/src/control.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/OfflineDraft"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/OfflineDraftSynced"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "sync_offline_draft",
          "signature": "async fn sync_offline_draft (& self , tid : TenantId , o : & OfflineDraft ,) -> Result < OfflineDraftSynced >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "o",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "OfflineDraft",
                    "name": "OfflineDraft",
                    "text": "OfflineDraft"
                  }
                ],
                "name": "reference",
                "text": "& OfflineDraft"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "OfflineDraftSynced",
                "name": "OfflineDraftSynced",
                "text": "OfflineDraftSynced"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < OfflineDraftSynced >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "control::draft",
      "method": "GET",
      "path": "/api/t/{tid}/drafts/{id}",
      "id": "get_t_tid_drafts_id",
      "source": "crates/kc-api/src/control.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/DraftId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Draft"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "draft",
          "signature": "async fn draft (& self , tid : TenantId , id : DraftId) -> Result < Draft >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "DraftId",
                "name": "DraftId",
                "text": "DraftId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Draft",
                "name": "Draft",
                "text": "Draft"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Draft >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "control::change_draft",
      "method": "POST",
      "path": "/api/t/{tid}/drafts/{id}",
      "id": "post_t_tid_drafts_id",
      "source": "crates/kc-api/src/control.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/DraftId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/DraftChange"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Draft"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "change_draft",
          "signature": "async fn change_draft (& self , tid : TenantId , id : DraftId , ch : & DraftChange ,) -> Result < Draft >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "DraftId",
                "name": "DraftId",
                "text": "DraftId"
              }
            },
            {
              "pattern": "ch",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "DraftChange",
                    "name": "DraftChange",
                    "text": "DraftChange"
                  }
                ],
                "name": "reference",
                "text": "& DraftChange"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Draft",
                "name": "Draft",
                "text": "Draft"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Draft >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "control::cancel_draft",
      "method": "POST",
      "path": "/api/t/{tid}/drafts/{id}/cancel",
      "id": "post_t_tid_drafts_id_cancel",
      "source": "crates/kc-api/src/control.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/DraftId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelDraft"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Draft"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cancel_draft",
          "signature": "async fn cancel_draft (& self , tid : TenantId , id : DraftId , reason : & str) -> Result < Draft >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "DraftId",
                "name": "DraftId",
                "text": "DraftId"
              }
            },
            {
              "pattern": "reason",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Draft",
                "name": "Draft",
                "text": "Draft"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Draft >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "control::post_draft",
      "method": "POST",
      "path": "/api/t/{tid}/drafts/{id}/post",
      "id": "post_t_tid_drafts_id_post",
      "source": "crates/kc-api/src/control.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/DraftId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/PostDraft"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Entry"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "post_draft",
          "signature": "async fn post_draft (& self , tid : TenantId , id : DraftId , version : i32) -> Result < Entry >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "DraftId",
                "name": "DraftId",
                "text": "DraftId"
              }
            },
            {
              "pattern": "version",
              "type": {
                "args": [],
                "base": "i32",
                "name": "i32",
                "text": "i32"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Entry",
                "name": "Entry",
                "text": "Entry"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Entry >"
          }
        }
      ],
      "errors": [
        "already_posted",
        "bad_draft_version",
        "draft_closed",
        "review_stale"
      ]
    },
    {
      "handler": "control::review",
      "method": "POST",
      "path": "/api/t/{tid}/drafts/{id}/review",
      "id": "post_t_tid_drafts_id_review",
      "source": "crates/kc-api/src/control.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/DraftId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/ReviewRequest"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Draft"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "review_draft",
          "signature": "async fn review_draft (& self , tid : TenantId , id : DraftId , r : & ReviewRequest ,) -> Result < Draft >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "DraftId",
                "name": "DraftId",
                "text": "DraftId"
              }
            },
            {
              "pattern": "r",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "ReviewRequest",
                    "name": "ReviewRequest",
                    "text": "ReviewRequest"
                  }
                ],
                "name": "reference",
                "text": "& ReviewRequest"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Draft",
                "name": "Draft",
                "text": "Draft"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Draft >"
          }
        }
      ],
      "errors": [
        "note_required"
      ]
    },
    {
      "handler": "dunning::list",
      "method": "GET",
      "path": "/api/t/{tid}/dunning",
      "id": "get_t_tid_dunning",
      "source": "crates/kc-api/src/dunning.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DunningLetter"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "dunning_letters",
          "signature": "async fn dunning_letters (& self , tid : TenantId) -> Result < Vec < DunningLetter > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "DunningLetter",
                    "name": "DunningLetter",
                    "text": "DunningLetter"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < DunningLetter >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < DunningLetter > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "dunning::create",
      "method": "POST",
      "path": "/api/t/{tid}/dunning",
      "id": "post_t_tid_dunning",
      "source": "crates/kc-api/src/dunning.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewDunningLetter"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/DunningLetter"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_dunning_letter",
          "signature": "async fn create_dunning_letter (& self , tid : TenantId , n : & NewDunningLetter ,) -> Result < DunningLetter >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewDunningLetter",
                    "name": "NewDunningLetter",
                    "text": "NewDunningLetter"
                  }
                ],
                "name": "reference",
                "text": "& NewDunningLetter"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "DunningLetter",
                "name": "DunningLetter",
                "text": "DunningLetter"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < DunningLetter >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "dunning::items",
      "method": "GET",
      "path": "/api/t/{tid}/dunning/items",
      "id": "get_t_tid_dunning_items",
      "source": "crates/kc-api/src/dunning.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::dunning::ItemsQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DunningPartner"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "dunning_items",
          "signature": "async fn dunning_items (& self , tid : TenantId , date : Option < NaiveDate > , partner : Option < PartnerId > ,) -> Result < Vec < DunningPartner > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "date",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            },
            {
              "pattern": "partner",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "PartnerId",
                    "name": "PartnerId",
                    "text": "PartnerId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < PartnerId >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "DunningPartner",
                    "name": "DunningPartner",
                    "text": "DunningPartner"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < DunningPartner >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < DunningPartner > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "dunning::stages",
      "method": "GET",
      "path": "/api/t/{tid}/dunning/stages",
      "id": "get_t_tid_dunning_stages",
      "source": "crates/kc-api/src/dunning.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DunningStage"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "dunning_stages",
          "signature": "async fn dunning_stages (& self , tid : TenantId) -> Result < Vec < DunningStage > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "DunningStage",
                    "name": "DunningStage",
                    "text": "DunningStage"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < DunningStage >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < DunningStage > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "dunning::add_stage",
      "method": "POST",
      "path": "/api/t/{tid}/dunning/stages",
      "id": "post_t_tid_dunning_stages",
      "source": "crates/kc-api/src/dunning.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewDunningStage"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/DunningStage"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_dunning_stage",
          "signature": "async fn add_dunning_stage (& self , tid : TenantId , n : & NewDunningStage ,) -> Result < DunningStage >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewDunningStage",
                    "name": "NewDunningStage",
                    "text": "NewDunningStage"
                  }
                ],
                "name": "reference",
                "text": "& NewDunningStage"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "DunningStage",
                "name": "DunningStage",
                "text": "DunningStage"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < DunningStage >"
          }
        }
      ],
      "errors": [
        "bad_dunning_stage"
      ]
    },
    {
      "handler": "dunning::get_one",
      "method": "GET",
      "path": "/api/t/{tid}/dunning/{id}",
      "id": "get_t_tid_dunning_id",
      "source": "crates/kc-api/src/dunning.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/DunningLetter"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "dunning_letter",
          "signature": "async fn dunning_letter (& self , tid : TenantId , id : DunningLetterId ,) -> Result < DunningLetter >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "DunningLetterId",
                "name": "DunningLetterId",
                "text": "DunningLetterId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "DunningLetter",
                "name": "DunningLetter",
                "text": "DunningLetter"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < DunningLetter >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "dunning::cancel",
      "method": "POST",
      "path": "/api/t/{tid}/dunning/{id}/cancel",
      "id": "post_t_tid_dunning_id_cancel",
      "source": "crates/kc-api/src/dunning.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelDunning"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/DunningLetter"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cancel_dunning_letter",
          "signature": "async fn cancel_dunning_letter (& self , tid : TenantId , id : DunningLetterId , c : & CancelDunning ,) -> Result < DunningLetter >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "DunningLetterId",
                "name": "DunningLetterId",
                "text": "DunningLetterId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "CancelDunning",
                    "name": "CancelDunning",
                    "text": "CancelDunning"
                  }
                ],
                "name": "reference",
                "text": "& CancelDunning"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "DunningLetter",
                "name": "DunningLetter",
                "text": "DunningLetter"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < DunningLetter >"
          }
        }
      ],
      "errors": [
        "already_cancelled"
      ]
    },
    {
      "handler": "dunning::letter",
      "method": "GET",
      "path": "/api/t/{tid}/dunning/{id}/letter",
      "id": "get_t_tid_dunning_id_letter",
      "source": "crates/kc-api/src/dunning.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "text/html",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "dunning_letter_html",
          "signature": "async fn dunning_letter_html (& self , tid : TenantId , id : DunningLetterId) -> Result < String >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "DunningLetterId",
                "name": "DunningLetterId",
                "text": "DunningLetterId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "String",
                "name": "String",
                "text": "String"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < String >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::list",
      "method": "GET",
      "path": "/api/t/{tid}/efaktura",
      "id": "get_t_tid_efaktura",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::efaktura::ListQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Einvoice"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "einvoices",
          "signature": "async fn einvoices (& self , tid : TenantId , direction : Option < EinvoiceDirection > , from : Option < NaiveDate > , to : Option < NaiveDate > ,) -> Result < Vec < Einvoice > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "direction",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "EinvoiceDirection",
                    "name": "EinvoiceDirection",
                    "text": "EinvoiceDirection"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < EinvoiceDirection >"
              }
            },
            {
              "pattern": "from",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            },
            {
              "pattern": "to",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "Einvoice",
                    "name": "Einvoice",
                    "text": "Einvoice"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < Einvoice >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < Einvoice > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::create",
      "method": "POST",
      "path": "/api/t/{tid}/efaktura",
      "id": "post_t_tid_efaktura",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewEinvoice"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "send_einvoice",
          "signature": "async fn send_einvoice (& self , tid : TenantId , n : & NewEinvoice) -> Result < EinvoiceDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewEinvoice",
                    "name": "NewEinvoice",
                    "text": "NewEinvoice"
                  }
                ],
                "name": "reference",
                "text": "& NewEinvoice"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceDetail",
                "name": "EinvoiceDetail",
                "text": "EinvoiceDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::upload_cert",
      "method": "POST",
      "path": "/api/t/{tid}/efaktura/certificate",
      "id": "post_t_tid_efaktura_certificate",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/UploadCert"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceSetup"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "upload_einvoice_cert",
          "signature": "async fn upload_einvoice_cert (& self , tid : TenantId , p12 : & [u8] , password : & str ,) -> Result < EinvoiceSetup >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "p12",
              "type": {
                "args": [
                  {
                    "args": [
                      {
                        "args": [],
                        "base": "u8",
                        "name": "u8",
                        "text": "u8"
                      }
                    ],
                    "name": "slice",
                    "text": "[u8]"
                  }
                ],
                "name": "reference",
                "text": "& [u8]"
              }
            },
            {
              "pattern": "password",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceSetup",
                "name": "EinvoiceSetup",
                "text": "EinvoiceSetup"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceSetup >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::deactivate_cert",
      "method": "POST",
      "path": "/api/t/{tid}/efaktura/certificate/deactivate",
      "id": "post_t_tid_efaktura_certificate_deactivate",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/api::efaktura::ReasonBody"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceSetup"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "deactivate_einvoice_cert",
          "signature": "async fn deactivate_einvoice_cert (& self , tid : TenantId , reason : & str ,) -> Result < EinvoiceSetup >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "reason",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceSetup",
                "name": "EinvoiceSetup",
                "text": "EinvoiceSetup"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceSetup >"
          }
        }
      ],
      "errors": [
        "certificate_missing",
        "global_certificate"
      ]
    },
    {
      "handler": "efaktura::upload_local_cert",
      "method": "POST",
      "path": "/api/t/{tid}/efaktura/certificate/local",
      "id": "post_t_tid_efaktura_certificate_local",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/LocalCert"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceSetup"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "register_local_einvoice_cert",
          "signature": "async fn register_local_einvoice_cert (& self , tid : TenantId , cert : & [u8] ,) -> Result < EinvoiceSetup >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "cert",
              "type": {
                "args": [
                  {
                    "args": [
                      {
                        "args": [],
                        "base": "u8",
                        "name": "u8",
                        "text": "u8"
                      }
                    ],
                    "name": "slice",
                    "text": "[u8]"
                  }
                ],
                "name": "reference",
                "text": "& [u8]"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceSetup",
                "name": "EinvoiceSetup",
                "text": "EinvoiceSetup"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceSetup >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::lock_cert",
      "method": "POST",
      "path": "/api/t/{tid}/efaktura/certificate/lock",
      "id": "post_t_tid_efaktura_certificate_lock",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceSetup"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "lock_einvoice_cert",
          "signature": "async fn lock_einvoice_cert (& self , tid : TenantId) -> Result < EinvoiceSetup >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceSetup",
                "name": "EinvoiceSetup",
                "text": "EinvoiceSetup"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceSetup >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::unlock_cert",
      "method": "POST",
      "path": "/api/t/{tid}/efaktura/certificate/unlock",
      "id": "post_t_tid_efaktura_certificate_unlock",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/UnlockCert"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceSetup"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "unlock_einvoice_cert",
          "signature": "async fn unlock_einvoice_cert (& self , tid : TenantId , password : & str ,) -> Result < EinvoiceSetup >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "password",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceSetup",
                "name": "EinvoiceSetup",
                "text": "EinvoiceSetup"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceSetup >"
          }
        }
      ],
      "errors": [
        "certificate_local",
        "certificate_missing",
        "secret_key_missing"
      ]
    },
    {
      "handler": "efaktura::codebooks",
      "method": "GET",
      "path": "/api/t/{tid}/efaktura/codebooks",
      "id": "get_t_tid_efaktura_codebooks",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceCodebooks"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "einvoice_codebooks",
          "signature": "async fn einvoice_codebooks (& self , tid : TenantId) -> Result < EinvoiceCodebooks >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceCodebooks",
                "name": "EinvoiceCodebooks",
                "text": "EinvoiceCodebooks"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceCodebooks >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::fetch_inbox",
      "method": "POST",
      "path": "/api/t/{tid}/efaktura/inbox",
      "id": "post_t_tid_efaktura_inbox",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::efaktura::InboxQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/InboxFetch"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "fetch_einvoice_inbox",
          "signature": "async fn fetch_einvoice_inbox (& self , tid : TenantId , from : Option < NaiveDate > , to : Option < NaiveDate > ,) -> Result < InboxFetch >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "from",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            },
            {
              "pattern": "to",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "InboxFetch",
                "name": "InboxFetch",
                "text": "InboxFetch"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < InboxFetch >"
          }
        }
      ],
      "errors": [
        "bad_period",
        "ujp_error"
      ]
    },
    {
      "handler": "efaktura::settings_sources",
      "method": "GET",
      "path": "/api/t/{tid}/efaktura/inheritance",
      "id": "get_t_tid_efaktura_inheritance",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/UjpSettingsSources"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "einvoice_settings_sources",
          "signature": "async fn einvoice_settings_sources (& self , tid : TenantId) -> Result < UjpSettingsSources >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "UjpSettingsSources",
                "name": "UjpSettingsSources",
                "text": "UjpSettingsSources"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < UjpSettingsSources >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::set_inheritance",
      "method": "POST",
      "path": "/api/t/{tid}/efaktura/inheritance",
      "id": "post_t_tid_efaktura_inheritance",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SetCertificateInheritance"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceSetup"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "set_einvoice_certificate_inheritance",
          "signature": "async fn set_einvoice_certificate_inheritance (& self , tid : TenantId , inherit : bool ,) -> Result < EinvoiceSetup >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "inherit",
              "type": {
                "args": [],
                "base": "bool",
                "name": "bool",
                "text": "bool"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceSetup",
                "name": "EinvoiceSetup",
                "text": "EinvoiceSetup"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceSetup >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::offline_sync",
      "method": "POST",
      "path": "/api/t/{tid}/efaktura/offline",
      "id": "post_t_tid_efaktura_offline",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/OfflineEinvoice"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/OfflineSynced"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "sync_offline_einvoice",
          "signature": "async fn sync_offline_einvoice (& self , tid : TenantId , o : & OfflineEinvoice ,) -> Result < OfflineSynced >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "o",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "OfflineEinvoice",
                    "name": "OfflineEinvoice",
                    "text": "OfflineEinvoice"
                  }
                ],
                "name": "reference",
                "text": "& OfflineEinvoice"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "OfflineSynced",
                "name": "OfflineSynced",
                "text": "OfflineSynced"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < OfflineSynced >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::preview",
      "method": "POST",
      "path": "/api/t/{tid}/efaktura/preview",
      "id": "post_t_tid_efaktura_preview",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewEinvoice"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoicePreview"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "einvoice_preview",
          "signature": "async fn einvoice_preview (& self , tid : TenantId , n : & NewEinvoice ,) -> Result < EinvoicePreview >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewEinvoice",
                    "name": "NewEinvoice",
                    "text": "NewEinvoice"
                  }
                ],
                "name": "reference",
                "text": "& NewEinvoice"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoicePreview",
                "name": "EinvoicePreview",
                "text": "EinvoicePreview"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoicePreview >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "einvoice_batches::list",
      "method": "GET",
      "path": "/api/t/{tid}/efaktura/send-batches",
      "id": "get_t_tid_efaktura_send_batches",
      "source": "crates/kc-api/src/einvoice_batches.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EinvoiceSendBatch"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "einvoice_send_batches",
          "signature": "async fn einvoice_send_batches (& self , tid : TenantId) -> Result < Vec < EinvoiceSendBatch > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "EinvoiceSendBatch",
                    "name": "EinvoiceSendBatch",
                    "text": "EinvoiceSendBatch"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < EinvoiceSendBatch >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < EinvoiceSendBatch > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "einvoice_batches::create",
      "method": "POST",
      "path": "/api/t/{tid}/efaktura/send-batches",
      "id": "post_t_tid_efaktura_send_batches",
      "source": "crates/kc-api/src/einvoice_batches.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewEinvoiceSendBatch"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceSendBatchDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_einvoice_send_batch",
          "signature": "async fn create_einvoice_send_batch (& self , tid : TenantId , n : & NewEinvoiceSendBatch ,) -> Result < EinvoiceSendBatchDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewEinvoiceSendBatch",
                    "name": "NewEinvoiceSendBatch",
                    "text": "NewEinvoiceSendBatch"
                  }
                ],
                "name": "reference",
                "text": "& NewEinvoiceSendBatch"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceSendBatchDetail",
                "name": "EinvoiceSendBatchDetail",
                "text": "EinvoiceSendBatchDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceSendBatchDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "einvoice_batches::get",
      "method": "GET",
      "path": "/api/t/{tid}/efaktura/send-batches/{id}",
      "id": "get_t_tid_efaktura_send_batches_id",
      "source": "crates/kc-api/src/einvoice_batches.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceSendBatchDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "einvoice_send_batch",
          "signature": "async fn einvoice_send_batch (& self , tid : TenantId , id : EinvoiceSendBatchId ,) -> Result < EinvoiceSendBatchDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "EinvoiceSendBatchId",
                "name": "EinvoiceSendBatchId",
                "text": "EinvoiceSendBatchId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceSendBatchDetail",
                "name": "EinvoiceSendBatchDetail",
                "text": "EinvoiceSendBatchDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceSendBatchDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "einvoice_batches::retry",
      "method": "POST",
      "path": "/api/t/{tid}/efaktura/send-batches/{id}/retry",
      "id": "post_t_tid_efaktura_send_batches_id_retry",
      "source": "crates/kc-api/src/einvoice_batches.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceSendBatchDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "retry_einvoice_send_batch",
          "signature": "async fn retry_einvoice_send_batch (& self , tid : TenantId , id : EinvoiceSendBatchId ,) -> Result < EinvoiceSendBatchDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "EinvoiceSendBatchId",
                "name": "EinvoiceSendBatchId",
                "text": "EinvoiceSendBatchId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceSendBatchDetail",
                "name": "EinvoiceSendBatchDetail",
                "text": "EinvoiceSendBatchDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceSendBatchDetail >"
          }
        }
      ],
      "errors": [
        "einvoice_batch_not_retryable"
      ]
    },
    {
      "handler": "efaktura::set_settings",
      "method": "POST",
      "path": "/api/t/{tid}/efaktura/settings",
      "id": "post_t_tid_efaktura_settings",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SetEinvoiceSettings"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceSetup"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "set_einvoice_settings",
          "signature": "async fn set_einvoice_settings (& self , tid : TenantId , n : & SetEinvoiceSettings ,) -> Result < EinvoiceSetup >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "SetEinvoiceSettings",
                    "name": "SetEinvoiceSettings",
                    "text": "SetEinvoiceSettings"
                  }
                ],
                "name": "reference",
                "text": "& SetEinvoiceSettings"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceSetup",
                "name": "EinvoiceSetup",
                "text": "EinvoiceSetup"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceSetup >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::setup",
      "method": "GET",
      "path": "/api/t/{tid}/efaktura/setup",
      "id": "get_t_tid_efaktura_setup",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceSetup"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "einvoice_setup",
          "signature": "async fn einvoice_setup (& self , tid : TenantId) -> Result < EinvoiceSetup >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceSetup",
                "name": "EinvoiceSetup",
                "text": "EinvoiceSetup"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceSetup >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::get_one",
      "method": "GET",
      "path": "/api/t/{tid}/efaktura/{id}",
      "id": "get_t_tid_efaktura_id",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "einvoice",
          "signature": "async fn einvoice (& self , tid : TenantId , id : EinvoiceId) -> Result < EinvoiceDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "EinvoiceId",
                "name": "EinvoiceId",
                "text": "EinvoiceId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceDetail",
                "name": "EinvoiceDetail",
                "text": "EinvoiceDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::asic",
      "method": "GET",
      "path": "/api/t/{tid}/efaktura/{id}/asic",
      "id": "get_t_tid_efaktura_id_asic",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/vnd.etsi.asic-e+zip",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "einvoice_asic",
          "signature": "async fn einvoice_asic (& self , tid : TenantId , id : EinvoiceId) -> Result < Vec < u8 > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "EinvoiceId",
                "name": "EinvoiceId",
                "text": "EinvoiceId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < u8 > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::correction",
      "method": "POST",
      "path": "/api/t/{tid}/efaktura/{id}/correction",
      "id": "post_t_tid_efaktura_id_correction",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/EinvoiceCorrection"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "correct_einvoice",
          "signature": "async fn correct_einvoice (& self , tid : TenantId , id : EinvoiceId , b : & EinvoiceCorrection ,) -> Result < EinvoiceDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "EinvoiceId",
                "name": "EinvoiceId",
                "text": "EinvoiceId"
              }
            },
            {
              "pattern": "b",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "EinvoiceCorrection",
                    "name": "EinvoiceCorrection",
                    "text": "EinvoiceCorrection"
                  }
                ],
                "name": "reference",
                "text": "& EinvoiceCorrection"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceDetail",
                "name": "EinvoiceDetail",
                "text": "EinvoiceDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceDetail >"
          }
        }
      ],
      "errors": [
        "bad_einvoice"
      ]
    },
    {
      "handler": "efaktura::decide",
      "method": "POST",
      "path": "/api/t/{tid}/efaktura/{id}/decision",
      "id": "post_t_tid_efaktura_id_decision",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/EinvoiceDecision"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "decide_einvoice",
          "signature": "async fn decide_einvoice (& self , tid : TenantId , id : EinvoiceId , b : & EinvoiceDecision ,) -> Result < EinvoiceDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "EinvoiceId",
                "name": "EinvoiceId",
                "text": "EinvoiceId"
              }
            },
            {
              "pattern": "b",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "EinvoiceDecision",
                    "name": "EinvoiceDecision",
                    "text": "EinvoiceDecision"
                  }
                ],
                "name": "reference",
                "text": "& EinvoiceDecision"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceDetail",
                "name": "EinvoiceDetail",
                "text": "EinvoiceDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceDetail >"
          }
        }
      ],
      "errors": [
        "einvoice_done",
        "einvoice_state",
        "reason_required"
      ]
    },
    {
      "handler": "efaktura::history",
      "method": "GET",
      "path": "/api/t/{tid}/efaktura/{id}/history",
      "id": "get_t_tid_efaktura_id_history",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EinvoiceStatusChange"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "einvoice_history",
          "signature": "async fn einvoice_history (& self , tid : TenantId , id : EinvoiceId ,) -> Result < Vec < EinvoiceStatusChange > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "EinvoiceId",
                "name": "EinvoiceId",
                "text": "EinvoiceId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "EinvoiceStatusChange",
                    "name": "EinvoiceStatusChange",
                    "text": "EinvoiceStatusChange"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < EinvoiceStatusChange >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < EinvoiceStatusChange > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::pdf",
      "method": "GET",
      "path": "/api/t/{tid}/efaktura/{id}/pdf",
      "id": "get_t_tid_efaktura_id_pdf",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/pdf",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "einvoice_pdf",
          "signature": "async fn einvoice_pdf (& self , tid : TenantId , id : EinvoiceId) -> Result < Vec < u8 > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "EinvoiceId",
                "name": "EinvoiceId",
                "text": "EinvoiceId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < u8 > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "einvoice_receipts::preview",
      "method": "GET",
      "path": "/api/t/{tid}/efaktura/{id}/receipt-import",
      "id": "get_t_tid_efaktura_id_receipt_import",
      "source": "crates/kc-api/src/einvoice_receipts.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/EinvoiceId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceReceiptPreview"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "einvoice_receipt_preview",
          "signature": "async fn einvoice_receipt_preview (& self , tid : TenantId , id : EinvoiceId ,) -> Result < EinvoiceReceiptPreview >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "EinvoiceId",
                "name": "EinvoiceId",
                "text": "EinvoiceId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceReceiptPreview",
                "name": "EinvoiceReceiptPreview",
                "text": "EinvoiceReceiptPreview"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceReceiptPreview >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "einvoice_receipts::import",
      "method": "POST",
      "path": "/api/t/{tid}/efaktura/{id}/receipt-import",
      "id": "post_t_tid_efaktura_id_receipt_import",
      "source": "crates/kc-api/src/einvoice_receipts.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/EinvoiceId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/ImportEinvoiceReceipt"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/StockDoc"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "import_einvoice_receipt",
          "signature": "async fn import_einvoice_receipt (& self , tid : TenantId , id : EinvoiceId , n : & ImportEinvoiceReceipt ,) -> Result < StockDoc >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "EinvoiceId",
                "name": "EinvoiceId",
                "text": "EinvoiceId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "ImportEinvoiceReceipt",
                    "name": "ImportEinvoiceReceipt",
                    "text": "ImportEinvoiceReceipt"
                  }
                ],
                "name": "reference",
                "text": "& ImportEinvoiceReceipt"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "StockDoc",
                "name": "StockDoc",
                "text": "StockDoc"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < StockDoc >"
          }
        }
      ],
      "errors": [
        "einvoice_receipt_mismatch",
        "einvoice_receipt_partner"
      ]
    },
    {
      "handler": "efaktura::resend",
      "method": "POST",
      "path": "/api/t/{tid}/efaktura/{id}/send",
      "id": "post_t_tid_efaktura_id_send",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "resend_einvoice",
          "signature": "async fn resend_einvoice (& self , tid : TenantId , id : EinvoiceId) -> Result < EinvoiceDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "EinvoiceId",
                "name": "EinvoiceId",
                "text": "EinvoiceId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceDetail",
                "name": "EinvoiceDetail",
                "text": "EinvoiceDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::refresh_status",
      "method": "POST",
      "path": "/api/t/{tid}/efaktura/{id}/status",
      "id": "post_t_tid_efaktura_id_status",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "einvoice_status",
          "signature": "async fn einvoice_status (& self , tid : TenantId , id : EinvoiceId) -> Result < EinvoiceDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "EinvoiceId",
                "name": "EinvoiceId",
                "text": "EinvoiceId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceDetail",
                "name": "EinvoiceDetail",
                "text": "EinvoiceDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceDetail >"
          }
        }
      ],
      "errors": [
        "einvoice_state"
      ]
    },
    {
      "handler": "efaktura::storno",
      "method": "POST",
      "path": "/api/t/{tid}/efaktura/{id}/storno",
      "id": "post_t_tid_efaktura_id_storno",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/EinvoiceStorno"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "storno_einvoice",
          "signature": "async fn storno_einvoice (& self , tid : TenantId , id : EinvoiceId , b : & EinvoiceStorno ,) -> Result < EinvoiceDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "EinvoiceId",
                "name": "EinvoiceId",
                "text": "EinvoiceId"
              }
            },
            {
              "pattern": "b",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "EinvoiceStorno",
                    "name": "EinvoiceStorno",
                    "text": "EinvoiceStorno"
                  }
                ],
                "name": "reference",
                "text": "& EinvoiceStorno"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceDetail",
                "name": "EinvoiceDetail",
                "text": "EinvoiceDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceDetail >"
          }
        }
      ],
      "errors": [
        "bad_einvoice"
      ]
    },
    {
      "handler": "efaktura::ujp_pdf",
      "method": "GET",
      "path": "/api/t/{tid}/efaktura/{id}/ujp-pdf",
      "id": "get_t_tid_efaktura_id_ujp_pdf",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/pdf",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "einvoice_ujp_pdf",
          "signature": "async fn einvoice_ujp_pdf (& self , tid : TenantId , id : EinvoiceId) -> Result < Vec < u8 > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "EinvoiceId",
                "name": "EinvoiceId",
                "text": "EinvoiceId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < u8 > >"
          }
        }
      ],
      "errors": [
        "einvoice_state"
      ]
    },
    {
      "handler": "efaktura::vat_totals",
      "method": "POST",
      "path": "/api/t/{tid}/efaktura/{id}/vat-totals",
      "id": "post_t_tid_efaktura_id_vat_totals",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/PurchaseVatReport"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "report_einvoice_vat",
          "signature": "async fn report_einvoice_vat (& self , tid : TenantId , id : EinvoiceId , b : & PurchaseVatReport ,) -> Result < EinvoiceDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "EinvoiceId",
                "name": "EinvoiceId",
                "text": "EinvoiceId"
              }
            },
            {
              "pattern": "b",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "PurchaseVatReport",
                    "name": "PurchaseVatReport",
                    "text": "PurchaseVatReport"
                  }
                ],
                "name": "reference",
                "text": "& PurchaseVatReport"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceDetail",
                "name": "EinvoiceDetail",
                "text": "EinvoiceDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceDetail >"
          }
        }
      ],
      "errors": [
        "bad_vat_totals",
        "einvoice_done",
        "einvoice_state"
      ]
    },
    {
      "handler": "payroll::employees",
      "method": "GET",
      "path": "/api/t/{tid}/employees",
      "id": "get_t_tid_employees",
      "source": "crates/kc-api/src/payroll.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EmployeeSummary"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "employees",
          "signature": "async fn employees (& self , tid : TenantId) -> Result < Vec < EmployeeSummary > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "EmployeeSummary",
                    "name": "EmployeeSummary",
                    "text": "EmployeeSummary"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < EmployeeSummary >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < EmployeeSummary > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll::create_employee",
      "method": "POST",
      "path": "/api/t/{tid}/employees",
      "id": "post_t_tid_employees",
      "source": "crates/kc-api/src/payroll.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewEmployee"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Employee"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_employee",
          "signature": "async fn create_employee (& self , tid : TenantId , e : & NewEmployee) -> Result < Employee >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "e",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewEmployee",
                    "name": "NewEmployee",
                    "text": "NewEmployee"
                  }
                ],
                "name": "reference",
                "text": "& NewEmployee"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Employee",
                "name": "Employee",
                "text": "Employee"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Employee >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll::employee",
      "method": "GET",
      "path": "/api/t/{tid}/employees/{id}",
      "id": "get_t_tid_employees_id",
      "source": "crates/kc-api/src/payroll.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/EmployeeId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Employee"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "employee",
          "signature": "async fn employee (& self , tid : TenantId , id : EmployeeId) -> Result < Employee >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "EmployeeId",
                "name": "EmployeeId",
                "text": "EmployeeId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Employee",
                "name": "Employee",
                "text": "Employee"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Employee >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll::change_employee",
      "method": "POST",
      "path": "/api/t/{tid}/employees/{id}",
      "id": "post_t_tid_employees_id",
      "source": "crates/kc-api/src/payroll.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/EmployeeId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/EmployeeChange"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Employee"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "change_employee",
          "signature": "async fn change_employee (& self , tid : TenantId , id : EmployeeId , ch : & EmployeeChange ,) -> Result < Employee >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "EmployeeId",
                "name": "EmployeeId",
                "text": "EmployeeId"
              }
            },
            {
              "pattern": "ch",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "EmployeeChange",
                    "name": "EmployeeChange",
                    "text": "EmployeeChange"
                  }
                ],
                "name": "reference",
                "text": "& EmployeeChange"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Employee",
                "name": "Employee",
                "text": "Employee"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Employee >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll::add_contract",
      "method": "POST",
      "path": "/api/t/{tid}/employees/{id}/contracts",
      "id": "post_t_tid_employees_id_contracts",
      "source": "crates/kc-api/src/payroll.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/EmployeeId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewContract"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Contract"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_contract",
          "signature": "async fn add_contract (& self , tid : TenantId , employee : EmployeeId , c : & NewContract ,) -> Result < Contract >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "employee",
              "type": {
                "args": [],
                "base": "EmployeeId",
                "name": "EmployeeId",
                "text": "EmployeeId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewContract",
                    "name": "NewContract",
                    "text": "NewContract"
                  }
                ],
                "name": "reference",
                "text": "& NewContract"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Contract",
                "name": "Contract",
                "text": "Contract"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Contract >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "mpin_epdd::set_municipality",
      "method": "POST",
      "path": "/api/t/{tid}/employees/{id}/municipality",
      "id": "post_t_tid_employees_id_municipality",
      "source": "crates/kc-api/src/mpin_epdd.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/EmployeeId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SetMunicipality"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/MpinCode"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "set_employee_municipality",
          "signature": "async fn set_employee_municipality (& self , tid : TenantId , id : EmployeeId , code : & str ,) -> Result < MpinCode >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "EmployeeId",
                "name": "EmployeeId",
                "text": "EmployeeId"
              }
            },
            {
              "pattern": "code",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "MpinCode",
                "name": "MpinCode",
                "text": "MpinCode"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < MpinCode >"
          }
        }
      ],
      "errors": [
        "mpin_code"
      ]
    },
    {
      "handler": "post_entry",
      "method": "POST",
      "path": "/api/t/{tid}/entries",
      "id": "post_t_tid_entries",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewEntry"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Entry"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "post_entry",
          "signature": "async fn post_entry (& self , tid : TenantId , e : & NewEntry) -> Result < Entry >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "e",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewEntry",
                    "name": "NewEntry",
                    "text": "NewEntry"
                  }
                ],
                "name": "reference",
                "text": "& NewEntry"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Entry",
                "name": "Entry",
                "text": "Entry"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Entry >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "get_entry",
      "method": "GET",
      "path": "/api/t/{tid}/entries/{id}",
      "id": "get_t_tid_entries_id",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::EntryQuery"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Entry"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "entry_summary",
          "signature": "async fn entry_summary (& self , tid : TenantId , id : EntryId) -> Result < Entry >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "EntryId",
                "name": "EntryId",
                "text": "EntryId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Entry",
                "name": "Entry",
                "text": "Entry"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Entry >"
          }
        },
        {
          "name": "entry",
          "signature": "async fn entry (& self , tid : TenantId , id : EntryId) -> Result < Entry >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "EntryId",
                "name": "EntryId",
                "text": "EntryId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Entry",
                "name": "Entry",
                "text": "Entry"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Entry >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "link_attachment_route",
      "method": "POST",
      "path": "/api/t/{tid}/entries/{id}/attachments",
      "id": "post_t_tid_entries_id_attachments",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::AttachmentOptions"
      },
      "body": {
        "$ref": "#/$defs/LinkAttachment"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Entry"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "link_export_proof",
          "signature": "async fn link_export_proof (& self , tid : TenantId , entry : EntryId , attachment_id : AttachmentId ,) -> Result < Entry >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "entry",
              "type": {
                "args": [],
                "base": "EntryId",
                "name": "EntryId",
                "text": "EntryId"
              }
            },
            {
              "pattern": "attachment_id",
              "type": {
                "args": [],
                "base": "AttachmentId",
                "name": "AttachmentId",
                "text": "AttachmentId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Entry",
                "name": "Entry",
                "text": "Entry"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Entry >"
          }
        },
        {
          "name": "link_attachment",
          "signature": "async fn link_attachment (& self , tid : TenantId , entry : EntryId , attachment : AttachmentId ,) -> Result < Entry >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "entry",
              "type": {
                "args": [],
                "base": "EntryId",
                "name": "EntryId",
                "text": "EntryId"
              }
            },
            {
              "pattern": "attachment",
              "type": {
                "args": [],
                "base": "AttachmentId",
                "name": "AttachmentId",
                "text": "AttachmentId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Entry",
                "name": "Entry",
                "text": "Entry"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Entry >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "storno",
      "method": "POST",
      "path": "/api/t/{tid}/entries/{id}/storno",
      "id": "post_t_tid_entries_id_storno",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/StornoRequest"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Entry"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "storno",
          "signature": "async fn storno (& self , tid : TenantId , id : EntryId , req : & StornoRequest) -> Result < Entry >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "EntryId",
                "name": "EntryId",
                "text": "EntryId"
              }
            },
            {
              "pattern": "req",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "StornoRequest",
                    "name": "StornoRequest",
                    "text": "StornoRequest"
                  }
                ],
                "name": "reference",
                "text": "& StornoRequest"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Entry",
                "name": "Entry",
                "text": "Entry"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Entry >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "filings::list",
      "method": "GET",
      "path": "/api/t/{tid}/filings",
      "id": "get_t_tid_filings",
      "source": "crates/kc-api/src/filings.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::filings::ListQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Filing"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "filings",
          "signature": "async fn filings (& self , tid : TenantId) -> Result < Vec < Filing > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "Filing",
                    "name": "Filing",
                    "text": "Filing"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < Filing >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < Filing > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "filings::prepare",
      "method": "POST",
      "path": "/api/t/{tid}/filings",
      "id": "post_t_tid_filings",
      "source": "crates/kc-api/src/filings.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewFiling"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Filing"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "prepare_filing",
          "signature": "async fn prepare_filing (& self , tid : TenantId , n : & NewFiling) -> Result < Filing >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewFiling",
                    "name": "NewFiling",
                    "text": "NewFiling"
                  }
                ],
                "name": "reference",
                "text": "& NewFiling"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Filing",
                "name": "Filing",
                "text": "Filing"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Filing >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "filings::checks",
      "method": "GET",
      "path": "/api/t/{tid}/filings/checks",
      "id": "get_t_tid_filings_checks",
      "source": "crates/kc-api/src/filings.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::filings::ChecksQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/FilingChecks"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "filing_checks",
          "signature": "async fn filing_checks (& self , tid : TenantId , kind : FilingKind , year : Option < i32 > , period : Option < NaiveDate > ,) -> Result < FilingChecks >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "kind",
              "type": {
                "args": [],
                "base": "FilingKind",
                "name": "FilingKind",
                "text": "FilingKind"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            },
            {
              "pattern": "period",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "FilingChecks",
                "name": "FilingChecks",
                "text": "FilingChecks"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < FilingChecks >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "filings::get_one",
      "method": "GET",
      "path": "/api/t/{tid}/filings/{id}",
      "id": "get_t_tid_filings_id",
      "source": "crates/kc-api/src/filings.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/FilingId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Filing"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "filing",
          "signature": "async fn filing (& self , tid : TenantId , id : FilingId) -> Result < Filing >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "FilingId",
                "name": "FilingId",
                "text": "FilingId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Filing",
                "name": "Filing",
                "text": "Filing"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Filing >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "filings::accept",
      "method": "POST",
      "path": "/api/t/{tid}/filings/{id}/accept",
      "id": "post_t_tid_filings_id_accept",
      "source": "crates/kc-api/src/filings.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/FilingId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/FilingStep"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Filing"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "filing_step",
          "signature": "async fn filing_step (& self , tid : TenantId , id : FilingId , status : FilingStatus , s : & FilingStep ,) -> Result < Filing >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "FilingId",
                "name": "FilingId",
                "text": "FilingId"
              }
            },
            {
              "pattern": "status",
              "type": {
                "args": [],
                "base": "FilingStatus",
                "name": "FilingStatus",
                "text": "FilingStatus"
              }
            },
            {
              "pattern": "s",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "FilingStep",
                    "name": "FilingStep",
                    "text": "FilingStep"
                  }
                ],
                "name": "reference",
                "text": "& FilingStep"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Filing",
                "name": "Filing",
                "text": "Filing"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Filing >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "filings::cancel",
      "method": "POST",
      "path": "/api/t/{tid}/filings/{id}/cancel",
      "id": "post_t_tid_filings_id_cancel",
      "source": "crates/kc-api/src/filings.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/FilingId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/FilingStep"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Filing"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "filing_step",
          "signature": "async fn filing_step (& self , tid : TenantId , id : FilingId , status : FilingStatus , s : & FilingStep ,) -> Result < Filing >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "FilingId",
                "name": "FilingId",
                "text": "FilingId"
              }
            },
            {
              "pattern": "status",
              "type": {
                "args": [],
                "base": "FilingStatus",
                "name": "FilingStatus",
                "text": "FilingStatus"
              }
            },
            {
              "pattern": "s",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "FilingStep",
                    "name": "FilingStep",
                    "text": "FilingStep"
                  }
                ],
                "name": "reference",
                "text": "& FilingStep"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Filing",
                "name": "Filing",
                "text": "Filing"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Filing >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "filings::correct",
      "method": "POST",
      "path": "/api/t/{tid}/filings/{id}/correct",
      "id": "post_t_tid_filings_id_correct",
      "source": "crates/kc-api/src/filings.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/FilingId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/FilingCorrection"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Filing"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "correct_filing",
          "signature": "async fn correct_filing (& self , tid : TenantId , id : FilingId , c : & FilingCorrection ,) -> Result < Filing >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "FilingId",
                "name": "FilingId",
                "text": "FilingId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "FilingCorrection",
                    "name": "FilingCorrection",
                    "text": "FilingCorrection"
                  }
                ],
                "name": "reference",
                "text": "& FilingCorrection"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Filing",
                "name": "Filing",
                "text": "Filing"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Filing >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "filings::reject",
      "method": "POST",
      "path": "/api/t/{tid}/filings/{id}/reject",
      "id": "post_t_tid_filings_id_reject",
      "source": "crates/kc-api/src/filings.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/FilingId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/FilingStep"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Filing"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "filing_step",
          "signature": "async fn filing_step (& self , tid : TenantId , id : FilingId , status : FilingStatus , s : & FilingStep ,) -> Result < Filing >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "FilingId",
                "name": "FilingId",
                "text": "FilingId"
              }
            },
            {
              "pattern": "status",
              "type": {
                "args": [],
                "base": "FilingStatus",
                "name": "FilingStatus",
                "text": "FilingStatus"
              }
            },
            {
              "pattern": "s",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "FilingStep",
                    "name": "FilingStep",
                    "text": "FilingStep"
                  }
                ],
                "name": "reference",
                "text": "& FilingStep"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Filing",
                "name": "Filing",
                "text": "Filing"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Filing >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "filings::sign",
      "method": "POST",
      "path": "/api/t/{tid}/filings/{id}/sign",
      "id": "post_t_tid_filings_id_sign",
      "source": "crates/kc-api/src/filings.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/FilingId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/FilingStep"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Filing"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "filing_step",
          "signature": "async fn filing_step (& self , tid : TenantId , id : FilingId , status : FilingStatus , s : & FilingStep ,) -> Result < Filing >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "FilingId",
                "name": "FilingId",
                "text": "FilingId"
              }
            },
            {
              "pattern": "status",
              "type": {
                "args": [],
                "base": "FilingStatus",
                "name": "FilingStatus",
                "text": "FilingStatus"
              }
            },
            {
              "pattern": "s",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "FilingStep",
                    "name": "FilingStep",
                    "text": "FilingStep"
                  }
                ],
                "name": "reference",
                "text": "& FilingStep"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Filing",
                "name": "Filing",
                "text": "Filing"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Filing >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "filings::submit",
      "method": "POST",
      "path": "/api/t/{tid}/filings/{id}/submit",
      "id": "post_t_tid_filings_id_submit",
      "source": "crates/kc-api/src/filings.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/FilingId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/FilingStep"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Filing"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "filing_step",
          "signature": "async fn filing_step (& self , tid : TenantId , id : FilingId , status : FilingStatus , s : & FilingStep ,) -> Result < Filing >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "FilingId",
                "name": "FilingId",
                "text": "FilingId"
              }
            },
            {
              "pattern": "status",
              "type": {
                "args": [],
                "base": "FilingStatus",
                "name": "FilingStatus",
                "text": "FilingStatus"
              }
            },
            {
              "pattern": "s",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "FilingStep",
                    "name": "FilingStep",
                    "text": "FilingStep"
                  }
                ],
                "name": "reference",
                "text": "& FilingStep"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Filing",
                "name": "Filing",
                "text": "Filing"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Filing >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "retail_book::fiscal_book",
      "method": "GET",
      "path": "/api/t/{tid}/fiscal-report-book",
      "id": "get_t_tid_fiscal_report_book",
      "source": "crates/kc-api/src/retail_book.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::retail_book::BookQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/FiscalBook"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "fiscal_report_book",
          "signature": "async fn fiscal_report_book (& self , tid : TenantId , warehouse : WarehouseId , year : Option < i32 > ,) -> Result < FiscalBook >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "warehouse",
              "type": {
                "args": [],
                "base": "WarehouseId",
                "name": "WarehouseId",
                "text": "WarehouseId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "FiscalBook",
                "name": "FiscalBook",
                "text": "FiscalBook"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < FiscalBook >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "year::fiscal_years",
      "method": "GET",
      "path": "/api/t/{tid}/fiscal-years",
      "id": "get_t_tid_fiscal_years",
      "source": "crates/kc-api/src/year.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FiscalYear"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "fiscal_years",
          "signature": "async fn fiscal_years (& self , tid : TenantId) -> Result < Vec < FiscalYear > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "FiscalYear",
                    "name": "FiscalYear",
                    "text": "FiscalYear"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < FiscalYear >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < FiscalYear > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "year::settings",
      "method": "GET",
      "path": "/api/t/{tid}/fiscal-years/settings",
      "id": "get_t_tid_fiscal_years_settings",
      "source": "crates/kc-api/src/year.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FiscalYearSetting"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "fiscal_year_settings",
          "signature": "async fn fiscal_year_settings (& self , tid : TenantId) -> Result < Vec < FiscalYearSetting > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "FiscalYearSetting",
                    "name": "FiscalYearSetting",
                    "text": "FiscalYearSetting"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < FiscalYearSetting >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < FiscalYearSetting > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "year::set_setting",
      "method": "POST",
      "path": "/api/t/{tid}/fiscal-years/settings",
      "id": "post_t_tid_fiscal_years_settings",
      "source": "crates/kc-api/src/year.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewFiscalYearSetting"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FiscalYearSetting"
          }
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "set_fiscal_year",
          "signature": "async fn set_fiscal_year (& self , tid : TenantId , req : & NewFiscalYearSetting ,) -> Result < Vec < FiscalYearSetting > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "req",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewFiscalYearSetting",
                    "name": "NewFiscalYearSetting",
                    "text": "NewFiscalYearSetting"
                  }
                ],
                "name": "reference",
                "text": "& NewFiscalYearSetting"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "FiscalYearSetting",
                    "name": "FiscalYearSetting",
                    "text": "FiscalYearSetting"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < FiscalYearSetting >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < FiscalYearSetting > >"
          }
        }
      ],
      "errors": [
        "bad_fiscal_year"
      ]
    },
    {
      "handler": "bank::fx_rates",
      "method": "GET",
      "path": "/api/t/{tid}/fx-rates",
      "id": "get_t_tid_fx_rates",
      "source": "crates/kc-api/src/bank.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::bank::FxQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FxRate"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "fx_rates",
          "signature": "async fn fx_rates (& self , tid : TenantId , currency : Option < & str >) -> Result < Vec < FxRate > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "currency",
              "type": {
                "args": [
                  {
                    "args": [
                      {
                        "args": [],
                        "base": "str",
                        "name": "str",
                        "text": "str"
                      }
                    ],
                    "name": "reference",
                    "text": "& str"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < & str >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "FxRate",
                    "name": "FxRate",
                    "text": "FxRate"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < FxRate >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < FxRate > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bank::add_fx_rates",
      "method": "POST",
      "path": "/api/t/{tid}/fx-rates",
      "id": "post_t_tid_fx_rates",
      "source": "crates/kc-api/src/bank.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewFxRates"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FxRate"
          }
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_fx_rates",
          "signature": "async fn add_fx_rates (& self , tid : TenantId , r : & NewFxRates) -> Result < Vec < FxRate > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "r",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewFxRates",
                    "name": "NewFxRates",
                    "text": "NewFxRates"
                  }
                ],
                "name": "reference",
                "text": "& NewFxRates"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "FxRate",
                    "name": "FxRate",
                    "text": "FxRate"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < FxRate >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < FxRate > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "bank::import_nbrm",
      "method": "POST",
      "path": "/api/t/{tid}/fx-rates/nbrm",
      "id": "post_t_tid_fx_rates_nbrm",
      "source": "crates/kc-api/src/bank.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NbrmImport"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/NbrmImported"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "import_nbrm",
          "signature": "async fn import_nbrm (& self , tid : TenantId , from : NaiveDate , to : NaiveDate ,) -> Result < NbrmImported >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "from",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            },
            {
              "pattern": "to",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "NbrmImported",
                "name": "NbrmImported",
                "text": "NbrmImported"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < NbrmImported >"
          }
        }
      ],
      "errors": [
        "bad_period",
        "nbrm_unavailable"
      ]
    },
    {
      "handler": "fx_revaluation::policies",
      "method": "GET",
      "path": "/api/t/{tid}/fx-revaluation-policies",
      "id": "get_t_tid_fx_revaluation_policies",
      "source": "crates/kc-api/src/fx_revaluation.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FxRevaluationPolicy"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "fx_revaluation_policies",
          "signature": "async fn fx_revaluation_policies (& self , tid : TenantId) -> Result < Vec < FxRevaluationPolicy > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "FxRevaluationPolicy",
                    "name": "FxRevaluationPolicy",
                    "text": "FxRevaluationPolicy"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < FxRevaluationPolicy >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < FxRevaluationPolicy > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "fx_revaluation::add_policy",
      "method": "POST",
      "path": "/api/t/{tid}/fx-revaluation-policies",
      "id": "post_t_tid_fx_revaluation_policies",
      "source": "crates/kc-api/src/fx_revaluation.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewFxRevaluationPolicy"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/FxRevaluationPolicy"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_fx_revaluation_policy",
          "signature": "async fn add_fx_revaluation_policy (& self , tid : TenantId , n : & NewFxRevaluationPolicy ,) -> Result < FxRevaluationPolicy >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewFxRevaluationPolicy",
                    "name": "NewFxRevaluationPolicy",
                    "text": "NewFxRevaluationPolicy"
                  }
                ],
                "name": "reference",
                "text": "& NewFxRevaluationPolicy"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "FxRevaluationPolicy",
                "name": "FxRevaluationPolicy",
                "text": "FxRevaluationPolicy"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < FxRevaluationPolicy >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "fx_revaluation::list",
      "method": "GET",
      "path": "/api/t/{tid}/fx-revaluations",
      "id": "get_t_tid_fx_revaluations",
      "source": "crates/kc-api/src/fx_revaluation.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FxRevaluation"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "fx_revaluations",
          "signature": "async fn fx_revaluations (& self , tid : TenantId) -> Result < Vec < FxRevaluation > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "FxRevaluation",
                    "name": "FxRevaluation",
                    "text": "FxRevaluation"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < FxRevaluation >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < FxRevaluation > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "fx_revaluation::create",
      "method": "POST",
      "path": "/api/t/{tid}/fx-revaluations",
      "id": "post_t_tid_fx_revaluations",
      "source": "crates/kc-api/src/fx_revaluation.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewFxRevaluation"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/FxRevaluation"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_fx_revaluation",
          "signature": "async fn create_fx_revaluation (& self , tid : TenantId , n : & NewFxRevaluation ,) -> Result < FxRevaluation >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewFxRevaluation",
                    "name": "NewFxRevaluation",
                    "text": "NewFxRevaluation"
                  }
                ],
                "name": "reference",
                "text": "& NewFxRevaluation"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "FxRevaluation",
                "name": "FxRevaluation",
                "text": "FxRevaluation"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < FxRevaluation >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "fx_revaluation::preview",
      "method": "GET",
      "path": "/api/t/{tid}/fx-revaluations/preview",
      "id": "get_t_tid_fx_revaluations_preview",
      "source": "crates/kc-api/src/fx_revaluation.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::fx_revaluation::PreviewQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/FxRevaluationPreview"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "fx_revaluation_preview",
          "signature": "async fn fx_revaluation_preview (& self , tid : TenantId , date : Option < NaiveDate > ,) -> Result < FxRevaluationPreview >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "date",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "FxRevaluationPreview",
                "name": "FxRevaluationPreview",
                "text": "FxRevaluationPreview"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < FxRevaluationPreview >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "fx_revaluation::get_one",
      "method": "GET",
      "path": "/api/t/{tid}/fx-revaluations/{id}",
      "id": "get_t_tid_fx_revaluations_id",
      "source": "crates/kc-api/src/fx_revaluation.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/FxRevaluation"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "fx_revaluation",
          "signature": "async fn fx_revaluation (& self , tid : TenantId , id : FxRevaluationId ,) -> Result < FxRevaluation >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "FxRevaluationId",
                "name": "FxRevaluationId",
                "text": "FxRevaluationId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "FxRevaluation",
                "name": "FxRevaluation",
                "text": "FxRevaluation"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < FxRevaluation >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "fx_revaluation::cancel",
      "method": "POST",
      "path": "/api/t/{tid}/fx-revaluations/{id}/cancel",
      "id": "post_t_tid_fx_revaluations_id_cancel",
      "source": "crates/kc-api/src/fx_revaluation.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelFxRevaluation"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/FxRevaluation"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cancel_fx_revaluation",
          "signature": "async fn cancel_fx_revaluation (& self , tid : TenantId , id : FxRevaluationId , c : & CancelFxRevaluation ,) -> Result < FxRevaluation >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "FxRevaluationId",
                "name": "FxRevaluationId",
                "text": "FxRevaluationId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "CancelFxRevaluation",
                    "name": "CancelFxRevaluation",
                    "text": "CancelFxRevaluation"
                  }
                ],
                "name": "reference",
                "text": "& CancelFxRevaluation"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "FxRevaluation",
                "name": "FxRevaluation",
                "text": "FxRevaluation"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < FxRevaluation >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "fx_revaluation::statement",
      "method": "GET",
      "path": "/api/t/{tid}/fx-revaluations/{id}/statement",
      "id": "get_t_tid_fx_revaluations_id_statement",
      "source": "crates/kc-api/src/fx_revaluation.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "text/html",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "fx_revaluation_statement",
          "signature": "async fn fx_revaluation_statement (& self , tid : TenantId , id : FxRevaluationId ,) -> Result < String >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "FxRevaluationId",
                "name": "FxRevaluationId",
                "text": "FxRevaluationId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "String",
                "name": "String",
                "text": "String"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < String >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "grid_window::page",
      "method": "POST",
      "path": "/api/t/{tid}/grids/{register}",
      "id": "post_t_tid_grids_register",
      "source": "crates/kc-api/src/grid_window.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "register",
          "schema": {
            "type": "string"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/GridQuery"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/GridPage"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "grid_page",
          "signature": "async fn grid_page (& self , tid : TenantId , register : & str , query : & grid_page :: GridQuery ,) -> Result < grid_page :: GridPage >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "register",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "query",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "GridQuery",
                    "name": "grid_page::GridQuery",
                    "text": "grid_page :: GridQuery"
                  }
                ],
                "name": "reference",
                "text": "& grid_page :: GridQuery"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "GridPage",
                "name": "grid_page::GridPage",
                "text": "grid_page :: GridPage"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < grid_page :: GridPage >"
          }
        }
      ],
      "errors": [
        "unknown_grid"
      ]
    },
    {
      "handler": "interest::list",
      "method": "GET",
      "path": "/api/t/{tid}/interest",
      "id": "get_t_tid_interest",
      "source": "crates/kc-api/src/interest.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InterestCalc"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "interest_calcs",
          "signature": "async fn interest_calcs (& self , tid : TenantId) -> Result < Vec < InterestCalc > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "InterestCalc",
                    "name": "InterestCalc",
                    "text": "InterestCalc"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < InterestCalc >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < InterestCalc > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "interest::create",
      "method": "POST",
      "path": "/api/t/{tid}/interest",
      "id": "post_t_tid_interest",
      "source": "crates/kc-api/src/interest.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewInterestCalc"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/InterestCalc"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_interest_calc",
          "signature": "async fn create_interest_calc (& self , tid : TenantId , n : & NewInterestCalc ,) -> Result < InterestCalc >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewInterestCalc",
                    "name": "NewInterestCalc",
                    "text": "NewInterestCalc"
                  }
                ],
                "name": "reference",
                "text": "& NewInterestCalc"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "InterestCalc",
                "name": "InterestCalc",
                "text": "InterestCalc"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < InterestCalc >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "interest::preview",
      "method": "GET",
      "path": "/api/t/{tid}/interest/preview",
      "id": "get_t_tid_interest_preview",
      "source": "crates/kc-api/src/interest.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::interest::PreviewQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InterestPreview"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "interest_preview",
          "signature": "async fn interest_preview (& self , tid : TenantId , date : Option < NaiveDate > , partner : Option < PartnerId > ,) -> Result < Vec < InterestPreview > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "date",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            },
            {
              "pattern": "partner",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "PartnerId",
                    "name": "PartnerId",
                    "text": "PartnerId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < PartnerId >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "InterestPreview",
                    "name": "InterestPreview",
                    "text": "InterestPreview"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < InterestPreview >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < InterestPreview > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "interest::rates",
      "method": "GET",
      "path": "/api/t/{tid}/interest/rates",
      "id": "get_t_tid_interest_rates",
      "source": "crates/kc-api/src/interest.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InterestRate"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "interest_rates",
          "signature": "async fn interest_rates (& self , tid : TenantId) -> Result < Vec < InterestRate > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "InterestRate",
                    "name": "InterestRate",
                    "text": "InterestRate"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < InterestRate >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < InterestRate > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "interest::add_rate",
      "method": "POST",
      "path": "/api/t/{tid}/interest/rates",
      "id": "post_t_tid_interest_rates",
      "source": "crates/kc-api/src/interest.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewInterestRate"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/InterestRate"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_interest_rate",
          "signature": "async fn add_interest_rate (& self , tid : TenantId , n : & NewInterestRate ,) -> Result < InterestRate >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewInterestRate",
                    "name": "NewInterestRate",
                    "text": "NewInterestRate"
                  }
                ],
                "name": "reference",
                "text": "& NewInterestRate"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "InterestRate",
                "name": "InterestRate",
                "text": "InterestRate"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < InterestRate >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "interest::get_one",
      "method": "GET",
      "path": "/api/t/{tid}/interest/{id}",
      "id": "get_t_tid_interest_id",
      "source": "crates/kc-api/src/interest.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/InterestCalc"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "interest_calc",
          "signature": "async fn interest_calc (& self , tid : TenantId , id : InterestCalcId) -> Result < InterestCalc >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "InterestCalcId",
                "name": "InterestCalcId",
                "text": "InterestCalcId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "InterestCalc",
                "name": "InterestCalc",
                "text": "InterestCalc"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < InterestCalc >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "interest::cancel",
      "method": "POST",
      "path": "/api/t/{tid}/interest/{id}/cancel",
      "id": "post_t_tid_interest_id_cancel",
      "source": "crates/kc-api/src/interest.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelInterest"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/InterestCalc"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cancel_interest_calc",
          "signature": "async fn cancel_interest_calc (& self , tid : TenantId , id : InterestCalcId , c : & CancelInterest ,) -> Result < InterestCalc >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "InterestCalcId",
                "name": "InterestCalcId",
                "text": "InterestCalcId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "CancelInterest",
                    "name": "CancelInterest",
                    "text": "CancelInterest"
                  }
                ],
                "name": "reference",
                "text": "& CancelInterest"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "InterestCalc",
                "name": "InterestCalc",
                "text": "InterestCalc"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < InterestCalc >"
          }
        }
      ],
      "errors": [
        "already_cancelled"
      ]
    },
    {
      "handler": "interest::statement",
      "method": "GET",
      "path": "/api/t/{tid}/interest/{id}/statement",
      "id": "get_t_tid_interest_id_statement",
      "source": "crates/kc-api/src/interest.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "text/html",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "interest_statement",
          "signature": "async fn interest_statement (& self , tid : TenantId , id : InterestCalcId) -> Result < String >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "InterestCalcId",
                "name": "InterestCalcId",
                "text": "InterestCalcId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "String",
                "name": "String",
                "text": "String"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < String >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "invitations",
      "method": "GET",
      "path": "/api/t/{tid}/invitations",
      "id": "get_t_tid_invitations",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Invitation"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "invitations",
          "signature": "async fn invitations (& self , tid : TenantId) -> Result < Vec < Invitation > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "Invitation",
                    "name": "Invitation",
                    "text": "Invitation"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < Invitation >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < Invitation > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "create_invitation",
      "method": "POST",
      "path": "/api/t/{tid}/invitations",
      "id": "post_t_tid_invitations",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewInvitation"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/InvitationCode"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "invite",
          "signature": "async fn invite (& self , tid : TenantId , email : & str , role : Role) -> Result < InvitationCode >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "email",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "role",
              "type": {
                "args": [],
                "base": "Role",
                "name": "Role",
                "text": "Role"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "InvitationCode",
                "name": "InvitationCode",
                "text": "InvitationCode"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < InvitationCode >"
          }
        }
      ],
      "errors": [
        "bad_invitation"
      ]
    },
    {
      "handler": "cancel_invitation",
      "method": "POST",
      "path": "/api/t/{tid}/invitations/{id}/cancel",
      "id": "post_t_tid_invitations_id_cancel",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Invitation"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cancel_invitation",
          "signature": "async fn cancel_invitation (& self , tid : TenantId , id : i64) -> Result < Vec < Invitation > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "Invitation",
                    "name": "Invitation",
                    "text": "Invitation"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < Invitation >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < Invitation > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "vat::invoice_book",
      "method": "GET",
      "path": "/api/t/{tid}/invoice-book",
      "id": "get_t_tid_invoice_book",
      "source": "crates/kc-api/src/vat.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::vat::InvoiceBookQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InvoiceBookRow"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "invoice_book",
          "signature": "async fn invoice_book (& self , tid : TenantId , book : InvoiceBook , from : NaiveDate , to : NaiveDate , status : Option < InvoicePayStatus > ,) -> Result < Vec < InvoiceBookRow > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "book",
              "type": {
                "args": [],
                "base": "InvoiceBook",
                "name": "InvoiceBook",
                "text": "InvoiceBook"
              }
            },
            {
              "pattern": "from",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            },
            {
              "pattern": "to",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            },
            {
              "pattern": "status",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "InvoicePayStatus",
                    "name": "InvoicePayStatus",
                    "text": "InvoicePayStatus"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < InvoicePayStatus >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "InvoiceBookRow",
                    "name": "InvoiceBookRow",
                    "text": "InvoiceBookRow"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < InvoiceBookRow >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < InvoiceBookRow > >"
          }
        }
      ],
      "errors": [
        "bad_book",
        "bad_range",
        "bad_status"
      ]
    },
    {
      "handler": "invoices::list",
      "method": "GET",
      "path": "/api/t/{tid}/invoices",
      "id": "get_t_tid_invoices",
      "source": "crates/kc-api/src/invoices.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::invoices::ListQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Invoice"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "invoices",
          "signature": "async fn invoices (& self , tid : TenantId , direction : Option < InvoiceDirection > ,) -> Result < Vec < Invoice > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "direction",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "InvoiceDirection",
                    "name": "InvoiceDirection",
                    "text": "InvoiceDirection"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < InvoiceDirection >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "Invoice",
                    "name": "Invoice",
                    "text": "Invoice"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < Invoice >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < Invoice > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "invoices::create",
      "method": "POST",
      "path": "/api/t/{tid}/invoices",
      "id": "post_t_tid_invoices",
      "source": "crates/kc-api/src/invoices.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewInvoice"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Invoice"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_invoice",
          "signature": "async fn create_invoice (& self , tid : TenantId , n : & NewInvoice) -> Result < Invoice >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewInvoice",
                    "name": "NewInvoice",
                    "text": "NewInvoice"
                  }
                ],
                "name": "reference",
                "text": "& NewInvoice"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Invoice",
                "name": "Invoice",
                "text": "Invoice"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Invoice >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "invoices::dispatches",
      "method": "GET",
      "path": "/api/t/{tid}/invoices/dispatches/{partner}",
      "id": "get_t_tid_invoices_dispatches_partner",
      "source": "crates/kc-api/src/invoices.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "partner",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StockDoc"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "invoice_dispatches",
          "signature": "async fn invoice_dispatches (& self , tid : TenantId , partner : PartnerId ,) -> Result < Vec < StockDoc > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "partner",
              "type": {
                "args": [],
                "base": "PartnerId",
                "name": "PartnerId",
                "text": "PartnerId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "StockDoc",
                    "name": "StockDoc",
                    "text": "StockDoc"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < StockDoc >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < StockDoc > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "invoices::issue",
      "method": "POST",
      "path": "/api/t/{tid}/invoices/issue",
      "id": "post_t_tid_invoices_issue",
      "source": "crates/kc-api/src/invoices.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/IssueInvoiceRequest"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Invoice"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "issue_invoice",
          "signature": "async fn issue_invoice (& self , tid : TenantId , n : & IssueInvoice) -> Result < Invoice >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "IssueInvoice",
                    "name": "IssueInvoice",
                    "text": "IssueInvoice"
                  }
                ],
                "name": "reference",
                "text": "& IssueInvoice"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Invoice",
                "name": "Invoice",
                "text": "Invoice"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Invoice >"
          }
        },
        {
          "name": "issue_invoice_to_taxpayer",
          "signature": "async fn issue_invoice_to_taxpayer (& self , tid : TenantId , mut issue : IssueInvoice , edb : String ,) -> Result < Invoice >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "mut issue",
              "type": {
                "args": [],
                "base": "IssueInvoice",
                "name": "IssueInvoice",
                "text": "IssueInvoice"
              }
            },
            {
              "pattern": "edb",
              "type": {
                "args": [],
                "base": "String",
                "name": "String",
                "text": "String"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Invoice",
                "name": "Invoice",
                "text": "Invoice"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Invoice >"
          }
        }
      ],
      "errors": [
        "invoice_key_reused"
      ]
    },
    {
      "handler": "invoices::get_one",
      "method": "GET",
      "path": "/api/t/{tid}/invoices/{id}",
      "id": "get_t_tid_invoices_id",
      "source": "crates/kc-api/src/invoices.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Invoice"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "invoice",
          "signature": "async fn invoice (& self , tid : TenantId , id : InvoiceId) -> Result < Invoice >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "InvoiceId",
                "name": "InvoiceId",
                "text": "InvoiceId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Invoice",
                "name": "Invoice",
                "text": "Invoice"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Invoice >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "invoices::cancel",
      "method": "POST",
      "path": "/api/t/{tid}/invoices/{id}/cancel",
      "id": "post_t_tid_invoices_id_cancel",
      "source": "crates/kc-api/src/invoices.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelInvoice"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Invoice"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cancel_invoice",
          "signature": "async fn cancel_invoice (& self , tid : TenantId , id : InvoiceId , c : & CancelInvoice ,) -> Result < Invoice >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "InvoiceId",
                "name": "InvoiceId",
                "text": "InvoiceId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "CancelInvoice",
                    "name": "CancelInvoice",
                    "text": "CancelInvoice"
                  }
                ],
                "name": "reference",
                "text": "& CancelInvoice"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Invoice",
                "name": "Invoice",
                "text": "Invoice"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Invoice >"
          }
        }
      ],
      "errors": [
        "already_cancelled",
        "invoice_state"
      ]
    },
    {
      "handler": "invoices::dossier",
      "method": "GET",
      "path": "/api/t/{tid}/invoices/{id}/dossier",
      "id": "get_t_tid_invoices_id_dossier",
      "source": "crates/kc-api/src/invoices.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/InvoiceDossier"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "invoice_dossier",
          "signature": "async fn invoice_dossier (& self , tid : TenantId , id : InvoiceId) -> Result < InvoiceDossier >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "InvoiceId",
                "name": "InvoiceId",
                "text": "InvoiceId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "InvoiceDossier",
                "name": "InvoiceDossier",
                "text": "InvoiceDossier"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < InvoiceDossier >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::send_invoice",
      "method": "POST",
      "path": "/api/t/{tid}/invoices/{id}/efaktura",
      "id": "post_t_tid_invoices_id_efaktura",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/InvoiceEinvoice"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/EinvoiceDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "send_invoice_einvoice",
          "signature": "async fn send_invoice_einvoice (& self , tid : TenantId , id : InvoiceId , b : & InvoiceEinvoice ,) -> Result < EinvoiceDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "InvoiceId",
                "name": "InvoiceId",
                "text": "InvoiceId"
              }
            },
            {
              "pattern": "b",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "InvoiceEinvoice",
                    "name": "InvoiceEinvoice",
                    "text": "InvoiceEinvoice"
                  }
                ],
                "name": "reference",
                "text": "& InvoiceEinvoice"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "EinvoiceDetail",
                "name": "EinvoiceDetail",
                "text": "EinvoiceDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < EinvoiceDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "invoices::print",
      "method": "GET",
      "path": "/api/t/{tid}/invoices/{id}/print",
      "id": "get_t_tid_invoices_id_print",
      "source": "crates/kc-api/src/invoices.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "text/html",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "invoice_print",
          "signature": "async fn invoice_print (& self , tid : TenantId , id : InvoiceId) -> Result < String >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "InvoiceId",
                "name": "InvoiceId",
                "text": "InvoiceId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "String",
                "name": "String",
                "text": "String"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < String >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "journal",
      "method": "GET",
      "path": "/api/t/{tid}/journal",
      "id": "get_t_tid_journal",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::JournalQ"
      },
      "body": null,
      "auth": "BookDb",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/JournalRow"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "journal",
          "signature": "async fn journal (& self , tid : TenantId , year : Option < i32 > , limit : usize ,) -> Result < Vec < JournalRow > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            },
            {
              "pattern": "limit",
              "type": {
                "args": [],
                "base": "usize",
                "name": "usize",
                "text": "usize"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "JournalRow",
                    "name": "JournalRow",
                    "text": "JournalRow"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < JournalRow >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < JournalRow > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "journal_csv",
      "method": "GET",
      "path": "/api/t/{tid}/journal.csv",
      "id": "get_t_tid_journal_csv",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::JournalQ"
      },
      "body": null,
      "auth": "BookDb",
      "response": {
        "status": 200,
        "contentType": "text/csv",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "journal_csv",
          "signature": "async fn journal_csv (& self , tid : TenantId , year : Option < i32 > , order : & str ,) -> Result < String >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            },
            {
              "pattern": "order",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "String",
                "name": "String",
                "text": "String"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < String >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "leave::overview",
      "method": "GET",
      "path": "/api/t/{tid}/leave",
      "id": "get_t_tid_leave",
      "source": "crates/kc-api/src/leave.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::leave::YearQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LeaveOverviewRow"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "leave_overview",
          "signature": "async fn leave_overview (& self , tid : TenantId , year : Option < i32 > ,) -> Result < Vec < LeaveOverviewRow > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "LeaveOverviewRow",
                    "name": "LeaveOverviewRow",
                    "text": "LeaveOverviewRow"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < LeaveOverviewRow >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < LeaveOverviewRow > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "leave::balance",
      "method": "GET",
      "path": "/api/t/{tid}/leave/balance",
      "id": "get_t_tid_leave_balance",
      "source": "crates/kc-api/src/leave.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::leave::BalanceQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/LeaveBalance"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "leave_balance",
          "signature": "async fn leave_balance (& self , tid : TenantId , employee_id : EmployeeId , year : Option < i32 > , on : Option < NaiveDate > ,) -> Result < LeaveBalance >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "employee_id",
              "type": {
                "args": [],
                "base": "EmployeeId",
                "name": "EmployeeId",
                "text": "EmployeeId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            },
            {
              "pattern": "on",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "LeaveBalance",
                "name": "LeaveBalance",
                "text": "LeaveBalance"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < LeaveBalance >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "leave::decisions",
      "method": "GET",
      "path": "/api/t/{tid}/leave/decisions",
      "id": "get_t_tid_leave_decisions",
      "source": "crates/kc-api/src/leave.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::leave::ListQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LeaveDecision"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "leave_decisions",
          "signature": "async fn leave_decisions (& self , tid : TenantId , year : Option < i32 > , employee_id : Option < EmployeeId > ,) -> Result < Vec < LeaveDecision > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            },
            {
              "pattern": "employee_id",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "EmployeeId",
                    "name": "EmployeeId",
                    "text": "EmployeeId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < EmployeeId >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "LeaveDecision",
                    "name": "LeaveDecision",
                    "text": "LeaveDecision"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < LeaveDecision >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < LeaveDecision > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "leave::decide",
      "method": "POST",
      "path": "/api/t/{tid}/leave/decisions",
      "id": "post_t_tid_leave_decisions",
      "source": "crates/kc-api/src/leave.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewLeaveDecision"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/LeaveDecision"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_leave_decision",
          "signature": "async fn create_leave_decision (& self , tid : TenantId , n : & NewLeaveDecision ,) -> Result < LeaveDecision >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewLeaveDecision",
                    "name": "NewLeaveDecision",
                    "text": "NewLeaveDecision"
                  }
                ],
                "name": "reference",
                "text": "& NewLeaveDecision"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "LeaveDecision",
                "name": "LeaveDecision",
                "text": "LeaveDecision"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < LeaveDecision >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "leave::get_one",
      "method": "GET",
      "path": "/api/t/{tid}/leave/decisions/{id}",
      "id": "get_t_tid_leave_decisions_id",
      "source": "crates/kc-api/src/leave.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/LeaveDecision"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "leave_decision",
          "signature": "async fn leave_decision (& self , tid : TenantId , id : LeaveDecisionId ,) -> Result < LeaveDecision >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "LeaveDecisionId",
                "name": "LeaveDecisionId",
                "text": "LeaveDecisionId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "LeaveDecision",
                "name": "LeaveDecision",
                "text": "LeaveDecision"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < LeaveDecision >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "leave::cancel",
      "method": "POST",
      "path": "/api/t/{tid}/leave/decisions/{id}/cancel",
      "id": "post_t_tid_leave_decisions_id_cancel",
      "source": "crates/kc-api/src/leave.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelLeave"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/LeaveDecision"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cancel_leave_decision",
          "signature": "async fn cancel_leave_decision (& self , tid : TenantId , id : LeaveDecisionId , c : & CancelLeave ,) -> Result < LeaveDecision >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "LeaveDecisionId",
                "name": "LeaveDecisionId",
                "text": "LeaveDecisionId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "CancelLeave",
                    "name": "CancelLeave",
                    "text": "CancelLeave"
                  }
                ],
                "name": "reference",
                "text": "& CancelLeave"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "LeaveDecision",
                "name": "LeaveDecision",
                "text": "LeaveDecision"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < LeaveDecision >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "leave::use_days",
      "method": "POST",
      "path": "/api/t/{tid}/leave/decisions/{id}/usages",
      "id": "post_t_tid_leave_decisions_id_usages",
      "source": "crates/kc-api/src/leave.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewLeaveUsage"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/LeaveDecision"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_leave_usage",
          "signature": "async fn add_leave_usage (& self , tid : TenantId , id : LeaveDecisionId , n : & NewLeaveUsage ,) -> Result < LeaveDecision >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "LeaveDecisionId",
                "name": "LeaveDecisionId",
                "text": "LeaveDecisionId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewLeaveUsage",
                    "name": "NewLeaveUsage",
                    "text": "NewLeaveUsage"
                  }
                ],
                "name": "reference",
                "text": "& NewLeaveUsage"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "LeaveDecision",
                "name": "LeaveDecision",
                "text": "LeaveDecision"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < LeaveDecision >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "leave::entitlements",
      "method": "GET",
      "path": "/api/t/{tid}/leave/entitlements",
      "id": "get_t_tid_leave_entitlements",
      "source": "crates/kc-api/src/leave.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::leave::ListQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LeaveEntitlement"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "leave_entitlements",
          "signature": "async fn leave_entitlements (& self , tid : TenantId , year : Option < i32 > , employee_id : Option < EmployeeId > ,) -> Result < Vec < LeaveEntitlement > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            },
            {
              "pattern": "employee_id",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "EmployeeId",
                    "name": "EmployeeId",
                    "text": "EmployeeId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < EmployeeId >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "LeaveEntitlement",
                    "name": "LeaveEntitlement",
                    "text": "LeaveEntitlement"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < LeaveEntitlement >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < LeaveEntitlement > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "leave::entitle",
      "method": "POST",
      "path": "/api/t/{tid}/leave/entitlements",
      "id": "post_t_tid_leave_entitlements",
      "source": "crates/kc-api/src/leave.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewLeaveEntitlement"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/LeaveEntitlement"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_leave_entitlement",
          "signature": "async fn add_leave_entitlement (& self , tid : TenantId , n : & NewLeaveEntitlement ,) -> Result < LeaveEntitlement >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewLeaveEntitlement",
                    "name": "NewLeaveEntitlement",
                    "text": "NewLeaveEntitlement"
                  }
                ],
                "name": "reference",
                "text": "& NewLeaveEntitlement"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "LeaveEntitlement",
                "name": "LeaveEntitlement",
                "text": "LeaveEntitlement"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < LeaveEntitlement >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "leave::rules",
      "method": "GET",
      "path": "/api/t/{tid}/leave/rules",
      "id": "get_t_tid_leave_rules",
      "source": "crates/kc-api/src/leave.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::leave::YearQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/LeaveRules"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "leave_rules",
          "signature": "async fn leave_rules (& self , tid : TenantId , year : Option < i32 >) -> Result < LeaveRules >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "LeaveRules",
                "name": "LeaveRules",
                "text": "LeaveRules"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < LeaveRules >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "leave::cancel_usage",
      "method": "POST",
      "path": "/api/t/{tid}/leave/usages/{id}/cancel",
      "id": "post_t_tid_leave_usages_id_cancel",
      "source": "crates/kc-api/src/leave.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelLeave"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/LeaveDecision"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cancel_leave_usage",
          "signature": "async fn cancel_leave_usage (& self , tid : TenantId , id : LeaveUsageId , c : & CancelLeave ,) -> Result < LeaveDecision >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "LeaveUsageId",
                "name": "LeaveUsageId",
                "text": "LeaveUsageId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "CancelLeave",
                    "name": "CancelLeave",
                    "text": "CancelLeave"
                  }
                ],
                "name": "reference",
                "text": "& CancelLeave"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "LeaveDecision",
                "name": "LeaveDecision",
                "text": "LeaveDecision"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < LeaveDecision >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "leave::working_days",
      "method": "GET",
      "path": "/api/t/{tid}/leave/working-days",
      "id": "get_t_tid_leave_working_days",
      "source": "crates/kc-api/src/leave.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::leave::DaysQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/LeaveWorkingDays"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "leave_working_days",
          "signature": "async fn leave_working_days (& self , tid : TenantId , from : NaiveDate , to : NaiveDate ,) -> Result < LeaveWorkingDays >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "from",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            },
            {
              "pattern": "to",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "LeaveWorkingDays",
                "name": "LeaveWorkingDays",
                "text": "LeaveWorkingDays"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < LeaveWorkingDays >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "manage_tenant",
      "method": "POST",
      "path": "/api/t/{tid}/lifecycle",
      "id": "post_t_tid_lifecycle",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/ManageTenant"
      },
      "auth": "Db",
      "response": {
        "status": 204,
        "contentType": null,
        "schema": null,
        "statuses": [
          204
        ]
      },
      "rust": [
        {
          "name": "manage_tenant",
          "signature": "async fn manage_tenant (& self , id : TenantId , change : & ManageTenant) -> Result < () >",
          "params": [
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "change",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "ManageTenant",
                    "name": "ManageTenant",
                    "text": "ManageTenant"
                  }
                ],
                "name": "reference",
                "text": "& ManageTenant"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "name": "tuple",
                "text": "()"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < () >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "logo::show",
      "method": "GET",
      "path": "/api/t/{tid}/logo",
      "id": "get_t_tid_logo",
      "source": "crates/kc-api/src/logo.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TenantLogo"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "tenant_logo",
          "signature": "async fn tenant_logo (& self , tid : TenantId) -> Result < TenantLogo >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TenantLogo",
                "name": "TenantLogo",
                "text": "TenantLogo"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TenantLogo >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "logo::upload",
      "method": "POST",
      "path": "/api/t/{tid}/logo",
      "id": "post_t_tid_logo",
      "source": "crates/kc-api/src/logo.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "type": "string",
        "format": "binary"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TenantLogo"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "set_tenant_logo",
          "signature": "async fn set_tenant_logo (& self , tid : TenantId , png : Vec < u8 >) -> Result < TenantLogo >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "png",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TenantLogo",
                "name": "TenantLogo",
                "text": "TenantLogo"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TenantLogo >"
          }
        }
      ],
      "errors": [
        "forbidden",
        "internal",
        "logo_invalid",
        "public_bucket_failed"
      ]
    },
    {
      "handler": "logo::download",
      "method": "GET",
      "path": "/api/t/{tid}/logo.png",
      "id": "get_t_tid_logo_png",
      "source": "crates/kc-api/src/logo.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "image/png",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "tenant_logo_png",
          "signature": "async fn tenant_logo_png (& self , tid : TenantId) -> Result < Vec < u8 > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < u8 > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "logo::remove",
      "method": "POST",
      "path": "/api/t/{tid}/logo/remove",
      "id": "post_t_tid_logo_remove",
      "source": "crates/kc-api/src/logo.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TenantLogo"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "remove_tenant_logo",
          "signature": "async fn remove_tenant_logo (& self , tid : TenantId) -> Result < TenantLogo >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TenantLogo",
                "name": "TenantLogo",
                "text": "TenantLogo"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TenantLogo >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "partners::matches",
      "method": "GET",
      "path": "/api/t/{tid}/matches",
      "id": "get_t_tid_matches",
      "source": "crates/kc-api/src/partners.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::partners::MatchesQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OpenItemMatch"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "matches",
          "signature": "async fn matches (& self , tid : TenantId , partner : Option < PartnerId > ,) -> Result < Vec < OpenItemMatch > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "partner",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "PartnerId",
                    "name": "PartnerId",
                    "text": "PartnerId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < PartnerId >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "OpenItemMatch",
                    "name": "OpenItemMatch",
                    "text": "OpenItemMatch"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < OpenItemMatch >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < OpenItemMatch > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "partners::create_match",
      "method": "POST",
      "path": "/api/t/{tid}/matches",
      "id": "post_t_tid_matches",
      "source": "crates/kc-api/src/partners.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewMatch"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/OpenItemMatch"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_match",
          "signature": "async fn create_match (& self , tid : TenantId , m : & NewMatch) -> Result < OpenItemMatch >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "m",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewMatch",
                    "name": "NewMatch",
                    "text": "NewMatch"
                  }
                ],
                "name": "reference",
                "text": "& NewMatch"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "OpenItemMatch",
                "name": "OpenItemMatch",
                "text": "OpenItemMatch"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < OpenItemMatch >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "partners::create_fx_match",
      "method": "POST",
      "path": "/api/t/{tid}/matches/fx",
      "id": "post_t_tid_matches_fx",
      "source": "crates/kc-api/src/partners.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewFxMatch"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/OpenItemMatch"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_fx_match",
          "signature": "async fn create_fx_match (& self , tid : TenantId , m : & NewFxMatch) -> Result < OpenItemMatch >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "m",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewFxMatch",
                    "name": "NewFxMatch",
                    "text": "NewFxMatch"
                  }
                ],
                "name": "reference",
                "text": "& NewFxMatch"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "OpenItemMatch",
                "name": "OpenItemMatch",
                "text": "OpenItemMatch"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < OpenItemMatch >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "partners::cancel_match",
      "method": "POST",
      "path": "/api/t/{tid}/matches/{id}/cancel",
      "id": "post_t_tid_matches_id_cancel",
      "source": "crates/kc-api/src/partners.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelMatch"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/OpenItemMatch"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "cancel_match",
          "signature": "async fn cancel_match (& self , tid : TenantId , id : i64 , reason : & str ,) -> Result < OpenItemMatch >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            },
            {
              "pattern": "reason",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "OpenItemMatch",
                "name": "OpenItemMatch",
                "text": "OpenItemMatch"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < OpenItemMatch >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "members",
      "method": "GET",
      "path": "/api/t/{tid}/members",
      "id": "get_t_tid_members",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Member"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "members",
          "signature": "async fn members (& self , tid : TenantId) -> Result < Vec < Member > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "Member",
                    "name": "Member",
                    "text": "Member"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < Member >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < Member > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "set_member",
      "method": "POST",
      "path": "/api/t/{tid}/members",
      "id": "post_t_tid_members",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SetMember"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Member"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "set_member",
          "signature": "async fn set_member (& self , tid : TenantId , email : & str , role : Option < Role > ,) -> Result < Vec < Member > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "email",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "role",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "Role",
                    "name": "Role",
                    "text": "Role"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < Role >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "Member",
                    "name": "Member",
                    "text": "Member"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < Member >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < Member > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "messages::list",
      "method": "GET",
      "path": "/api/t/{tid}/messages",
      "id": "get_t_tid_messages",
      "source": "crates/kc-api/src/messages.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::messages::ListQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InternalMessage"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "messages",
          "signature": "async fn messages (& self , tid : TenantId , mailbox : MessageBox ,) -> Result < Vec < InternalMessage > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "mailbox",
              "type": {
                "args": [],
                "base": "MessageBox",
                "name": "MessageBox",
                "text": "MessageBox"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "InternalMessage",
                    "name": "InternalMessage",
                    "text": "InternalMessage"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < InternalMessage >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < InternalMessage > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "messages::send",
      "method": "POST",
      "path": "/api/t/{tid}/messages",
      "id": "post_t_tid_messages",
      "source": "crates/kc-api/src/messages.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewInternalMessage"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/InternalMessage"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "send_message",
          "signature": "async fn send_message (& self , tid : TenantId , m : & NewInternalMessage ,) -> Result < InternalMessage >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "m",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewInternalMessage",
                    "name": "NewInternalMessage",
                    "text": "NewInternalMessage"
                  }
                ],
                "name": "reference",
                "text": "& NewInternalMessage"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "InternalMessage",
                "name": "InternalMessage",
                "text": "InternalMessage"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < InternalMessage >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "messages::unread",
      "method": "GET",
      "path": "/api/t/{tid}/messages/unread",
      "id": "get_t_tid_messages_unread",
      "source": "crates/kc-api/src/messages.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/UnreadMessages"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "unread_messages",
          "signature": "async fn unread_messages (& self , tid : TenantId) -> Result < UnreadMessages >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "UnreadMessages",
                "name": "UnreadMessages",
                "text": "UnreadMessages"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < UnreadMessages >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "messages::thread",
      "method": "GET",
      "path": "/api/t/{tid}/messages/{id}",
      "id": "get_t_tid_messages_id",
      "source": "crates/kc-api/src/messages.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InternalMessage"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "message_thread",
          "signature": "async fn message_thread (& self , tid : TenantId , id : InternalMessageId ,) -> Result < Vec < InternalMessage > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "InternalMessageId",
                "name": "InternalMessageId",
                "text": "InternalMessageId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "InternalMessage",
                    "name": "InternalMessage",
                    "text": "InternalMessage"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < InternalMessage >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < InternalMessage > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "messages::mark",
      "method": "POST",
      "path": "/api/t/{tid}/messages/{id}/read",
      "id": "post_t_tid_messages_id_read",
      "source": "crates/kc-api/src/messages.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/MarkMessageRead"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/InternalMessage"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "mark_message",
          "signature": "async fn mark_message (& self , tid : TenantId , id : InternalMessageId , read : bool ,) -> Result < InternalMessage >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "InternalMessageId",
                "name": "InternalMessageId",
                "text": "InternalMessageId"
              }
            },
            {
              "pattern": "read",
              "type": {
                "args": [],
                "base": "bool",
                "name": "bool",
                "text": "bool"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "InternalMessage",
                "name": "InternalMessage",
                "text": "InternalMessage"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < InternalMessage >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "control::mfa_policy",
      "method": "GET",
      "path": "/api/t/{tid}/mfa-policy",
      "id": "get_t_tid_mfa_policy",
      "source": "crates/kc-api/src/control.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TenantMfaPolicy"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "tenant_mfa_policy",
          "signature": "async fn tenant_mfa_policy (& self , tid : TenantId) -> Result < TenantMfaPolicy >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TenantMfaPolicy",
                "name": "TenantMfaPolicy",
                "text": "TenantMfaPolicy"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TenantMfaPolicy >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "control::set_mfa_policy",
      "method": "POST",
      "path": "/api/t/{tid}/mfa-policy",
      "id": "post_t_tid_mfa_policy",
      "source": "crates/kc-api/src/control.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SetTenantMfaPolicy"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TenantMfaPolicy"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "set_tenant_mfa_policy",
          "signature": "async fn set_tenant_mfa_policy (& self , tid : TenantId , required : bool , reason : & str ,) -> Result < TenantMfaPolicy >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "required",
              "type": {
                "args": [],
                "base": "bool",
                "name": "bool",
                "text": "bool"
              }
            },
            {
              "pattern": "reason",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TenantMfaPolicy",
                "name": "TenantMfaPolicy",
                "text": "TenantMfaPolicy"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TenantMfaPolicy >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "series::list",
      "method": "GET",
      "path": "/api/t/{tid}/number-series",
      "id": "get_t_tid_number_series",
      "source": "crates/kc-api/src/series.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Series"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "number_series",
          "signature": "async fn number_series (& self , tid : TenantId) -> Result < Vec < Series > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "Series",
                    "name": "Series",
                    "text": "Series"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < Series >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < Series > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "series::create",
      "method": "POST",
      "path": "/api/t/{tid}/number-series",
      "id": "post_t_tid_number_series",
      "source": "crates/kc-api/src/series.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewSeries"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Series"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_number_series",
          "signature": "async fn create_number_series (& self , tid : TenantId , n : & NewSeries) -> Result < Series >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewSeries",
                    "name": "NewSeries",
                    "text": "NewSeries"
                  }
                ],
                "name": "reference",
                "text": "& NewSeries"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Series",
                "name": "Series",
                "text": "Series"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Series >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "series::preview",
      "method": "GET",
      "path": "/api/t/{tid}/number-series/preview",
      "id": "get_t_tid_number_series_preview",
      "source": "crates/kc-api/src/series.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::series::PreviewQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SeriesPreview"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "number_series_preview",
          "signature": "async fn number_series_preview (& self , tid : TenantId , doc_type : SeriesDocType , date : NaiveDate , warehouse : Option < WarehouseId > , series : Option < SeriesId > ,) -> Result < SeriesPreview >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "doc_type",
              "type": {
                "args": [],
                "base": "SeriesDocType",
                "name": "SeriesDocType",
                "text": "SeriesDocType"
              }
            },
            {
              "pattern": "date",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            },
            {
              "pattern": "warehouse",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "WarehouseId",
                    "name": "WarehouseId",
                    "text": "WarehouseId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < WarehouseId >"
              }
            },
            {
              "pattern": "series",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "SeriesId",
                    "name": "SeriesId",
                    "text": "SeriesId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < SeriesId >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SeriesPreview",
                "name": "SeriesPreview",
                "text": "SeriesPreview"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SeriesPreview >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "series::change",
      "method": "POST",
      "path": "/api/t/{tid}/number-series/{id}/versions",
      "id": "post_t_tid_number_series_id_versions",
      "source": "crates/kc-api/src/series.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/SeriesId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SeriesChange"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Series"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "change_number_series",
          "signature": "async fn change_number_series (& self , tid : TenantId , id : SeriesId , c : & SeriesChange ,) -> Result < Series >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "SeriesId",
                "name": "SeriesId",
                "text": "SeriesId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "SeriesChange",
                    "name": "SeriesChange",
                    "text": "SeriesChange"
                  }
                ],
                "name": "reference",
                "text": "& SeriesChange"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Series",
                "name": "Series",
                "text": "Series"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Series >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "numbering",
      "method": "GET",
      "path": "/api/t/{tid}/numbering",
      "id": "get_t_tid_numbering",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NumberingYear"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "numbering",
          "signature": "async fn numbering (& self , tid : TenantId) -> Result < Vec < NumberingYear > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "NumberingYear",
                    "name": "NumberingYear",
                    "text": "NumberingYear"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < NumberingYear >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < NumberingYear > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "partners::open_items",
      "method": "GET",
      "path": "/api/t/{tid}/open-items",
      "id": "get_t_tid_open_items",
      "source": "crates/kc-api/src/partners.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::partners::OpenItemsQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OpenItem"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "open_items",
          "signature": "async fn open_items (& self , tid : TenantId , date : Option < NaiveDate > , partner : Option < PartnerId > , all : bool ,) -> Result < Vec < OpenItem > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "date",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            },
            {
              "pattern": "partner",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "PartnerId",
                    "name": "PartnerId",
                    "text": "PartnerId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < PartnerId >"
              }
            },
            {
              "pattern": "all",
              "type": {
                "args": [],
                "base": "bool",
                "name": "bool",
                "text": "bool"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "OpenItem",
                    "name": "OpenItem",
                    "text": "OpenItem"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < OpenItem >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < OpenItem > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "opening::list",
      "method": "GET",
      "path": "/api/t/{tid}/opening-balances",
      "id": "get_t_tid_opening_balances",
      "source": "crates/kc-api/src/opening.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OpeningBalanceImport"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "opening_balance_imports",
          "signature": "async fn opening_balance_imports (& self , tid : TenantId ,) -> Result < Vec < OpeningBalanceImport > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "OpeningBalanceImport",
                    "name": "OpeningBalanceImport",
                    "text": "OpeningBalanceImport"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < OpeningBalanceImport >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < OpeningBalanceImport > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "opening::import",
      "method": "POST",
      "path": "/api/t/{tid}/opening-balances",
      "id": "post_t_tid_opening_balances",
      "source": "crates/kc-api/src/opening.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/OpeningBalanceRequest"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/OpeningBalanceResult"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "opening_balances",
          "signature": "async fn opening_balances (& self , tid : TenantId , req : & OpeningBalanceRequest ,) -> Result < OpeningBalanceResult >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "req",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "OpeningBalanceRequest",
                    "name": "OpeningBalanceRequest",
                    "text": "OpeningBalanceRequest"
                  }
                ],
                "name": "reference",
                "text": "& OpeningBalanceRequest"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "OpeningBalanceResult",
                "name": "OpeningBalanceResult",
                "text": "OpeningBalanceResult"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < OpeningBalanceResult >"
          }
        }
      ],
      "errors": [
        "forbidden",
        "missing_source",
        "opening_balance_exists",
        "opening_balance_invalid"
      ]
    },
    {
      "handler": "other_income::list",
      "method": "GET",
      "path": "/api/t/{tid}/other-income",
      "id": "get_t_tid_other_income",
      "source": "crates/kc-api/src/other_income.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::other_income::ListQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OtherIncome"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "other_incomes",
          "signature": "async fn other_incomes (& self , tid : TenantId , year : Option < i32 > ,) -> Result < Vec < OtherIncome > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "OtherIncome",
                    "name": "OtherIncome",
                    "text": "OtherIncome"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < OtherIncome >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < OtherIncome > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "other_income::create",
      "method": "POST",
      "path": "/api/t/{tid}/other-income",
      "id": "post_t_tid_other_income",
      "source": "crates/kc-api/src/other_income.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::other_income::CreateQ"
      },
      "body": {
        "$ref": "#/$defs/NewOtherIncome"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/OtherIncome"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_other_income",
          "signature": "async fn create_other_income (& self , tid : TenantId , n : & NewOtherIncome ,) -> Result < OtherIncome >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewOtherIncome",
                    "name": "NewOtherIncome",
                    "text": "NewOtherIncome"
                  }
                ],
                "name": "reference",
                "text": "& NewOtherIncome"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "OtherIncome",
                "name": "OtherIncome",
                "text": "OtherIncome"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < OtherIncome >"
          }
        },
        {
          "name": "create_other_income_agreed_net",
          "signature": "async fn create_other_income_agreed_net (& self , tid : TenantId , n : & NewOtherIncome , agreed_net : Money ,) -> Result < OtherIncome >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewOtherIncome",
                    "name": "NewOtherIncome",
                    "text": "NewOtherIncome"
                  }
                ],
                "name": "reference",
                "text": "& NewOtherIncome"
              }
            },
            {
              "pattern": "agreed_net",
              "type": {
                "args": [],
                "base": "Money",
                "name": "Money",
                "text": "Money"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "OtherIncome",
                "name": "OtherIncome",
                "text": "OtherIncome"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < OtherIncome >"
          }
        }
      ],
      "errors": [
        "bad_other_income",
        "net_changed"
      ]
    },
    {
      "handler": "other_income::agricultural_totals",
      "method": "GET",
      "path": "/api/t/{tid}/other-income/agricultural",
      "id": "get_t_tid_other_income_agricultural",
      "source": "crates/kc-api/src/other_income.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::other_income::AgriculturalQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AgriculturalBuyoutTotal"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "agricultural_buyout_totals",
          "signature": "async fn agricultural_buyout_totals (& self , tid : TenantId , year : Option < i32 > ,) -> Result < Vec < AgriculturalBuyoutTotal > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "AgriculturalBuyoutTotal",
                    "name": "AgriculturalBuyoutTotal",
                    "text": "AgriculturalBuyoutTotal"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < AgriculturalBuyoutTotal >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < AgriculturalBuyoutTotal > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "other_income::preview",
      "method": "GET",
      "path": "/api/t/{tid}/other-income/preview",
      "id": "get_t_tid_other_income_preview",
      "source": "crates/kc-api/src/other_income.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::other_income::PreviewQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/OtherIncomePreview"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "other_income_amount_preview",
          "signature": "async fn other_income_amount_preview (& self , tid : TenantId , kind : IncomeKind , amount : (IncomeBasis , Money) , date : NaiveDate , subtype : Option < IncomeSubtype > , paid_cost : Option < Money > ,) -> Result < OtherIncomePreview >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "kind",
              "type": {
                "args": [],
                "base": "IncomeKind",
                "name": "IncomeKind",
                "text": "IncomeKind"
              }
            },
            {
              "pattern": "amount",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "IncomeBasis",
                    "name": "IncomeBasis",
                    "text": "IncomeBasis"
                  },
                  {
                    "args": [],
                    "base": "Money",
                    "name": "Money",
                    "text": "Money"
                  }
                ],
                "name": "tuple",
                "text": "(IncomeBasis , Money)"
              }
            },
            {
              "pattern": "date",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            },
            {
              "pattern": "subtype",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "IncomeSubtype",
                    "name": "IncomeSubtype",
                    "text": "IncomeSubtype"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < IncomeSubtype >"
              }
            },
            {
              "pattern": "paid_cost",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "Money",
                    "name": "Money",
                    "text": "Money"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < Money >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "OtherIncomePreview",
                "name": "OtherIncomePreview",
                "text": "OtherIncomePreview"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < OtherIncomePreview >"
          }
        },
        {
          "name": "agricultural_buyout_preview",
          "signature": "async fn agricultural_buyout_preview (& self , tid : TenantId , employee_id : EmployeeId , gross : Money , date : NaiveDate ,) -> Result < OtherIncomePreview >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "employee_id",
              "type": {
                "args": [],
                "base": "EmployeeId",
                "name": "EmployeeId",
                "text": "EmployeeId"
              }
            },
            {
              "pattern": "gross",
              "type": {
                "args": [],
                "base": "Money",
                "name": "Money",
                "text": "Money"
              }
            },
            {
              "pattern": "date",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "OtherIncomePreview",
                "name": "OtherIncomePreview",
                "text": "OtherIncomePreview"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < OtherIncomePreview >"
          }
        }
      ],
      "errors": [
        "bad_amount"
      ]
    },
    {
      "handler": "other_income::get_one",
      "method": "GET",
      "path": "/api/t/{tid}/other-income/{id}",
      "id": "get_t_tid_other_income_id",
      "source": "crates/kc-api/src/other_income.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/OtherIncome"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "other_income",
          "signature": "async fn other_income (& self , tid : TenantId , id : OtherIncomeId) -> Result < OtherIncome >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "OtherIncomeId",
                "name": "OtherIncomeId",
                "text": "OtherIncomeId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "OtherIncome",
                "name": "OtherIncome",
                "text": "OtherIncome"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < OtherIncome >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "other_income::cancel",
      "method": "POST",
      "path": "/api/t/{tid}/other-income/{id}/cancel",
      "id": "post_t_tid_other_income_id_cancel",
      "source": "crates/kc-api/src/other_income.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelOtherIncome"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/OtherIncome"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cancel_other_income",
          "signature": "async fn cancel_other_income (& self , tid : TenantId , id : OtherIncomeId , c : & CancelOtherIncome ,) -> Result < OtherIncome >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "OtherIncomeId",
                "name": "OtherIncomeId",
                "text": "OtherIncomeId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "CancelOtherIncome",
                    "name": "CancelOtherIncome",
                    "text": "CancelOtherIncome"
                  }
                ],
                "name": "reference",
                "text": "& CancelOtherIncome"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "OtherIncome",
                "name": "OtherIncome",
                "text": "OtherIncome"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < OtherIncome >"
          }
        }
      ],
      "errors": [
        "already_cancelled"
      ]
    },
    {
      "handler": "other_income::person_sheet",
      "method": "GET",
      "path": "/api/t/{tid}/other-income/{id}/epdd",
      "id": "get_t_tid_other_income_id_epdd",
      "source": "crates/kc-api/src/other_income.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "text/html",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "other_income_epdd_sheet",
          "signature": "async fn other_income_epdd_sheet (& self , tid : TenantId , id : OtherIncomeId ,) -> Result < Vec < u8 > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "OtherIncomeId",
                "name": "OtherIncomeId",
                "text": "OtherIncomeId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < u8 > >"
          }
        }
      ],
      "errors": [
        "already_cancelled"
      ]
    },
    {
      "handler": "other_income::pp53",
      "method": "GET",
      "path": "/api/t/{tid}/other-income/{id}/epdd/pp53",
      "id": "get_t_tid_other_income_id_epdd_pp53",
      "source": "crates/kc-api/src/other_income.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/pdf",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "other_income_pp53",
          "signature": "async fn other_income_pp53 (& self , tid : TenantId , id : OtherIncomeId) -> Result < Vec < u8 > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "OtherIncomeId",
                "name": "OtherIncomeId",
                "text": "OtherIncomeId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < u8 > >"
          }
        }
      ],
      "errors": [
        "epdd_not_payable"
      ]
    },
    {
      "handler": "other_income::status",
      "method": "GET",
      "path": "/api/t/{tid}/other-income/{id}/epdd/response",
      "id": "get_t_tid_other_income_id_epdd_response",
      "source": "crates/kc-api/src/other_income.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "anyOf": [
            {
              "$ref": "#/$defs/OtherIncomeEpddStatus"
            },
            {
              "type": "null"
            }
          ]
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "other_income_epdd_status",
          "signature": "async fn other_income_epdd_status (& self , tid : TenantId , id : OtherIncomeId ,) -> Result < Option < OtherIncomeEpddStatus > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "OtherIncomeId",
                "name": "OtherIncomeId",
                "text": "OtherIncomeId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "OtherIncomeEpddStatus",
                    "name": "OtherIncomeEpddStatus",
                    "text": "OtherIncomeEpddStatus"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < OtherIncomeEpddStatus >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Option < OtherIncomeEpddStatus > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "other_income::response",
      "method": "POST",
      "path": "/api/t/{tid}/other-income/{id}/epdd/response",
      "id": "post_t_tid_other_income_id_epdd_response",
      "source": "crates/kc-api/src/other_income.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/RecordEpddResponse"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "anyOf": [
            {
              "$ref": "#/$defs/OtherIncomeEpddStatus"
            },
            {
              "type": "null"
            }
          ]
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "record_other_income_epdd_response",
          "signature": "async fn record_other_income_epdd_response (& self , tid : TenantId , id : OtherIncomeId , req : & RecordEpddResponse ,) -> Result < Option < OtherIncomeEpddStatus > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "OtherIncomeId",
                "name": "OtherIncomeId",
                "text": "OtherIncomeId"
              }
            },
            {
              "pattern": "req",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "RecordEpddResponse",
                    "name": "RecordEpddResponse",
                    "text": "RecordEpddResponse"
                  }
                ],
                "name": "reference",
                "text": "& RecordEpddResponse"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "OtherIncomeEpddStatus",
                    "name": "OtherIncomeEpddStatus",
                    "text": "OtherIncomeEpddStatus"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < OtherIncomeEpddStatus >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Option < OtherIncomeEpddStatus > >"
          }
        }
      ],
      "errors": [
        "epdd_pdf"
      ]
    },
    {
      "handler": "other_income::filed",
      "method": "POST",
      "path": "/api/t/{tid}/other-income/{id}/filed",
      "id": "post_t_tid_other_income_id_filed",
      "source": "crates/kc-api/src/other_income.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/OtherIncomeFiled"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/OtherIncome"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "other_income_filed",
          "signature": "async fn other_income_filed (& self , tid : TenantId , id : OtherIncomeId , f : & OtherIncomeFiled ,) -> Result < OtherIncome >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "OtherIncomeId",
                "name": "OtherIncomeId",
                "text": "OtherIncomeId"
              }
            },
            {
              "pattern": "f",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "OtherIncomeFiled",
                    "name": "OtherIncomeFiled",
                    "text": "OtherIncomeFiled"
                  }
                ],
                "name": "reference",
                "text": "& OtherIncomeFiled"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "OtherIncome",
                "name": "OtherIncome",
                "text": "OtherIncome"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < OtherIncome >"
          }
        }
      ],
      "errors": [
        "missing_reference"
      ]
    },
    {
      "handler": "partner_merges::list",
      "method": "GET",
      "path": "/api/t/{tid}/partner-merges",
      "id": "get_t_tid_partner_merges",
      "source": "crates/kc-api/src/partner_merges.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PartnerMerge"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "partner_merges",
          "signature": "async fn partner_merges (& self , tid : TenantId) -> Result < Vec < PartnerMerge > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "PartnerMerge",
                    "name": "PartnerMerge",
                    "text": "PartnerMerge"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < PartnerMerge >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < PartnerMerge > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "partners::list",
      "method": "GET",
      "path": "/api/t/{tid}/partners",
      "id": "get_t_tid_partners",
      "source": "crates/kc-api/src/partners.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Partner"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "partners",
          "signature": "async fn partners (& self , tid : TenantId) -> Result < Vec < Partner > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "Partner",
                    "name": "Partner",
                    "text": "Partner"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < Partner >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < Partner > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "partners::create",
      "method": "POST",
      "path": "/api/t/{tid}/partners",
      "id": "post_t_tid_partners",
      "source": "crates/kc-api/src/partners.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/PartnerData"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Partner"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_partner",
          "signature": "async fn create_partner (& self , tid : TenantId , p : & PartnerData) -> Result < Partner >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "p",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "PartnerData",
                    "name": "PartnerData",
                    "text": "PartnerData"
                  }
                ],
                "name": "reference",
                "text": "& PartnerData"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Partner",
                "name": "Partner",
                "text": "Partner"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Partner >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "partners::get",
      "method": "GET",
      "path": "/api/t/{tid}/partners/{id}",
      "id": "get_t_tid_partners_id",
      "source": "crates/kc-api/src/partners.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/PartnerId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Partner"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "partner",
          "signature": "async fn partner (& self , tid : TenantId , id : PartnerId) -> Result < Partner >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PartnerId",
                "name": "PartnerId",
                "text": "PartnerId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Partner",
                "name": "Partner",
                "text": "Partner"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Partner >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "partners::new_version",
      "method": "POST",
      "path": "/api/t/{tid}/partners/{id}",
      "id": "post_t_tid_partners_id",
      "source": "crates/kc-api/src/partners.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/PartnerId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewPartnerVersion"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Partner"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "update_partner",
          "signature": "async fn update_partner (& self , tid : TenantId , id : PartnerId , v : & NewPartnerVersion ,) -> Result < Partner >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PartnerId",
                "name": "PartnerId",
                "text": "PartnerId"
              }
            },
            {
              "pattern": "v",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewPartnerVersion",
                    "name": "NewPartnerVersion",
                    "text": "NewPartnerVersion"
                  }
                ],
                "name": "reference",
                "text": "& NewPartnerVersion"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Partner",
                "name": "Partner",
                "text": "Partner"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Partner >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "partners::card",
      "method": "GET",
      "path": "/api/t/{tid}/partners/{id}/card",
      "id": "get_t_tid_partners_id_card",
      "source": "crates/kc-api/src/partners.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/PartnerId"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::RangeQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PartnerCard"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "partner_card",
          "signature": "async fn partner_card (& self , tid : TenantId , id : PartnerId , from : Option < NaiveDate > , to : Option < NaiveDate > ,) -> Result < PartnerCard >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PartnerId",
                "name": "PartnerId",
                "text": "PartnerId"
              }
            },
            {
              "pattern": "from",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            },
            {
              "pattern": "to",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PartnerCard",
                "name": "PartnerCard",
                "text": "PartnerCard"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PartnerCard >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "partners::ios",
      "method": "GET",
      "path": "/api/t/{tid}/partners/{id}/ios",
      "id": "get_t_tid_partners_id_ios",
      "source": "crates/kc-api/src/partners.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/PartnerId"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::partners::DateQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Ios"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "ios",
          "signature": "async fn ios (& self , tid : TenantId , id : PartnerId , date : Option < NaiveDate >) -> Result < Ios >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PartnerId",
                "name": "PartnerId",
                "text": "PartnerId"
              }
            },
            {
              "pattern": "date",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Ios",
                "name": "Ios",
                "text": "Ios"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Ios >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "partner_merges::merge",
      "method": "POST",
      "path": "/api/t/{tid}/partners/{id}/merge",
      "id": "post_t_tid_partners_id_merge",
      "source": "crates/kc-api/src/partner_merges.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/PartnerId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewPartnerMerge"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PartnerMerge"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "merge_partner",
          "signature": "async fn merge_partner (& self , tid : TenantId , id : PartnerId , m : & NewPartnerMerge ,) -> Result < PartnerMerge >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PartnerId",
                "name": "PartnerId",
                "text": "PartnerId"
              }
            },
            {
              "pattern": "m",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewPartnerMerge",
                    "name": "NewPartnerMerge",
                    "text": "NewPartnerMerge"
                  }
                ],
                "name": "reference",
                "text": "& NewPartnerMerge"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PartnerMerge",
                "name": "PartnerMerge",
                "text": "PartnerMerge"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PartnerMerge >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "partners::versions",
      "method": "GET",
      "path": "/api/t/{tid}/partners/{id}/versions",
      "id": "get_t_tid_partners_id_versions",
      "source": "crates/kc-api/src/partners.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/PartnerId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PartnerVersion"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "partner_versions",
          "signature": "async fn partner_versions (& self , tid : TenantId , id : PartnerId ,) -> Result < Vec < PartnerVersion > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PartnerId",
                "name": "PartnerId",
                "text": "PartnerId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "PartnerVersion",
                    "name": "PartnerVersion",
                    "text": "PartnerVersion"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < PartnerVersion >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < PartnerVersion > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payments::list",
      "method": "GET",
      "path": "/api/t/{tid}/payments",
      "id": "get_t_tid_payments",
      "source": "crates/kc-api/src/payments.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::payments::ListQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PaymentOrder"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "payment_orders",
          "signature": "async fn payment_orders (& self , tid : TenantId , status : Option < PaymentStatus > ,) -> Result < Vec < PaymentOrder > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "status",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "PaymentStatus",
                    "name": "PaymentStatus",
                    "text": "PaymentStatus"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < PaymentStatus >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "PaymentOrder",
                    "name": "PaymentOrder",
                    "text": "PaymentOrder"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < PaymentOrder >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < PaymentOrder > >"
          }
        }
      ],
      "errors": [
        "bad_payment_status"
      ]
    },
    {
      "handler": "payments::create",
      "method": "POST",
      "path": "/api/t/{tid}/payments",
      "id": "post_t_tid_payments",
      "source": "crates/kc-api/src/payments.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewPaymentOrder"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PaymentOrder"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "create_payment_order",
          "signature": "async fn create_payment_order (& self , tid : TenantId , n : & NewPaymentOrder ,) -> Result < PaymentOrder >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewPaymentOrder",
                    "name": "NewPaymentOrder",
                    "text": "NewPaymentOrder"
                  }
                ],
                "name": "reference",
                "text": "& NewPaymentOrder"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PaymentOrder",
                "name": "PaymentOrder",
                "text": "PaymentOrder"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PaymentOrder >"
          }
        }
      ],
      "errors": [
        "bad_amount",
        "bad_payment_order",
        "payment_link"
      ]
    },
    {
      "handler": "payments::batches",
      "method": "GET",
      "path": "/api/t/{tid}/payments/batches",
      "id": "get_t_tid_payments_batches",
      "source": "crates/kc-api/src/payments.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PaymentBatch"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "payment_batches",
          "signature": "async fn payment_batches (& self , tid : TenantId) -> Result < Vec < PaymentBatch > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "PaymentBatch",
                    "name": "PaymentBatch",
                    "text": "PaymentBatch"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < PaymentBatch >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < PaymentBatch > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payments::create_batch",
      "method": "POST",
      "path": "/api/t/{tid}/payments/batches",
      "id": "post_t_tid_payments_batches",
      "source": "crates/kc-api/src/payments.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewPaymentBatch"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PaymentBatch"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "create_payment_batch",
          "signature": "async fn create_payment_batch (& self , tid : TenantId , b : & NewPaymentBatch ,) -> Result < PaymentBatch >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "b",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewPaymentBatch",
                    "name": "NewPaymentBatch",
                    "text": "NewPaymentBatch"
                  }
                ],
                "name": "reference",
                "text": "& NewPaymentBatch"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PaymentBatch",
                "name": "PaymentBatch",
                "text": "PaymentBatch"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PaymentBatch >"
          }
        }
      ],
      "errors": [
        "bad_filename",
        "bad_payment_batch"
      ]
    },
    {
      "handler": "payments::from_payroll",
      "method": "POST",
      "path": "/api/t/{tid}/payments/payroll",
      "id": "post_t_tid_payments_payroll",
      "source": "crates/kc-api/src/payments.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/PayrollPaymentOrders"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PayrollPaymentResult"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "payroll_payment_orders",
          "signature": "async fn payroll_payment_orders (& self , tid : TenantId , p : & PayrollPaymentOrders ,) -> Result < PayrollPaymentResult >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "p",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "PayrollPaymentOrders",
                    "name": "PayrollPaymentOrders",
                    "text": "PayrollPaymentOrders"
                  }
                ],
                "name": "reference",
                "text": "& PayrollPaymentOrders"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PayrollPaymentResult",
                "name": "PayrollPaymentResult",
                "text": "PayrollPaymentResult"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PayrollPaymentResult >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payments::plan",
      "method": "GET",
      "path": "/api/t/{tid}/payments/plan",
      "id": "get_t_tid_payments_plan",
      "source": "crates/kc-api/src/payments.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::payments::PlanQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PaymentPlanRow"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "payment_plan",
          "signature": "async fn payment_plan (& self , tid : TenantId , due : NaiveDate) -> Result < Vec < PaymentPlanRow > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "due",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "PaymentPlanRow",
                    "name": "PaymentPlanRow",
                    "text": "PaymentPlanRow"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < PaymentPlanRow >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < PaymentPlanRow > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payments::cancel",
      "method": "POST",
      "path": "/api/t/{tid}/payments/{id}/cancel",
      "id": "post_t_tid_payments_id_cancel",
      "source": "crates/kc-api/src/payments.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelPaymentOrder"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PaymentOrder"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cancel_payment_order",
          "signature": "async fn cancel_payment_order (& self , tid : TenantId , id : PaymentOrderId , reason : & str ,) -> Result < PaymentOrder >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PaymentOrderId",
                "name": "PaymentOrderId",
                "text": "PaymentOrderId"
              }
            },
            {
              "pattern": "reason",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PaymentOrder",
                "name": "PaymentOrder",
                "text": "PaymentOrder"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PaymentOrder >"
          }
        }
      ],
      "errors": [
        "already_cancelled"
      ]
    },
    {
      "handler": "payroll_advances::limit",
      "method": "GET",
      "path": "/api/t/{tid}/payroll/advance-limit",
      "id": "get_t_tid_payroll_advance_limit",
      "source": "crates/kc-api/src/payroll_advances.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::payroll_advances::LimitQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PayrollAdvanceLimit"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "payroll_advance_limit",
          "signature": "async fn payroll_advance_limit (& self , tid : TenantId , employee_id : EmployeeId , period : Option < NaiveDate > ,) -> Result < PayrollAdvanceLimit >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "employee_id",
              "type": {
                "args": [],
                "base": "EmployeeId",
                "name": "EmployeeId",
                "text": "EmployeeId"
              }
            },
            {
              "pattern": "period",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PayrollAdvanceLimit",
                "name": "PayrollAdvanceLimit",
                "text": "PayrollAdvanceLimit"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PayrollAdvanceLimit >"
          }
        }
      ],
      "errors": [
        "internal"
      ]
    },
    {
      "handler": "payroll_advances::list",
      "method": "GET",
      "path": "/api/t/{tid}/payroll/advances",
      "id": "get_t_tid_payroll_advances",
      "source": "crates/kc-api/src/payroll_advances.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::payroll_advances::ListQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PayrollAdvance"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "payroll_advances",
          "signature": "async fn payroll_advances (& self , tid : TenantId , period : Option < NaiveDate > , employee_id : Option < EmployeeId > ,) -> Result < Vec < PayrollAdvance > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "period",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            },
            {
              "pattern": "employee_id",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "EmployeeId",
                    "name": "EmployeeId",
                    "text": "EmployeeId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < EmployeeId >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "PayrollAdvance",
                    "name": "PayrollAdvance",
                    "text": "PayrollAdvance"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < PayrollAdvance >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < PayrollAdvance > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll_advances::create",
      "method": "POST",
      "path": "/api/t/{tid}/payroll/advances",
      "id": "post_t_tid_payroll_advances",
      "source": "crates/kc-api/src/payroll_advances.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewPayrollAdvance"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PayrollAdvanceDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_payroll_advance",
          "signature": "async fn create_payroll_advance (& self , tid : TenantId , a : & NewPayrollAdvance ,) -> Result < PayrollAdvanceDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "a",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewPayrollAdvance",
                    "name": "NewPayrollAdvance",
                    "text": "NewPayrollAdvance"
                  }
                ],
                "name": "reference",
                "text": "& NewPayrollAdvance"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PayrollAdvanceDetail",
                "name": "PayrollAdvanceDetail",
                "text": "PayrollAdvanceDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PayrollAdvanceDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll_advances::create_group",
      "method": "POST",
      "path": "/api/t/{tid}/payroll/advances/group",
      "id": "post_t_tid_payroll_advances_group",
      "source": "crates/kc-api/src/payroll_advances.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewPayrollAdvanceGroup"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PayrollAdvance"
          }
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_payroll_advance_group",
          "signature": "async fn create_payroll_advance_group (& self , tid : TenantId , g : & NewPayrollAdvanceGroup ,) -> Result < Vec < PayrollAdvance > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "g",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewPayrollAdvanceGroup",
                    "name": "NewPayrollAdvanceGroup",
                    "text": "NewPayrollAdvanceGroup"
                  }
                ],
                "name": "reference",
                "text": "& NewPayrollAdvanceGroup"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "PayrollAdvance",
                    "name": "PayrollAdvance",
                    "text": "PayrollAdvance"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < PayrollAdvance >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < PayrollAdvance > >"
          }
        }
      ],
      "errors": [
        "payroll_advance_link"
      ]
    },
    {
      "handler": "payroll_advances::get",
      "method": "GET",
      "path": "/api/t/{tid}/payroll/advances/{id}",
      "id": "get_t_tid_payroll_advances_id",
      "source": "crates/kc-api/src/payroll_advances.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PayrollAdvanceDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "payroll_advance",
          "signature": "async fn payroll_advance (& self , tid : TenantId , id : PayrollAdvanceId ,) -> Result < PayrollAdvanceDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PayrollAdvanceId",
                "name": "PayrollAdvanceId",
                "text": "PayrollAdvanceId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PayrollAdvanceDetail",
                "name": "PayrollAdvanceDetail",
                "text": "PayrollAdvanceDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PayrollAdvanceDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll_advances::cancel",
      "method": "POST",
      "path": "/api/t/{tid}/payroll/advances/{id}/cancel",
      "id": "post_t_tid_payroll_advances_id_cancel",
      "source": "crates/kc-api/src/payroll_advances.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelPayrollAdvance"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PayrollAdvanceDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "cancel_payroll_advance",
          "signature": "async fn cancel_payroll_advance (& self , tid : TenantId , id : PayrollAdvanceId , c : & CancelPayrollAdvance ,) -> Result < PayrollAdvanceDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PayrollAdvanceId",
                "name": "PayrollAdvanceId",
                "text": "PayrollAdvanceId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "CancelPayrollAdvance",
                    "name": "CancelPayrollAdvance",
                    "text": "CancelPayrollAdvance"
                  }
                ],
                "name": "reference",
                "text": "& CancelPayrollAdvance"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PayrollAdvanceDetail",
                "name": "PayrollAdvanceDetail",
                "text": "PayrollAdvanceDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PayrollAdvanceDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll_advances::payment_order",
      "method": "POST",
      "path": "/api/t/{tid}/payroll/advances/{id}/payment-order",
      "id": "post_t_tid_payroll_advances_id_payment_order",
      "source": "crates/kc-api/src/payroll_advances.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewPayrollAdvancePayment"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PayrollAdvanceDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "payroll_advance_payment_order",
          "signature": "async fn payroll_advance_payment_order (& self , tid : TenantId , id : PayrollAdvanceId , p : & NewPayrollAdvancePayment ,) -> Result < PayrollAdvanceDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PayrollAdvanceId",
                "name": "PayrollAdvanceId",
                "text": "PayrollAdvanceId"
              }
            },
            {
              "pattern": "p",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewPayrollAdvancePayment",
                    "name": "NewPayrollAdvancePayment",
                    "text": "NewPayrollAdvancePayment"
                  }
                ],
                "name": "reference",
                "text": "& NewPayrollAdvancePayment"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PayrollAdvanceDetail",
                "name": "PayrollAdvanceDetail",
                "text": "PayrollAdvanceDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PayrollAdvanceDetail >"
          }
        }
      ],
      "errors": [
        "payroll_advance_payment",
        "payroll_advance_state"
      ]
    },
    {
      "handler": "payroll_deduction_plans::list",
      "method": "GET",
      "path": "/api/t/{tid}/payroll/deduction-plans",
      "id": "get_t_tid_payroll_deduction_plans",
      "source": "crates/kc-api/src/payroll_deduction_plans.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::payroll_deduction_plans::ListQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PayrollDeductionPlan"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "payroll_deduction_plans",
          "signature": "async fn payroll_deduction_plans (& self , tid : TenantId , employee_id : Option < EmployeeId > , status : Option < PayrollDeductionPlanStatus > ,) -> Result < Vec < PayrollDeductionPlan > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "employee_id",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "EmployeeId",
                    "name": "EmployeeId",
                    "text": "EmployeeId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < EmployeeId >"
              }
            },
            {
              "pattern": "status",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "PayrollDeductionPlanStatus",
                    "name": "PayrollDeductionPlanStatus",
                    "text": "PayrollDeductionPlanStatus"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < PayrollDeductionPlanStatus >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "PayrollDeductionPlan",
                    "name": "PayrollDeductionPlan",
                    "text": "PayrollDeductionPlan"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < PayrollDeductionPlan >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < PayrollDeductionPlan > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll_deduction_plans::add",
      "method": "POST",
      "path": "/api/t/{tid}/payroll/deduction-plans",
      "id": "post_t_tid_payroll_deduction_plans",
      "source": "crates/kc-api/src/payroll_deduction_plans.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewPayrollDeductionPlan"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PayrollDeductionPlanDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_payroll_deduction_plan",
          "signature": "async fn create_payroll_deduction_plan (& self , tid : TenantId , p : & NewPayrollDeductionPlan ,) -> Result < PayrollDeductionPlanDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "p",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewPayrollDeductionPlan",
                    "name": "NewPayrollDeductionPlan",
                    "text": "NewPayrollDeductionPlan"
                  }
                ],
                "name": "reference",
                "text": "& NewPayrollDeductionPlan"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PayrollDeductionPlanDetail",
                "name": "PayrollDeductionPlanDetail",
                "text": "PayrollDeductionPlanDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PayrollDeductionPlanDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll_deduction_plans::apply",
      "method": "POST",
      "path": "/api/t/{tid}/payroll/deduction-plans/apply",
      "id": "post_t_tid_payroll_deduction_plans_apply",
      "source": "crates/kc-api/src/payroll_deduction_plans.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/ApplyPayrollDeductionPlans"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PayrollDeductionPlansApplied"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "apply_payroll_deduction_plans",
          "signature": "async fn apply_payroll_deduction_plans (& self , tid : TenantId , a : & ApplyPayrollDeductionPlans ,) -> Result < PayrollDeductionPlansApplied >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "a",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "ApplyPayrollDeductionPlans",
                    "name": "ApplyPayrollDeductionPlans",
                    "text": "ApplyPayrollDeductionPlans"
                  }
                ],
                "name": "reference",
                "text": "& ApplyPayrollDeductionPlans"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PayrollDeductionPlansApplied",
                "name": "PayrollDeductionPlansApplied",
                "text": "PayrollDeductionPlansApplied"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PayrollDeductionPlansApplied >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll_deduction_plans::get",
      "method": "GET",
      "path": "/api/t/{tid}/payroll/deduction-plans/{id}",
      "id": "get_t_tid_payroll_deduction_plans_id",
      "source": "crates/kc-api/src/payroll_deduction_plans.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PayrollDeductionPlanDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "payroll_deduction_plan",
          "signature": "async fn payroll_deduction_plan (& self , tid : TenantId , id : PayrollDeductionPlanId ,) -> Result < PayrollDeductionPlanDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PayrollDeductionPlanId",
                "name": "PayrollDeductionPlanId",
                "text": "PayrollDeductionPlanId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PayrollDeductionPlanDetail",
                "name": "PayrollDeductionPlanDetail",
                "text": "PayrollDeductionPlanDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PayrollDeductionPlanDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll_deduction_plans::close",
      "method": "POST",
      "path": "/api/t/{tid}/payroll/deduction-plans/{id}/close",
      "id": "post_t_tid_payroll_deduction_plans_id_close",
      "source": "crates/kc-api/src/payroll_deduction_plans.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/ClosePayrollDeductionPlan"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PayrollDeductionPlanDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "close_payroll_deduction_plan",
          "signature": "async fn close_payroll_deduction_plan (& self , tid : TenantId , id : PayrollDeductionPlanId , c : & ClosePayrollDeductionPlan ,) -> Result < PayrollDeductionPlanDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PayrollDeductionPlanId",
                "name": "PayrollDeductionPlanId",
                "text": "PayrollDeductionPlanId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "ClosePayrollDeductionPlan",
                    "name": "ClosePayrollDeductionPlan",
                    "text": "ClosePayrollDeductionPlan"
                  }
                ],
                "name": "reference",
                "text": "& ClosePayrollDeductionPlan"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PayrollDeductionPlanDetail",
                "name": "PayrollDeductionPlanDetail",
                "text": "PayrollDeductionPlanDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PayrollDeductionPlanDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll_deduction_plans::garnishment_limit",
      "method": "GET",
      "path": "/api/t/{tid}/payroll/garnishment-limit",
      "id": "get_t_tid_payroll_garnishment_limit",
      "source": "crates/kc-api/src/payroll_deduction_plans.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::payroll_deduction_plans::LimitQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/GarnishmentLimit"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "payroll_garnishment_limit",
          "signature": "async fn payroll_garnishment_limit (& self , tid : TenantId , employee_id : EmployeeId , period : NaiveDate , order_date : Option < NaiveDate > ,) -> Result < GarnishmentLimit >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "employee_id",
              "type": {
                "args": [],
                "base": "EmployeeId",
                "name": "EmployeeId",
                "text": "EmployeeId"
              }
            },
            {
              "pattern": "period",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            },
            {
              "pattern": "order_date",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "GarnishmentLimit",
                "name": "GarnishmentLimit",
                "text": "GarnishmentLimit"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < GarnishmentLimit >"
          }
        }
      ],
      "errors": [
        "internal"
      ]
    },
    {
      "handler": "payroll::item_types",
      "method": "GET",
      "path": "/api/t/{tid}/payroll/item-types",
      "id": "get_t_tid_payroll_item_types",
      "source": "crates/kc-api/src/payroll.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PayrollItemType"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "payroll_item_types",
          "signature": "async fn payroll_item_types (& self , tid : TenantId) -> Result < Vec < PayrollItemType > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "PayrollItemType",
                    "name": "PayrollItemType",
                    "text": "PayrollItemType"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < PayrollItemType >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < PayrollItemType > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll::items",
      "method": "GET",
      "path": "/api/t/{tid}/payroll/items",
      "id": "get_t_tid_payroll_items",
      "source": "crates/kc-api/src/payroll.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::payroll::PeriodQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PayrollItem"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "payroll_items",
          "signature": "async fn payroll_items (& self , tid : TenantId , period : Option < NaiveDate > ,) -> Result < Vec < PayrollItem > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "period",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "PayrollItem",
                    "name": "PayrollItem",
                    "text": "PayrollItem"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < PayrollItem >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < PayrollItem > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll::add_item",
      "method": "POST",
      "path": "/api/t/{tid}/payroll/items",
      "id": "post_t_tid_payroll_items",
      "source": "crates/kc-api/src/payroll.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewPayrollItem"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PayrollItem"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_payroll_item",
          "signature": "async fn add_payroll_item (& self , tid : TenantId , i : & NewPayrollItem) -> Result < PayrollItem >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "i",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewPayrollItem",
                    "name": "NewPayrollItem",
                    "text": "NewPayrollItem"
                  }
                ],
                "name": "reference",
                "text": "& NewPayrollItem"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PayrollItem",
                "name": "PayrollItem",
                "text": "PayrollItem"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PayrollItem >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll::cancel_item",
      "method": "POST",
      "path": "/api/t/{tid}/payroll/items/{id}/cancel",
      "id": "post_t_tid_payroll_items_id_cancel",
      "source": "crates/kc-api/src/payroll.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelPayrollItem"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PayrollItem"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cancel_payroll_item",
          "signature": "async fn cancel_payroll_item (& self , tid : TenantId , id : i64 , reason : & str ,) -> Result < PayrollItem >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            },
            {
              "pattern": "reason",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PayrollItem",
                "name": "PayrollItem",
                "text": "PayrollItem"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PayrollItem >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "mpin_epdd::check",
      "method": "POST",
      "path": "/api/t/{tid}/payroll/mpin/epdd/{id}/check",
      "id": "post_t_tid_payroll_mpin_epdd_id_check",
      "source": "crates/kc-api/src/mpin_epdd.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/MpinEpddSubmission"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "mpin_epdd_check",
          "signature": "async fn mpin_epdd_check (& self , tid : TenantId , id : i64) -> Result < MpinEpddSubmission >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "MpinEpddSubmission",
                "name": "MpinEpddSubmission",
                "text": "MpinEpddSubmission"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < MpinEpddSubmission >"
          }
        }
      ],
      "errors": [
        "mpin_status_final"
      ]
    },
    {
      "handler": "mpin_epdd::municipalities",
      "method": "GET",
      "path": "/api/t/{tid}/payroll/mpin/municipalities",
      "id": "get_t_tid_payroll_mpin_municipalities",
      "source": "crates/kc-api/src/mpin_epdd.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MpinCode"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "mpin_municipalities",
          "signature": "async fn mpin_municipalities (& self , tid : TenantId) -> Result < Vec < MpinCode > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "MpinCode",
                    "name": "MpinCode",
                    "text": "MpinCode"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < MpinCode >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < MpinCode > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "mpin_epdd::settings",
      "method": "GET",
      "path": "/api/t/{tid}/payroll/mpin/settings",
      "id": "get_t_tid_payroll_mpin_settings",
      "source": "crates/kc-api/src/mpin_epdd.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/MpinSettings"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "mpin_settings",
          "signature": "async fn mpin_settings (& self , tid : TenantId) -> Result < MpinSettings >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "MpinSettings",
                "name": "MpinSettings",
                "text": "MpinSettings"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < MpinSettings >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "mpin_epdd::set_settings",
      "method": "POST",
      "path": "/api/t/{tid}/payroll/mpin/settings",
      "id": "post_t_tid_payroll_mpin_settings",
      "source": "crates/kc-api/src/mpin_epdd.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/MpinSettings"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/MpinSettings"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "set_mpin_settings",
          "signature": "async fn set_mpin_settings (& self , tid : TenantId , s : & MpinSettings) -> Result < MpinSettings >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "s",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "MpinSettings",
                    "name": "MpinSettings",
                    "text": "MpinSettings"
                  }
                ],
                "name": "reference",
                "text": "& MpinSettings"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "MpinSettings",
                "name": "MpinSettings",
                "text": "MpinSettings"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < MpinSettings >"
          }
        }
      ],
      "errors": [
        "mpin_code"
      ]
    },
    {
      "handler": "payroll::params",
      "method": "GET",
      "path": "/api/t/{tid}/payroll/parameters",
      "id": "get_t_tid_payroll_parameters",
      "source": "crates/kc-api/src/payroll.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::payroll::DateQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PayrollParam"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "payroll_params",
          "signature": "async fn payroll_params (& self , tid : TenantId , date : Option < NaiveDate > ,) -> Result < Vec < PayrollParam > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "date",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "PayrollParam",
                    "name": "PayrollParam",
                    "text": "PayrollParam"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < PayrollParam >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < PayrollParam > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll::set_param",
      "method": "POST",
      "path": "/api/t/{tid}/payroll/parameters",
      "id": "post_t_tid_payroll_parameters",
      "source": "crates/kc-api/src/payroll.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewPayrollParam"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PayrollParam"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "set_payroll_param",
          "signature": "async fn set_payroll_param (& self , tid : TenantId , p : & NewPayrollParam ,) -> Result < PayrollParam >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "p",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewPayrollParam",
                    "name": "NewPayrollParam",
                    "text": "NewPayrollParam"
                  }
                ],
                "name": "reference",
                "text": "& NewPayrollParam"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PayrollParam",
                "name": "PayrollParam",
                "text": "PayrollParam"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PayrollParam >"
          }
        }
      ],
      "errors": [
        "bad_param_value",
        "missing_source",
        "negative_retail_growth",
        "unknown_param"
      ]
    },
    {
      "handler": "payroll::preview",
      "method": "GET",
      "path": "/api/t/{tid}/payroll/preview",
      "id": "get_t_tid_payroll_preview",
      "source": "crates/kc-api/src/payroll.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::payroll::PeriodQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PayrollRun"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "payroll_preview",
          "signature": "async fn payroll_preview (& self , tid : TenantId , period : NaiveDate) -> Result < PayrollRun >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "period",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PayrollRun",
                "name": "PayrollRun",
                "text": "PayrollRun"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PayrollRun >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll::preview_kind",
      "method": "POST",
      "path": "/api/t/{tid}/payroll/preview",
      "id": "post_t_tid_payroll_preview",
      "source": "crates/kc-api/src/payroll.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/LockPayroll"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PayrollRun"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "payroll_preview_kind",
          "signature": "async fn payroll_preview_kind (& self , tid : TenantId , l : & LockPayroll) -> Result < PayrollRun >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "l",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "LockPayroll",
                    "name": "LockPayroll",
                    "text": "LockPayroll"
                  }
                ],
                "name": "reference",
                "text": "& LockPayroll"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PayrollRun",
                "name": "PayrollRun",
                "text": "PayrollRun"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PayrollRun >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll::runs",
      "method": "GET",
      "path": "/api/t/{tid}/payroll/runs",
      "id": "get_t_tid_payroll_runs",
      "source": "crates/kc-api/src/payroll.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::payroll::PeriodQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PayrollRunSummary"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "payroll_runs",
          "signature": "async fn payroll_runs (& self , tid : TenantId , period : Option < NaiveDate > ,) -> Result < Vec < PayrollRunSummary > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "period",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "PayrollRunSummary",
                    "name": "PayrollRunSummary",
                    "text": "PayrollRunSummary"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < PayrollRunSummary >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < PayrollRunSummary > >"
          }
        }
      ],
      "errors": [
        "internal"
      ]
    },
    {
      "handler": "payroll::lock",
      "method": "POST",
      "path": "/api/t/{tid}/payroll/runs",
      "id": "post_t_tid_payroll_runs",
      "source": "crates/kc-api/src/payroll.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/LockPayroll"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PayrollRun"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "lock_payroll",
          "signature": "async fn lock_payroll (& self , tid : TenantId , period : NaiveDate , reason : Option < & str > ,) -> Result < PayrollRun >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "period",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            },
            {
              "pattern": "reason",
              "type": {
                "args": [
                  {
                    "args": [
                      {
                        "args": [],
                        "base": "str",
                        "name": "str",
                        "text": "str"
                      }
                    ],
                    "name": "reference",
                    "text": "& str"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < & str >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PayrollRun",
                "name": "PayrollRun",
                "text": "PayrollRun"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PayrollRun >"
          }
        },
        {
          "name": "lock_payroll_kind",
          "signature": "async fn lock_payroll_kind (& self , tid : TenantId , l : & LockPayroll) -> Result < PayrollRun >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "l",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "LockPayroll",
                    "name": "LockPayroll",
                    "text": "LockPayroll"
                  }
                ],
                "name": "reference",
                "text": "& LockPayroll"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PayrollRun",
                "name": "PayrollRun",
                "text": "PayrollRun"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PayrollRun >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll::run",
      "method": "GET",
      "path": "/api/t/{tid}/payroll/runs/{id}",
      "id": "get_t_tid_payroll_runs_id",
      "source": "crates/kc-api/src/payroll.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/PayrollRunId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PayrollRun"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "payroll_run",
          "signature": "async fn payroll_run (& self , tid : TenantId , id : PayrollRunId) -> Result < PayrollRun >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PayrollRunId",
                "name": "PayrollRunId",
                "text": "PayrollRunId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PayrollRun",
                "name": "PayrollRun",
                "text": "PayrollRun"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PayrollRun >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll::run_header",
      "method": "GET",
      "path": "/api/t/{tid}/payroll/runs/{id}/header",
      "id": "get_t_tid_payroll_runs_id_header",
      "source": "crates/kc-api/src/payroll.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/PayrollRunId"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::payroll::SlipQuery"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PayrollRun"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "payroll_run_header",
          "signature": "async fn payroll_run_header (& self , tid : TenantId , id : PayrollRunId , line : Option < i32 > ,) -> Result < PayrollRun >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PayrollRunId",
                "name": "PayrollRunId",
                "text": "PayrollRunId"
              }
            },
            {
              "pattern": "line",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PayrollRun",
                "name": "PayrollRun",
                "text": "PayrollRun"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PayrollRun >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll::mpin",
      "method": "GET",
      "path": "/api/t/{tid}/payroll/runs/{id}/mpin",
      "id": "get_t_tid_payroll_runs_id_mpin",
      "source": "crates/kc-api/src/payroll.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/PayrollRunId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/MpinExport"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "mpin",
          "signature": "async fn mpin (& self , tid : TenantId , id : PayrollRunId) -> Result < MpinExport >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PayrollRunId",
                "name": "PayrollRunId",
                "text": "PayrollRunId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "MpinExport",
                "name": "MpinExport",
                "text": "MpinExport"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < MpinExport >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "payroll::mpin_filed",
      "method": "POST",
      "path": "/api/t/{tid}/payroll/runs/{id}/mpin",
      "id": "post_t_tid_payroll_runs_id_mpin",
      "source": "crates/kc-api/src/payroll.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/PayrollRunId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/MpinFiled"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/MpinSubmission"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "mpin_filed",
          "signature": "async fn mpin_filed (& self , tid : TenantId , id : PayrollRunId , f : & MpinFiled ,) -> Result < MpinSubmission >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PayrollRunId",
                "name": "PayrollRunId",
                "text": "PayrollRunId"
              }
            },
            {
              "pattern": "f",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "MpinFiled",
                    "name": "MpinFiled",
                    "text": "MpinFiled"
                  }
                ],
                "name": "reference",
                "text": "& MpinFiled"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "MpinSubmission",
                "name": "MpinSubmission",
                "text": "MpinSubmission"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < MpinSubmission >"
          }
        }
      ],
      "errors": [
        "missing_reference"
      ]
    },
    {
      "handler": "mpin_epdd::preview",
      "method": "GET",
      "path": "/api/t/{tid}/payroll/runs/{id}/mpin/epdd",
      "id": "get_t_tid_payroll_runs_id_mpin_epdd",
      "source": "crates/kc-api/src/mpin_epdd.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/PayrollRunId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/MpinEpddPreview"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "mpin_epdd",
          "signature": "async fn mpin_epdd (& self , tid : TenantId , id : PayrollRunId) -> Result < MpinEpddPreview >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PayrollRunId",
                "name": "PayrollRunId",
                "text": "PayrollRunId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "MpinEpddPreview",
                "name": "MpinEpddPreview",
                "text": "MpinEpddPreview"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < MpinEpddPreview >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "mpin_epdd::submit",
      "method": "POST",
      "path": "/api/t/{tid}/payroll/runs/{id}/mpin/epdd",
      "id": "post_t_tid_payroll_runs_id_mpin_epdd",
      "source": "crates/kc-api/src/mpin_epdd.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/PayrollRunId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/MpinEpddSubmission"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "mpin_epdd_submit",
          "signature": "async fn mpin_epdd_submit (& self , tid : TenantId , id : PayrollRunId ,) -> Result < MpinEpddSubmission >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PayrollRunId",
                "name": "PayrollRunId",
                "text": "PayrollRunId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "MpinEpddSubmission",
                "name": "MpinEpddSubmission",
                "text": "MpinEpddSubmission"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < MpinEpddSubmission >"
          }
        }
      ],
      "errors": [
        "mpin_already_accepted",
        "mpin_username",
        "sign_failed"
      ]
    },
    {
      "handler": "mpin_epdd::sign",
      "method": "POST",
      "path": "/api/t/{tid}/payroll/runs/{id}/mpin/epdd/sign",
      "id": "post_t_tid_payroll_runs_id_mpin_epdd_sign",
      "source": "crates/kc-api/src/mpin_epdd.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/PayrollRunId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/MpinSignedXml"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "mpin_epdd_sign",
          "signature": "async fn mpin_epdd_sign (& self , tid : TenantId , id : PayrollRunId) -> Result < MpinSignedXml >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PayrollRunId",
                "name": "PayrollRunId",
                "text": "PayrollRunId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "MpinSignedXml",
                "name": "MpinSignedXml",
                "text": "MpinSignedXml"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < MpinSignedXml >"
          }
        }
      ],
      "errors": [
        "sign_failed"
      ]
    },
    {
      "handler": "payroll::post",
      "method": "POST",
      "path": "/api/t/{tid}/payroll/runs/{id}/post",
      "id": "post_t_tid_payroll_runs_id_post",
      "source": "crates/kc-api/src/payroll.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/PayrollRunId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/PostPayroll"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PayrollPostResult"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "post_payroll",
          "signature": "async fn post_payroll (& self , tid : TenantId , id : PayrollRunId , posting_date : Option < NaiveDate > ,) -> Result < PayrollPostResult >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PayrollRunId",
                "name": "PayrollRunId",
                "text": "PayrollRunId"
              }
            },
            {
              "pattern": "posting_date",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PayrollPostResult",
                "name": "PayrollPostResult",
                "text": "PayrollPostResult"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PayrollPostResult >"
          }
        }
      ],
      "errors": [
        "internal"
      ]
    },
    {
      "handler": "overview::performance",
      "method": "GET",
      "path": "/api/t/{tid}/performance",
      "id": "get_t_tid_performance",
      "source": "crates/kc-api/src/overview.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::RangeQ"
      },
      "body": null,
      "auth": "BookDb",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Performance"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "performance",
          "signature": "async fn performance (& self , tid : TenantId , from : Option < NaiveDate > , to : Option < NaiveDate > ,) -> Result < Performance >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "from",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            },
            {
              "pattern": "to",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Performance",
                "name": "Performance",
                "text": "Performance"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Performance >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "get_period_lock",
      "method": "GET",
      "path": "/api/t/{tid}/period-lock",
      "id": "get_t_tid_period_lock",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PeriodLock"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "period_lock",
          "signature": "async fn period_lock (& self , tid : TenantId) -> Result < PeriodLock >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PeriodLock",
                "name": "PeriodLock",
                "text": "PeriodLock"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PeriodLock >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "set_period_lock",
      "method": "POST",
      "path": "/api/t/{tid}/period-lock",
      "id": "post_t_tid_period_lock",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::LockConfirmation"
      },
      "body": {
        "$ref": "#/$defs/SetPeriodLock"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PeriodLock"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "set_period_lock",
          "signature": "async fn set_period_lock (& self , tid : TenantId , req : & SetPeriodLock) -> Result < PeriodLock >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "req",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "SetPeriodLock",
                    "name": "SetPeriodLock",
                    "text": "SetPeriodLock"
                  }
                ],
                "name": "reference",
                "text": "& SetPeriodLock"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PeriodLock",
                "name": "PeriodLock",
                "text": "PeriodLock"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PeriodLock >"
          }
        },
        {
          "name": "set_period_lock_confirmed",
          "signature": "async fn set_period_lock_confirmed (& self , tid : TenantId , req : & SetPeriodLock , pending : Option < u64 > ,) -> Result < PeriodLock >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "req",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "SetPeriodLock",
                    "name": "SetPeriodLock",
                    "text": "SetPeriodLock"
                  }
                ],
                "name": "reference",
                "text": "& SetPeriodLock"
              }
            },
            {
              "pattern": "pending",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "u64",
                    "name": "u64",
                    "text": "u64"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < u64 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PeriodLock",
                "name": "PeriodLock",
                "text": "PeriodLock"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PeriodLock >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "permissions::list",
      "method": "GET",
      "path": "/api/t/{tid}/permissions",
      "id": "get_t_tid_permissions",
      "source": "crates/kc-api/src/permissions.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MemberPermissions"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "permissions",
          "signature": "async fn permissions (& self , tid : TenantId ,) -> Result < Vec < kc_types :: permissions :: MemberPermissions > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "MemberPermissions",
                    "name": "kc_types::permissions::MemberPermissions",
                    "text": "kc_types :: permissions :: MemberPermissions"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < kc_types :: permissions :: MemberPermissions >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < kc_types :: permissions :: MemberPermissions > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "permissions::set",
      "method": "POST",
      "path": "/api/t/{tid}/permissions",
      "id": "post_t_tid_permissions",
      "source": "crates/kc-api/src/permissions.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SetMemberPermissions"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MemberPermissions"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "set_permissions",
          "signature": "async fn set_permissions (& self , tid : TenantId , p : & kc_types :: permissions :: SetMemberPermissions ,) -> Result < Vec < kc_types :: permissions :: MemberPermissions > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "p",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "SetMemberPermissions",
                    "name": "kc_types::permissions::SetMemberPermissions",
                    "text": "kc_types :: permissions :: SetMemberPermissions"
                  }
                ],
                "name": "reference",
                "text": "& kc_types :: permissions :: SetMemberPermissions"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "MemberPermissions",
                    "name": "kc_types::permissions::MemberPermissions",
                    "text": "kc_types :: permissions :: MemberPermissions"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < kc_types :: permissions :: MemberPermissions >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < kc_types :: permissions :: MemberPermissions > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "pit_annual::list",
      "method": "GET",
      "path": "/api/t/{tid}/pit-annual",
      "id": "get_t_tid_pit_annual",
      "source": "crates/kc-api/src/pit_annual.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::pit_annual::YearQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PitAnnualReturn"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "pit_annual_returns",
          "signature": "async fn pit_annual_returns (& self , tid : TenantId , year : Option < i32 > ,) -> Result < Vec < PitAnnualReturn > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "PitAnnualReturn",
                    "name": "PitAnnualReturn",
                    "text": "PitAnnualReturn"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < PitAnnualReturn >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < PitAnnualReturn > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "pit_annual::create",
      "method": "POST",
      "path": "/api/t/{tid}/pit-annual",
      "id": "post_t_tid_pit_annual",
      "source": "crates/kc-api/src/pit_annual.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewPitAnnualReturn"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PitAnnualReturn"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_pit_annual_return",
          "signature": "async fn create_pit_annual_return (& self , tid : TenantId , n : & NewPitAnnualReturn ,) -> Result < PitAnnualReturn >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewPitAnnualReturn",
                    "name": "NewPitAnnualReturn",
                    "text": "NewPitAnnualReturn"
                  }
                ],
                "name": "reference",
                "text": "& NewPitAnnualReturn"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PitAnnualReturn",
                "name": "PitAnnualReturn",
                "text": "PitAnnualReturn"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PitAnnualReturn >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "pit_annual::people",
      "method": "GET",
      "path": "/api/t/{tid}/pit-annual/people",
      "id": "get_t_tid_pit_annual_people",
      "source": "crates/kc-api/src/pit_annual.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::pit_annual::YearQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PitAnnualPerson"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "pit_annual_people",
          "signature": "async fn pit_annual_people (& self , tid : TenantId , year : Option < i32 > ,) -> Result < Vec < PitAnnualPerson > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "PitAnnualPerson",
                    "name": "PitAnnualPerson",
                    "text": "PitAnnualPerson"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < PitAnnualPerson >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < PitAnnualPerson > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "pit_annual::preview",
      "method": "GET",
      "path": "/api/t/{tid}/pit-annual/preview",
      "id": "get_t_tid_pit_annual_preview",
      "source": "crates/kc-api/src/pit_annual.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::pit_annual::PreviewQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PitAnnualPreview"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "pit_annual_preview",
          "signature": "async fn pit_annual_preview (& self , tid : TenantId , year : Option < i32 > , employee_id : EmployeeId ,) -> Result < PitAnnualPreview >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            },
            {
              "pattern": "employee_id",
              "type": {
                "args": [],
                "base": "EmployeeId",
                "name": "EmployeeId",
                "text": "EmployeeId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PitAnnualPreview",
                "name": "PitAnnualPreview",
                "text": "PitAnnualPreview"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PitAnnualPreview >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "pit_annual::get_one",
      "method": "GET",
      "path": "/api/t/{tid}/pit-annual/{id}",
      "id": "get_t_tid_pit_annual_id",
      "source": "crates/kc-api/src/pit_annual.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PitAnnualReturn"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "pit_annual_return",
          "signature": "async fn pit_annual_return (& self , tid : TenantId , id : PitAnnualReturnId ,) -> Result < PitAnnualReturn >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PitAnnualReturnId",
                "name": "PitAnnualReturnId",
                "text": "PitAnnualReturnId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PitAnnualReturn",
                "name": "PitAnnualReturn",
                "text": "PitAnnualReturn"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PitAnnualReturn >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "pit_annual::cancel",
      "method": "POST",
      "path": "/api/t/{tid}/pit-annual/{id}/cancel",
      "id": "post_t_tid_pit_annual_id_cancel",
      "source": "crates/kc-api/src/pit_annual.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelPitAnnual"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PitAnnualReturn"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cancel_pit_annual_return",
          "signature": "async fn cancel_pit_annual_return (& self , tid : TenantId , id : PitAnnualReturnId , c : & CancelPitAnnual ,) -> Result < PitAnnualReturn >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PitAnnualReturnId",
                "name": "PitAnnualReturnId",
                "text": "PitAnnualReturnId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "CancelPitAnnual",
                    "name": "CancelPitAnnual",
                    "text": "CancelPitAnnual"
                  }
                ],
                "name": "reference",
                "text": "& CancelPitAnnual"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PitAnnualReturn",
                "name": "PitAnnualReturn",
                "text": "PitAnnualReturn"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PitAnnualReturn >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "pit_annual::csv",
      "method": "GET",
      "path": "/api/t/{tid}/pit-annual/{id}/csv",
      "id": "get_t_tid_pit_annual_id_csv",
      "source": "crates/kc-api/src/pit_annual.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "text/csv",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "pit_annual_csv",
          "signature": "async fn pit_annual_csv (& self , tid : TenantId , id : PitAnnualReturnId) -> Result < String >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PitAnnualReturnId",
                "name": "PitAnnualReturnId",
                "text": "PitAnnualReturnId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "String",
                "name": "String",
                "text": "String"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < String >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "pit_annual::filed",
      "method": "POST",
      "path": "/api/t/{tid}/pit-annual/{id}/filed",
      "id": "post_t_tid_pit_annual_id_filed",
      "source": "crates/kc-api/src/pit_annual.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/PitAnnualFiled"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/PitAnnualReturn"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "pit_annual_filed",
          "signature": "async fn pit_annual_filed (& self , tid : TenantId , id : PitAnnualReturnId , f : & PitAnnualFiled ,) -> Result < PitAnnualReturn >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "PitAnnualReturnId",
                "name": "PitAnnualReturnId",
                "text": "PitAnnualReturnId"
              }
            },
            {
              "pattern": "f",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "PitAnnualFiled",
                    "name": "PitAnnualFiled",
                    "text": "PitAnnualFiled"
                  }
                ],
                "name": "reference",
                "text": "& PitAnnualFiled"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "PitAnnualReturn",
                "name": "PitAnnualReturn",
                "text": "PitAnnualReturn"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < PitAnnualReturn >"
          }
        }
      ],
      "errors": [
        "missing_reference"
      ]
    },
    {
      "handler": "profit_tax::list",
      "method": "GET",
      "path": "/api/t/{tid}/profit-tax",
      "id": "get_t_tid_profit_tax",
      "source": "crates/kc-api/src/profit_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ProfitTaxReturn"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "profit_tax_returns",
          "signature": "async fn profit_tax_returns (& self , tid : TenantId) -> Result < Vec < ProfitTaxReturn > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "ProfitTaxReturn",
                    "name": "ProfitTaxReturn",
                    "text": "ProfitTaxReturn"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < ProfitTaxReturn >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < ProfitTaxReturn > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "profit_tax::create",
      "method": "POST",
      "path": "/api/t/{tid}/profit-tax",
      "id": "post_t_tid_profit_tax",
      "source": "crates/kc-api/src/profit_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewProfitTaxReturn"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ProfitTaxReturn"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_profit_tax_return",
          "signature": "async fn create_profit_tax_return (& self , tid : TenantId , n : & NewProfitTaxReturn ,) -> Result < ProfitTaxReturn >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewProfitTaxReturn",
                    "name": "NewProfitTaxReturn",
                    "text": "NewProfitTaxReturn"
                  }
                ],
                "name": "reference",
                "text": "& NewProfitTaxReturn"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ProfitTaxReturn",
                "name": "ProfitTaxReturn",
                "text": "ProfitTaxReturn"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ProfitTaxReturn >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "profit_tax::account_maps",
      "method": "GET",
      "path": "/api/t/{tid}/profit-tax/account-maps",
      "id": "get_t_tid_profit_tax_account_maps",
      "source": "crates/kc-api/src/profit_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ProfitTaxAccountMap"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "profit_tax_account_maps",
          "signature": "async fn profit_tax_account_maps (& self , tid : TenantId) -> Result < Vec < ProfitTaxAccountMap > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "ProfitTaxAccountMap",
                    "name": "ProfitTaxAccountMap",
                    "text": "ProfitTaxAccountMap"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < ProfitTaxAccountMap >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < ProfitTaxAccountMap > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "profit_tax::add_account_map",
      "method": "POST",
      "path": "/api/t/{tid}/profit-tax/account-maps",
      "id": "post_t_tid_profit_tax_account_maps",
      "source": "crates/kc-api/src/profit_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewProfitTaxAccountMap"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ProfitTaxAccountMap"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_profit_tax_account_map",
          "signature": "async fn add_profit_tax_account_map (& self , tid : TenantId , n : & NewProfitTaxAccountMap ,) -> Result < ProfitTaxAccountMap >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewProfitTaxAccountMap",
                    "name": "NewProfitTaxAccountMap",
                    "text": "NewProfitTaxAccountMap"
                  }
                ],
                "name": "reference",
                "text": "& NewProfitTaxAccountMap"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ProfitTaxAccountMap",
                "name": "ProfitTaxAccountMap",
                "text": "ProfitTaxAccountMap"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ProfitTaxAccountMap >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "profit_tax::preview",
      "method": "GET",
      "path": "/api/t/{tid}/profit-tax/preview",
      "id": "get_t_tid_profit_tax_preview",
      "source": "crates/kc-api/src/profit_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::profit_tax::PreviewQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ProfitTaxPreview"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "profit_tax_preview",
          "signature": "async fn profit_tax_preview (& self , tid : TenantId , date : Option < NaiveDate > ,) -> Result < ProfitTaxPreview >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "date",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ProfitTaxPreview",
                "name": "ProfitTaxPreview",
                "text": "ProfitTaxPreview"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ProfitTaxPreview >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "profit_tax::proposal",
      "method": "GET",
      "path": "/api/t/{tid}/profit-tax/proposal",
      "id": "get_t_tid_profit_tax_proposal",
      "source": "crates/kc-api/src/profit_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::profit_tax::PreviewQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ProfitTaxProposal"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "profit_tax_proposal",
          "signature": "async fn profit_tax_proposal (& self , tid : TenantId , date : Option < NaiveDate > ,) -> Result < ProfitTaxProposal >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "date",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ProfitTaxProposal",
                "name": "ProfitTaxProposal",
                "text": "ProfitTaxProposal"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ProfitTaxProposal >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "profit_tax::add_correction",
      "method": "POST",
      "path": "/api/t/{tid}/profit-tax/proposal/corrections",
      "id": "post_t_tid_profit_tax_proposal_corrections",
      "source": "crates/kc-api/src/profit_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewProfitTaxAopCorrection"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ProfitTaxAopCorrection"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_profit_tax_correction",
          "signature": "async fn add_profit_tax_correction (& self , tid : TenantId , n : & NewProfitTaxAopCorrection ,) -> Result < ProfitTaxAopCorrection >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewProfitTaxAopCorrection",
                    "name": "NewProfitTaxAopCorrection",
                    "text": "NewProfitTaxAopCorrection"
                  }
                ],
                "name": "reference",
                "text": "& NewProfitTaxAopCorrection"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ProfitTaxAopCorrection",
                "name": "ProfitTaxAopCorrection",
                "text": "ProfitTaxAopCorrection"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ProfitTaxAopCorrection >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "profit_tax::set_units",
      "method": "POST",
      "path": "/api/t/{tid}/profit-tax/proposal/units",
      "id": "post_t_tid_profit_tax_proposal_units",
      "source": "crates/kc-api/src/profit_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewProfitTaxLimitUnits"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ProfitTaxProposal"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "set_profit_tax_units",
          "signature": "async fn set_profit_tax_units (& self , tid : TenantId , n : & NewProfitTaxLimitUnits ,) -> Result < ProfitTaxProposal >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewProfitTaxLimitUnits",
                    "name": "NewProfitTaxLimitUnits",
                    "text": "NewProfitTaxLimitUnits"
                  }
                ],
                "name": "reference",
                "text": "& NewProfitTaxLimitUnits"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ProfitTaxProposal",
                "name": "ProfitTaxProposal",
                "text": "ProfitTaxProposal"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ProfitTaxProposal >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "profit_tax::rates",
      "method": "GET",
      "path": "/api/t/{tid}/profit-tax/rates",
      "id": "get_t_tid_profit_tax_rates",
      "source": "crates/kc-api/src/profit_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ProfitTaxRate"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "profit_tax_rates",
          "signature": "async fn profit_tax_rates (& self , tid : TenantId) -> Result < Vec < ProfitTaxRate > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "ProfitTaxRate",
                    "name": "ProfitTaxRate",
                    "text": "ProfitTaxRate"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < ProfitTaxRate >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < ProfitTaxRate > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "profit_tax::add_rate",
      "method": "POST",
      "path": "/api/t/{tid}/profit-tax/rates",
      "id": "post_t_tid_profit_tax_rates",
      "source": "crates/kc-api/src/profit_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewProfitTaxRate"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ProfitTaxRate"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_profit_tax_rate",
          "signature": "async fn add_profit_tax_rate (& self , tid : TenantId , n : & NewProfitTaxRate ,) -> Result < ProfitTaxRate >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewProfitTaxRate",
                    "name": "NewProfitTaxRate",
                    "text": "NewProfitTaxRate"
                  }
                ],
                "name": "reference",
                "text": "& NewProfitTaxRate"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ProfitTaxRate",
                "name": "ProfitTaxRate",
                "text": "ProfitTaxRate"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ProfitTaxRate >"
          }
        }
      ],
      "errors": [
        "bad_profit_tax"
      ]
    },
    {
      "handler": "profit_tax::get_one",
      "method": "GET",
      "path": "/api/t/{tid}/profit-tax/{id}",
      "id": "get_t_tid_profit_tax_id",
      "source": "crates/kc-api/src/profit_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ProfitTaxReturn"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "profit_tax_return",
          "signature": "async fn profit_tax_return (& self , tid : TenantId , id : ProfitTaxReturnId ,) -> Result < ProfitTaxReturn >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "ProfitTaxReturnId",
                "name": "ProfitTaxReturnId",
                "text": "ProfitTaxReturnId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ProfitTaxReturn",
                "name": "ProfitTaxReturn",
                "text": "ProfitTaxReturn"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ProfitTaxReturn >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "profit_tax::cancel",
      "method": "POST",
      "path": "/api/t/{tid}/profit-tax/{id}/cancel",
      "id": "post_t_tid_profit_tax_id_cancel",
      "source": "crates/kc-api/src/profit_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelProfitTax"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ProfitTaxReturn"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cancel_profit_tax_return",
          "signature": "async fn cancel_profit_tax_return (& self , tid : TenantId , id : ProfitTaxReturnId , c : & CancelProfitTax ,) -> Result < ProfitTaxReturn >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "ProfitTaxReturnId",
                "name": "ProfitTaxReturnId",
                "text": "ProfitTaxReturnId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "CancelProfitTax",
                    "name": "CancelProfitTax",
                    "text": "CancelProfitTax"
                  }
                ],
                "name": "reference",
                "text": "& CancelProfitTax"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ProfitTaxReturn",
                "name": "ProfitTaxReturn",
                "text": "ProfitTaxReturn"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ProfitTaxReturn >"
          }
        }
      ],
      "errors": [
        "already_cancelled"
      ]
    },
    {
      "handler": "profit_tax::form",
      "method": "GET",
      "path": "/api/t/{tid}/profit-tax/{id}/form",
      "id": "get_t_tid_profit_tax_id_form",
      "source": "crates/kc-api/src/profit_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::tax_pdf::Options"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "text/html",
        "schema": null,
        "alternateContentTypes": {
          "format=pdf": "application/pdf"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "profit_tax_pdf",
          "signature": "async fn profit_tax_pdf (& self , tid : TenantId , id : ProfitTaxReturnId) -> Result < Vec < u8 > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "ProfitTaxReturnId",
                "name": "ProfitTaxReturnId",
                "text": "ProfitTaxReturnId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < u8 > >"
          }
        },
        {
          "name": "profit_tax_form",
          "signature": "async fn profit_tax_form (& self , tid : TenantId , id : ProfitTaxReturnId) -> Result < String >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "ProfitTaxReturnId",
                "name": "ProfitTaxReturnId",
                "text": "ProfitTaxReturnId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "String",
                "name": "String",
                "text": "String"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < String >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "profit_tax::settlement_form",
      "method": "POST",
      "path": "/api/t/{tid}/profit-tax/{id}/form",
      "id": "post_t_tid_profit_tax_id_form",
      "source": "crates/kc-api/src/profit_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/ProfitTaxSettlement"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/pdf",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "profit_tax_settlement_pdf",
          "signature": "async fn profit_tax_settlement_pdf (& self , tid : TenantId , id : ProfitTaxReturnId , settlement : & ProfitTaxSettlement ,) -> Result < Vec < u8 > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "ProfitTaxReturnId",
                "name": "ProfitTaxReturnId",
                "text": "ProfitTaxReturnId"
              }
            },
            {
              "pattern": "settlement",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "ProfitTaxSettlement",
                    "name": "ProfitTaxSettlement",
                    "text": "ProfitTaxSettlement"
                  }
                ],
                "name": "reference",
                "text": "& ProfitTaxSettlement"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < u8 > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "reconciliation",
      "method": "GET",
      "path": "/api/t/{tid}/reconciliation",
      "id": "get_t_tid_reconciliation",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::RangeQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReconciliationRow"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "reconciliation",
          "signature": "async fn reconciliation (& self , tid : TenantId , to : Option < NaiveDate > ,) -> Result < Vec < ReconciliationRow > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "to",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "ReconciliationRow",
                    "name": "ReconciliationRow",
                    "text": "ReconciliationRow"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < ReconciliationRow >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < ReconciliationRow > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "registry::list",
      "method": "GET",
      "path": "/api/t/{tid}/registry",
      "id": "get_t_tid_registry",
      "source": "crates/kc-api/src/registry.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::registry::ListQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RegistryEntry"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "registry",
          "signature": "async fn registry (& self , tid : TenantId , year : Option < i32 >) -> Result < Vec < RegistryEntry > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "RegistryEntry",
                    "name": "RegistryEntry",
                    "text": "RegistryEntry"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < RegistryEntry >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < RegistryEntry > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "registry::create",
      "method": "POST",
      "path": "/api/t/{tid}/registry",
      "id": "post_t_tid_registry",
      "source": "crates/kc-api/src/registry.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewRegistryEntry"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/RegistryEntry"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "register_document",
          "signature": "async fn register_document (& self , tid : TenantId , e : & NewRegistryEntry ,) -> Result < RegistryEntry >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "e",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewRegistryEntry",
                    "name": "NewRegistryEntry",
                    "text": "NewRegistryEntry"
                  }
                ],
                "name": "reference",
                "text": "& NewRegistryEntry"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "RegistryEntry",
                "name": "RegistryEntry",
                "text": "RegistryEntry"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < RegistryEntry >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "registry::correct",
      "method": "POST",
      "path": "/api/t/{tid}/registry/{id}",
      "id": "post_t_tid_registry_id",
      "source": "crates/kc-api/src/registry.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/RegistryCorrection"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/RegistryEntry"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "correct_registry_entry",
          "signature": "async fn correct_registry_entry (& self , tid : TenantId , id : RegistryEntryId , c : & RegistryCorrection ,) -> Result < RegistryEntry >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "RegistryEntryId",
                "name": "RegistryEntryId",
                "text": "RegistryEntryId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "RegistryCorrection",
                    "name": "RegistryCorrection",
                    "text": "RegistryCorrection"
                  }
                ],
                "name": "reference",
                "text": "& RegistryCorrection"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "RegistryEntry",
                "name": "RegistryEntry",
                "text": "RegistryEntry"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < RegistryEntry >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "registry::cancel",
      "method": "POST",
      "path": "/api/t/{tid}/registry/{id}/cancel",
      "id": "post_t_tid_registry_id_cancel",
      "source": "crates/kc-api/src/registry.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/RegistryCancel"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/RegistryEntry"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "cancel_registry_entry",
          "signature": "async fn cancel_registry_entry (& self , tid : TenantId , id : RegistryEntryId , c : & RegistryCancel ,) -> Result < RegistryEntry >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "RegistryEntryId",
                "name": "RegistryEntryId",
                "text": "RegistryEntryId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "RegistryCancel",
                    "name": "RegistryCancel",
                    "text": "RegistryCancel"
                  }
                ],
                "name": "reference",
                "text": "& RegistryCancel"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "RegistryEntry",
                "name": "RegistryEntry",
                "text": "RegistryEntry"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < RegistryEntry >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "registry::versions",
      "method": "GET",
      "path": "/api/t/{tid}/registry/{id}/versions",
      "id": "get_t_tid_registry_id_versions",
      "source": "crates/kc-api/src/registry.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RegistryVersion"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "registry_versions",
          "signature": "async fn registry_versions (& self , tid : TenantId , id : RegistryEntryId ,) -> Result < Vec < RegistryVersion > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "RegistryEntryId",
                "name": "RegistryEntryId",
                "text": "RegistryEntryId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "RegistryVersion",
                    "name": "RegistryVersion",
                    "text": "RegistryVersion"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < RegistryVersion >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < RegistryVersion > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "report_check::rules",
      "method": "GET",
      "path": "/api/t/{tid}/report-check-rules",
      "id": "get_t_tid_report_check_rules",
      "source": "crates/kc-api/src/report_check.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReportCheckRule"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "report_check_rules",
          "signature": "async fn report_check_rules (& self , tid : TenantId) -> Result < Vec < ReportCheckRule > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "ReportCheckRule",
                    "name": "ReportCheckRule",
                    "text": "ReportCheckRule"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < ReportCheckRule >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < ReportCheckRule > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "reports::list",
      "method": "GET",
      "path": "/api/t/{tid}/reports",
      "id": "get_t_tid_reports",
      "source": "crates/kc-api/src/reports.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AnnualReportSummary"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "annual_reports",
          "signature": "async fn annual_reports (& self , tid : TenantId) -> Result < Vec < AnnualReportSummary > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "AnnualReportSummary",
                    "name": "AnnualReportSummary",
                    "text": "AnnualReportSummary"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < AnnualReportSummary >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < AnnualReportSummary > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "reports::allocations",
      "method": "GET",
      "path": "/api/t/{tid}/reports/allocations",
      "id": "get_t_tid_reports_allocations",
      "source": "crates/kc-api/src/reports.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReportAllocation"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "report_allocations",
          "signature": "async fn report_allocations (& self , tid : TenantId) -> Result < Vec < ReportAllocation > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "ReportAllocation",
                    "name": "ReportAllocation",
                    "text": "ReportAllocation"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < ReportAllocation >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < ReportAllocation > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "reports::add_allocation",
      "method": "POST",
      "path": "/api/t/{tid}/reports/allocations",
      "id": "post_t_tid_reports_allocations",
      "source": "crates/kc-api/src/reports.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewReportAllocation"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReportAllocation"
          }
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_report_allocation",
          "signature": "async fn add_report_allocation (& self , tid : TenantId , req : & NewReportAllocation ,) -> Result < Vec < ReportAllocation > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "req",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewReportAllocation",
                    "name": "NewReportAllocation",
                    "text": "NewReportAllocation"
                  }
                ],
                "name": "reference",
                "text": "& NewReportAllocation"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "ReportAllocation",
                    "name": "ReportAllocation",
                    "text": "ReportAllocation"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < ReportAllocation >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < ReportAllocation > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "reports::get",
      "method": "GET",
      "path": "/api/t/{tid}/reports/id/{id}",
      "id": "get_t_tid_reports_id_id",
      "source": "crates/kc-api/src/reports.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AnnualReport"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "annual_report",
          "signature": "async fn annual_report (& self , tid : TenantId , id : i64) -> Result < AnnualReport >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AnnualReport",
                "name": "AnnualReport",
                "text": "AnnualReport"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AnnualReport >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "reports::sizes",
      "method": "GET",
      "path": "/api/t/{tid}/reports/size",
      "id": "get_t_tid_reports_size",
      "source": "crates/kc-api/src/reports.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SizeYear"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "report_sizes",
          "signature": "async fn report_sizes (& self , tid : TenantId) -> Result < Vec < SizeYear > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "SizeYear",
                    "name": "SizeYear",
                    "text": "SizeYear"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < SizeYear >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < SizeYear > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "reports::set_size",
      "method": "POST",
      "path": "/api/t/{tid}/reports/size",
      "id": "post_t_tid_reports_size",
      "source": "crates/kc-api/src/reports.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SetSizeYear"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SizeYear"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "set_report_size",
          "signature": "async fn set_report_size (& self , tid : TenantId , req : & SetSizeYear) -> Result < Vec < SizeYear > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "req",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "SetSizeYear",
                    "name": "SetSizeYear",
                    "text": "SetSizeYear"
                  }
                ],
                "name": "reference",
                "text": "& SetSizeYear"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "SizeYear",
                    "name": "SizeYear",
                    "text": "SizeYear"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < SizeYear >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < SizeYear > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "reports::generate",
      "method": "POST",
      "path": "/api/t/{tid}/reports/{year}",
      "id": "post_t_tid_reports_year",
      "source": "crates/kc-api/src/reports.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "year",
          "schema": {
            "type": "integer",
            "format": "i32"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/GenerateAnnualReport"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AnnualReport"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "generate_annual_report",
          "signature": "async fn generate_annual_report (& self , tid : TenantId , year : i32 , req : & GenerateAnnualReport ,) -> Result < AnnualReport >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [],
                "base": "i32",
                "name": "i32",
                "text": "i32"
              }
            },
            {
              "pattern": "req",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "GenerateAnnualReport",
                    "name": "GenerateAnnualReport",
                    "text": "GenerateAnnualReport"
                  }
                ],
                "name": "reference",
                "text": "& GenerateAnnualReport"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AnnualReport",
                "name": "AnnualReport",
                "text": "AnnualReport"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AnnualReport >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "report_check::check",
      "method": "GET",
      "path": "/api/t/{tid}/reports/{year}/check",
      "id": "get_t_tid_reports_year_check",
      "source": "crates/kc-api/src/report_check.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "year",
          "schema": {
            "type": "integer",
            "format": "i32"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AnnualReportCheck"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "annual_report_check",
          "signature": "async fn annual_report_check (& self , tid : TenantId , year : i32) -> Result < AnnualReportCheck >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [],
                "base": "i32",
                "name": "i32",
                "text": "i32"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AnnualReportCheck",
                "name": "AnnualReportCheck",
                "text": "AnnualReportCheck"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AnnualReportCheck >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "report_check::confirm",
      "method": "POST",
      "path": "/api/t/{tid}/reports/{year}/check/confirm",
      "id": "post_t_tid_reports_year_check_confirm",
      "source": "crates/kc-api/src/report_check.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "year",
          "schema": {
            "type": "integer",
            "format": "i32"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/ConfirmReportWarnings"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AnnualReportCheck"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "confirm_report_warnings",
          "signature": "async fn confirm_report_warnings (& self , tid : TenantId , year : i32 , req : & ConfirmReportWarnings ,) -> Result < AnnualReportCheck >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [],
                "base": "i32",
                "name": "i32",
                "text": "i32"
              }
            },
            {
              "pattern": "req",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "ConfirmReportWarnings",
                    "name": "ConfirmReportWarnings",
                    "text": "ConfirmReportWarnings"
                  }
                ],
                "name": "reference",
                "text": "& ConfirmReportWarnings"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AnnualReportCheck",
                "name": "AnnualReportCheck",
                "text": "AnnualReportCheck"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AnnualReportCheck >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "reports::preview",
      "method": "POST",
      "path": "/api/t/{tid}/reports/{year}/preview",
      "id": "post_t_tid_reports_year_preview",
      "source": "crates/kc-api/src/reports.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "year",
          "schema": {
            "type": "integer",
            "format": "i32"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/ReportPreviewRequest"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AnnualReportPreview"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "preview_annual_report",
          "signature": "async fn preview_annual_report (& self , tid : TenantId , year : i32 , req : & ReportPreviewRequest ,) -> Result < AnnualReportPreview >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [],
                "base": "i32",
                "name": "i32",
                "text": "i32"
              }
            },
            {
              "pattern": "req",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "ReportPreviewRequest",
                    "name": "ReportPreviewRequest",
                    "text": "ReportPreviewRequest"
                  }
                ],
                "name": "reference",
                "text": "& ReportPreviewRequest"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AnnualReportPreview",
                "name": "AnnualReportPreview",
                "text": "AnnualReportPreview"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AnnualReportPreview >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "control::responsible",
      "method": "GET",
      "path": "/api/t/{tid}/responsible",
      "id": "get_t_tid_responsible",
      "source": "crates/kc-api/src/control.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ResponsiblePerson"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "responsible",
          "signature": "async fn responsible (& self , tid : TenantId) -> Result < Vec < ResponsiblePerson > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "ResponsiblePerson",
                    "name": "ResponsiblePerson",
                    "text": "ResponsiblePerson"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < ResponsiblePerson >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < ResponsiblePerson > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "control::add_responsible",
      "method": "POST",
      "path": "/api/t/{tid}/responsible",
      "id": "post_t_tid_responsible",
      "source": "crates/kc-api/src/control.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewResponsiblePerson"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ResponsiblePerson"
          }
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_responsible",
          "signature": "async fn add_responsible (& self , tid : TenantId , p : & NewResponsiblePerson ,) -> Result < Vec < ResponsiblePerson > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "p",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewResponsiblePerson",
                    "name": "NewResponsiblePerson",
                    "text": "NewResponsiblePerson"
                  }
                ],
                "name": "reference",
                "text": "& NewResponsiblePerson"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "ResponsiblePerson",
                    "name": "ResponsiblePerson",
                    "text": "ResponsiblePerson"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < ResponsiblePerson >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < ResponsiblePerson > >"
          }
        }
      ],
      "errors": [
        "license_required",
        "missing_name"
      ]
    },
    {
      "handler": "retail_book::receipt_sheets",
      "method": "GET",
      "path": "/api/t/{tid}/retail-receipt-sheets",
      "id": "get_t_tid_retail_receipt_sheets",
      "source": "crates/kc-api/src/retail_book.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::retail_book::BookQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ReceiptSheets"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "retail_receipt_sheets",
          "signature": "async fn retail_receipt_sheets (& self , tid : TenantId , warehouse : WarehouseId , year : Option < i32 > ,) -> Result < ReceiptSheets >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "warehouse",
              "type": {
                "args": [],
                "base": "WarehouseId",
                "name": "WarehouseId",
                "text": "WarehouseId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ReceiptSheets",
                "name": "ReceiptSheets",
                "text": "ReceiptSheets"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ReceiptSheets >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "retail_book::retail_record",
      "method": "GET",
      "path": "/api/t/{tid}/retail-records",
      "id": "get_t_tid_retail_records",
      "source": "crates/kc-api/src/retail_book.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::retail_book::BookQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/RetailRecord"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "retail_record",
          "signature": "async fn retail_record (& self , tid : TenantId , warehouse : WarehouseId , year : Option < i32 > ,) -> Result < RetailRecord >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "warehouse",
              "type": {
                "args": [],
                "base": "WarehouseId",
                "name": "WarehouseId",
                "text": "WarehouseId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "RetailRecord",
                "name": "RetailRecord",
                "text": "RetailRecord"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < RetailRecord >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "invoices::sales",
      "method": "GET",
      "path": "/api/t/{tid}/sales",
      "id": "get_t_tid_sales",
      "source": "crates/kc-api/src/invoices.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Sale"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "sales",
          "signature": "async fn sales (& self , tid : TenantId) -> Result < Vec < Sale > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "Sale",
                    "name": "Sale",
                    "text": "Sale"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < Sale >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < Sale > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "invoices::issue_sale",
      "method": "POST",
      "path": "/api/t/{tid}/sales",
      "id": "post_t_tid_sales",
      "source": "crates/kc-api/src/invoices.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/IssueSale"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/InvoiceId"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "issue_sale",
          "signature": "async fn issue_sale (& self , tid : TenantId , req : & IssueSale) -> Result < InvoiceId >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "req",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "IssueSale",
                    "name": "IssueSale",
                    "text": "IssueSale"
                  }
                ],
                "name": "reference",
                "text": "& IssueSale"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "InvoiceId",
                "name": "InvoiceId",
                "text": "InvoiceId"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < InvoiceId >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "sales_documents::list",
      "method": "GET",
      "path": "/api/t/{tid}/sales-documents",
      "id": "get_t_tid_sales_documents",
      "source": "crates/kc-api/src/sales_documents.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::sales_documents::ListQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SalesDocument"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "sales_documents",
          "signature": "async fn sales_documents (& self , tid : TenantId , kind : Option < SalesDocKind > ,) -> Result < Vec < SalesDocument > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "kind",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "SalesDocKind",
                    "name": "SalesDocKind",
                    "text": "SalesDocKind"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < SalesDocKind >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "SalesDocument",
                    "name": "SalesDocument",
                    "text": "SalesDocument"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < SalesDocument >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < SalesDocument > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "sales_documents::create",
      "method": "POST",
      "path": "/api/t/{tid}/sales-documents",
      "id": "post_t_tid_sales_documents",
      "source": "crates/kc-api/src/sales_documents.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewSalesDocument"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SalesDocument"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_sales_document",
          "signature": "async fn create_sales_document (& self , tid : TenantId , n : & NewSalesDocument ,) -> Result < SalesDocument >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewSalesDocument",
                    "name": "NewSalesDocument",
                    "text": "NewSalesDocument"
                  }
                ],
                "name": "reference",
                "text": "& NewSalesDocument"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SalesDocument",
                "name": "SalesDocument",
                "text": "SalesDocument"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SalesDocument >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "sales_documents::get_one",
      "method": "GET",
      "path": "/api/t/{tid}/sales-documents/{id}",
      "id": "get_t_tid_sales_documents_id",
      "source": "crates/kc-api/src/sales_documents.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SalesDocument"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "sales_document",
          "signature": "async fn sales_document (& self , tid : TenantId , id : SalesDocumentId ,) -> Result < SalesDocument >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "SalesDocumentId",
                "name": "SalesDocumentId",
                "text": "SalesDocumentId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SalesDocument",
                "name": "SalesDocument",
                "text": "SalesDocument"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SalesDocument >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "sales_documents::accept",
      "method": "POST",
      "path": "/api/t/{tid}/sales-documents/{id}/accept",
      "id": "post_t_tid_sales_documents_id_accept",
      "source": "crates/kc-api/src/sales_documents.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SalesDocumentAction"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SalesDocument"
        },
        "statuses": [
          200
        ]
      },
      "rust": [],
      "errors": []
    },
    {
      "handler": "sales_documents::cancel",
      "method": "POST",
      "path": "/api/t/{tid}/sales-documents/{id}/cancel",
      "id": "post_t_tid_sales_documents_id_cancel",
      "source": "crates/kc-api/src/sales_documents.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SalesDocumentAction"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SalesDocument"
        },
        "statuses": [
          200
        ]
      },
      "rust": [],
      "errors": []
    },
    {
      "handler": "sales_documents::confirm",
      "method": "POST",
      "path": "/api/t/{tid}/sales-documents/{id}/confirm",
      "id": "post_t_tid_sales_documents_id_confirm",
      "source": "crates/kc-api/src/sales_documents.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SalesDocumentAction"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SalesDocument"
        },
        "statuses": [
          200
        ]
      },
      "rust": [],
      "errors": []
    },
    {
      "handler": "sales_documents::convert",
      "method": "POST",
      "path": "/api/t/{tid}/sales-documents/{id}/convert",
      "id": "post_t_tid_sales_documents_id_convert",
      "source": "crates/kc-api/src/sales_documents.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/ConvertSalesDocument"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SalesConversion"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "convert_sales_document",
          "signature": "async fn convert_sales_document (& self , tid : TenantId , id : SalesDocumentId , r : & ConvertSalesDocument ,) -> Result < SalesConversion >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "SalesDocumentId",
                "name": "SalesDocumentId",
                "text": "SalesDocumentId"
              }
            },
            {
              "pattern": "r",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "ConvertSalesDocument",
                    "name": "ConvertSalesDocument",
                    "text": "ConvertSalesDocument"
                  }
                ],
                "name": "reference",
                "text": "& ConvertSalesDocument"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SalesConversion",
                "name": "SalesConversion",
                "text": "SalesConversion"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SalesConversion >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "sales_documents::issue",
      "method": "POST",
      "path": "/api/t/{tid}/sales-documents/{id}/issue",
      "id": "post_t_tid_sales_documents_id_issue",
      "source": "crates/kc-api/src/sales_documents.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/IssueSalesDocument"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SalesDocument"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "issue_sales_document",
          "signature": "async fn issue_sales_document (& self , tid : TenantId , id : SalesDocumentId , r : & IssueSalesDocument ,) -> Result < SalesDocument >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "SalesDocumentId",
                "name": "SalesDocumentId",
                "text": "SalesDocumentId"
              }
            },
            {
              "pattern": "r",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "IssueSalesDocument",
                    "name": "IssueSalesDocument",
                    "text": "IssueSalesDocument"
                  }
                ],
                "name": "reference",
                "text": "& IssueSalesDocument"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SalesDocument",
                "name": "SalesDocument",
                "text": "SalesDocument"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SalesDocument >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "sales_documents::payment",
      "method": "POST",
      "path": "/api/t/{tid}/sales-documents/{id}/payment",
      "id": "post_t_tid_sales_documents_id_payment",
      "source": "crates/kc-api/src/sales_documents.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SalesDocumentPayment"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SalesDocument"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "sales_document_payment",
          "signature": "async fn sales_document_payment (& self , tid : TenantId , id : SalesDocumentId , p : & SalesDocumentPayment ,) -> Result < SalesDocument >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "SalesDocumentId",
                "name": "SalesDocumentId",
                "text": "SalesDocumentId"
              }
            },
            {
              "pattern": "p",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "SalesDocumentPayment",
                    "name": "SalesDocumentPayment",
                    "text": "SalesDocumentPayment"
                  }
                ],
                "name": "reference",
                "text": "& SalesDocumentPayment"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SalesDocument",
                "name": "SalesDocument",
                "text": "SalesDocument"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SalesDocument >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "sales_documents::pdf",
      "method": "GET",
      "path": "/api/t/{tid}/sales-documents/{id}/pdf",
      "id": "get_t_tid_sales_documents_id_pdf",
      "source": "crates/kc-api/src/sales_documents.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/pdf",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "sales_document_pdf",
          "signature": "async fn sales_document_pdf (& self , tid : TenantId , id : SalesDocumentId) -> Result < Vec < u8 > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "SalesDocumentId",
                "name": "SalesDocumentId",
                "text": "SalesDocumentId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < u8 > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "sales_documents::reject",
      "method": "POST",
      "path": "/api/t/{tid}/sales-documents/{id}/reject",
      "id": "post_t_tid_sales_documents_id_reject",
      "source": "crates/kc-api/src/sales_documents.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SalesDocumentAction"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SalesDocument"
        },
        "statuses": [
          200
        ]
      },
      "rust": [],
      "errors": []
    },
    {
      "handler": "sales_documents::revise",
      "method": "POST",
      "path": "/api/t/{tid}/sales-documents/{id}/versions",
      "id": "post_t_tid_sales_documents_id_versions",
      "source": "crates/kc-api/src/sales_documents.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/ReviseSalesDocument"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SalesDocument"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "revise_sales_document",
          "signature": "async fn revise_sales_document (& self , tid : TenantId , id : SalesDocumentId , r : & ReviseSalesDocument ,) -> Result < SalesDocument >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "SalesDocumentId",
                "name": "SalesDocumentId",
                "text": "SalesDocumentId"
              }
            },
            {
              "pattern": "r",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "ReviseSalesDocument",
                    "name": "ReviseSalesDocument",
                    "text": "ReviseSalesDocument"
                  }
                ],
                "name": "reference",
                "text": "& ReviseSalesDocument"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SalesDocument",
                "name": "SalesDocument",
                "text": "SalesDocument"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SalesDocument >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "invoices::sale_cost_centers",
      "method": "GET",
      "path": "/api/t/{tid}/sales/cost-centers",
      "id": "get_t_tid_sales_cost_centers",
      "source": "crates/kc-api/src/invoices.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CostCenter"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "sale_cost_centers",
          "signature": "async fn sale_cost_centers (& self , tid : TenantId) -> Result < Vec < CostCenter > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "CostCenter",
                    "name": "CostCenter",
                    "text": "CostCenter"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < CostCenter >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < CostCenter > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "invoices::sale_customers",
      "method": "GET",
      "path": "/api/t/{tid}/sales/customers",
      "id": "get_t_tid_sales_customers",
      "source": "crates/kc-api/src/invoices.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SaleCustomer"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "sale_customers",
          "signature": "async fn sale_customers (& self , tid : TenantId) -> Result < Vec < SaleCustomer > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "SaleCustomer",
                    "name": "SaleCustomer",
                    "text": "SaleCustomer"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < SaleCustomer >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < SaleCustomer > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "invoices::sale_detail",
      "method": "GET",
      "path": "/api/t/{tid}/sales/{id}",
      "id": "get_t_tid_sales_id",
      "source": "crates/kc-api/src/invoices.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::invoices::SaleQuery"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SaleDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "sale_summary",
          "signature": "async fn sale_summary (& self , tid : TenantId , id : InvoiceId) -> Result < SaleDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "InvoiceId",
                "name": "InvoiceId",
                "text": "InvoiceId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SaleDetail",
                "name": "SaleDetail",
                "text": "SaleDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SaleDetail >"
          }
        },
        {
          "name": "sale_detail",
          "signature": "async fn sale_detail (& self , tid : TenantId , id : InvoiceId) -> Result < SaleDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "InvoiceId",
                "name": "InvoiceId",
                "text": "InvoiceId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SaleDetail",
                "name": "SaleDetail",
                "text": "SaleDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SaleDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "invoices::attach_sale",
      "method": "POST",
      "path": "/api/t/{tid}/sales/{id}/attachments",
      "id": "post_t_tid_sales_id_attachments",
      "source": "crates/kc-api/src/invoices.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "type": "string",
        "format": "binary"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/AttachmentMeta"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "attach_sale",
          "signature": "async fn attach_sale (& self , tid : TenantId , id : InvoiceId , name : & str , mime : & str , bytes : Vec < u8 > ,) -> Result < AttachmentMeta >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "InvoiceId",
                "name": "InvoiceId",
                "text": "InvoiceId"
              }
            },
            {
              "pattern": "name",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "mime",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            },
            {
              "pattern": "bytes",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "AttachmentMeta",
                "name": "AttachmentMeta",
                "text": "AttachmentMeta"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < AttachmentMeta >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "invoices::sale_file",
      "method": "GET",
      "path": "/api/t/{tid}/sales/{id}/attachments/{aid}",
      "id": "get_t_tid_sales_id_attachments_aid",
      "source": "crates/kc-api/src/invoices.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        },
        {
          "name": "aid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/octet-stream",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "sale_file",
          "signature": "async fn sale_file (& self , tid : TenantId , id : InvoiceId , aid : AttachmentId ,) -> Result < Download >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "InvoiceId",
                "name": "InvoiceId",
                "text": "InvoiceId"
              }
            },
            {
              "pattern": "aid",
              "type": {
                "args": [],
                "base": "AttachmentId",
                "name": "AttachmentId",
                "text": "AttachmentId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Download",
                "name": "Download",
                "text": "Download"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Download >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "invoices::post_sale",
      "method": "POST",
      "path": "/api/t/{tid}/sales/{id}/post",
      "id": "post_t_tid_sales_id_post",
      "source": "crates/kc-api/src/invoices.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Invoice"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "post_sale",
          "signature": "async fn post_sale (& self , tid : TenantId , id : InvoiceId) -> Result < Invoice >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "InvoiceId",
                "name": "InvoiceId",
                "text": "InvoiceId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Invoice",
                "name": "Invoice",
                "text": "Invoice"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Invoice >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "schemes::list",
      "method": "GET",
      "path": "/api/t/{tid}/schemes",
      "id": "get_t_tid_schemes",
      "source": "crates/kc-api/src/schemes.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Scheme"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "schemes",
          "signature": "async fn schemes (& self , tid : TenantId) -> Result < Vec < Scheme > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "Scheme",
                    "name": "Scheme",
                    "text": "Scheme"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < Scheme >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < Scheme > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "schemes::create",
      "method": "POST",
      "path": "/api/t/{tid}/schemes",
      "id": "post_t_tid_schemes",
      "source": "crates/kc-api/src/schemes.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewScheme"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Scheme"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_scheme",
          "signature": "async fn create_scheme (& self , tid : TenantId , s : & NewScheme) -> Result < Scheme >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "s",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewScheme",
                    "name": "NewScheme",
                    "text": "NewScheme"
                  }
                ],
                "name": "reference",
                "text": "& NewScheme"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Scheme",
                "name": "Scheme",
                "text": "Scheme"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Scheme >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "schemes::get_one",
      "method": "GET",
      "path": "/api/t/{tid}/schemes/{id}",
      "id": "get_t_tid_schemes_id",
      "source": "crates/kc-api/src/schemes.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/SchemeId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Scheme"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "scheme",
          "signature": "async fn scheme (& self , tid : TenantId , id : SchemeId) -> Result < Scheme >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "SchemeId",
                "name": "SchemeId",
                "text": "SchemeId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Scheme",
                "name": "Scheme",
                "text": "Scheme"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Scheme >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "schemes::deactivate",
      "method": "POST",
      "path": "/api/t/{tid}/schemes/{id}/deactivate",
      "id": "post_t_tid_schemes_id_deactivate",
      "source": "crates/kc-api/src/schemes.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/SchemeId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/DeactivateScheme"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Scheme"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "deactivate_scheme",
          "signature": "async fn deactivate_scheme (& self , tid : TenantId , id : SchemeId , d : & DeactivateScheme ,) -> Result < Scheme >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "SchemeId",
                "name": "SchemeId",
                "text": "SchemeId"
              }
            },
            {
              "pattern": "d",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "DeactivateScheme",
                    "name": "DeactivateScheme",
                    "text": "DeactivateScheme"
                  }
                ],
                "name": "reference",
                "text": "& DeactivateScheme"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Scheme",
                "name": "Scheme",
                "text": "Scheme"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Scheme >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "schemes::preview",
      "method": "POST",
      "path": "/api/t/{tid}/schemes/{id}/preview",
      "id": "post_t_tid_schemes_id_preview",
      "source": "crates/kc-api/src/schemes.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/SchemeId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/ApplyScheme"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SchemePreview"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "scheme_preview",
          "signature": "async fn scheme_preview (& self , tid : TenantId , id : SchemeId , a : & ApplyScheme ,) -> Result < SchemePreview >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "SchemeId",
                "name": "SchemeId",
                "text": "SchemeId"
              }
            },
            {
              "pattern": "a",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "ApplyScheme",
                    "name": "ApplyScheme",
                    "text": "ApplyScheme"
                  }
                ],
                "name": "reference",
                "text": "& ApplyScheme"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SchemePreview",
                "name": "SchemePreview",
                "text": "SchemePreview"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SchemePreview >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "schemes::new_version",
      "method": "POST",
      "path": "/api/t/{tid}/schemes/{id}/versions",
      "id": "post_t_tid_schemes_id_versions",
      "source": "crates/kc-api/src/schemes.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/SchemeId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewScheme"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Scheme"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "scheme_version",
          "signature": "async fn scheme_version (& self , tid : TenantId , id : SchemeId , s : & NewScheme ,) -> Result < Scheme >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "SchemeId",
                "name": "SchemeId",
                "text": "SchemeId"
              }
            },
            {
              "pattern": "s",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewScheme",
                    "name": "NewScheme",
                    "text": "NewScheme"
                  }
                ],
                "name": "reference",
                "text": "& NewScheme"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Scheme",
                "name": "Scheme",
                "text": "Scheme"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Scheme >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "signing::log",
      "method": "GET",
      "path": "/api/t/{tid}/signatures",
      "id": "get_t_tid_signatures",
      "source": "crates/kc-api/src/signing.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LocalSignature"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "local_signatures",
          "signature": "async fn local_signatures (& self , tid : TenantId) -> Result < Vec < LocalSignature > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "LocalSignature",
                    "name": "LocalSignature",
                    "text": "LocalSignature"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < LocalSignature >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < LocalSignature > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "signing::status",
      "method": "GET",
      "path": "/api/t/{tid}/signer",
      "id": "get_t_tid_signer",
      "source": "crates/kc-api/src/signing.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SignerStatus"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "signer_status",
          "signature": "async fn signer_status (& self , tid : TenantId) -> Result < SignerStatus >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SignerStatus",
                "name": "SignerStatus",
                "text": "SignerStatus"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SignerStatus >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "signing::companion",
      "method": "POST",
      "path": "/api/t/{tid}/signer/companion",
      "id": "post_t_tid_signer_companion",
      "source": "crates/kc-api/src/signing.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SignerCompanion"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "signer_companion",
          "signature": "async fn signer_companion (& self , tid : TenantId) -> Result < SignerCompanion >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SignerCompanion",
                "name": "SignerCompanion",
                "text": "SignerCompanion"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SignerCompanion >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "signing::next",
      "method": "GET",
      "path": "/api/t/{tid}/signer/next",
      "id": "get_t_tid_signer_next",
      "source": "crates/kc-api/src/signing.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::signing::NextQ"
      },
      "body": null,
      "auth": "SignerDb",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "anyOf": [
            {
              "$ref": "#/$defs/SigningRequest"
            },
            {
              "type": "null"
            }
          ]
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "signer_next",
          "signature": "async fn signer_next (& self , tid : TenantId , wait_secs : u64 ,) -> Result < Option < SigningRequest > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "wait_secs",
              "type": {
                "args": [],
                "base": "u64",
                "name": "u64",
                "text": "u64"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "SigningRequest",
                    "name": "SigningRequest",
                    "text": "SigningRequest"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < SigningRequest >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Option < SigningRequest > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "signing::reply",
      "method": "POST",
      "path": "/api/t/{tid}/signer/{id}",
      "id": "post_t_tid_signer_id",
      "source": "crates/kc-api/src/signing.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SigningReply"
      },
      "auth": "SignerDb",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SignerStatus"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "signer_reply",
          "signature": "async fn signer_reply (& self , tid : TenantId , id : SigningRequestId , signature : & [u8] ,) -> Result < SignerStatus >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "SigningRequestId",
                "name": "SigningRequestId",
                "text": "SigningRequestId"
              }
            },
            {
              "pattern": "signature",
              "type": {
                "args": [
                  {
                    "args": [
                      {
                        "args": [],
                        "base": "u8",
                        "name": "u8",
                        "text": "u8"
                      }
                    ],
                    "name": "slice",
                    "text": "[u8]"
                  }
                ],
                "name": "reference",
                "text": "& [u8]"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SignerStatus",
                "name": "SignerStatus",
                "text": "SignerStatus"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SignerStatus >"
          }
        },
        {
          "name": "signer_decline",
          "signature": "async fn signer_decline (& self , tid : TenantId , id : SigningRequestId , reason : & str ,) -> Result < SignerStatus >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "SigningRequestId",
                "name": "SigningRequestId",
                "text": "SigningRequestId"
              }
            },
            {
              "pattern": "reason",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SignerStatus",
                "name": "SignerStatus",
                "text": "SignerStatus"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SignerStatus >"
          }
        }
      ],
      "errors": [
        "bad_signature"
      ]
    },
    {
      "handler": "statistics::activity_rules",
      "method": "GET",
      "path": "/api/t/{tid}/statistics/activity-rules",
      "id": "get_t_tid_statistics_activity_rules",
      "source": "crates/kc-api/src/statistics.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StatActivityRule"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "stat_activity_rules",
          "signature": "async fn stat_activity_rules (& self , tid : TenantId) -> Result < Vec < StatActivityRule > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "StatActivityRule",
                    "name": "StatActivityRule",
                    "text": "StatActivityRule"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < StatActivityRule >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < StatActivityRule > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "statistics::add_activity_rule",
      "method": "POST",
      "path": "/api/t/{tid}/statistics/activity-rules",
      "id": "post_t_tid_statistics_activity_rules",
      "source": "crates/kc-api/src/statistics.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewStatActivityRule"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/StatActivityRule"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_stat_activity_rule",
          "signature": "async fn add_stat_activity_rule (& self , tid : TenantId , n : & NewStatActivityRule ,) -> Result < StatActivityRule >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewStatActivityRule",
                    "name": "NewStatActivityRule",
                    "text": "NewStatActivityRule"
                  }
                ],
                "name": "reference",
                "text": "& NewStatActivityRule"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "StatActivityRule",
                "name": "StatActivityRule",
                "text": "StatActivityRule"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < StatActivityRule >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "statistics::annual",
      "method": "GET",
      "path": "/api/t/{tid}/statistics/annual",
      "id": "get_t_tid_statistics_annual",
      "source": "crates/kc-api/src/statistics.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::statistics::YearQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/StatAnnual"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "stat_annual",
          "signature": "async fn stat_annual (& self , tid : TenantId , year : Option < i32 >) -> Result < StatAnnual >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "StatAnnual",
                "name": "StatAnnual",
                "text": "StatAnnual"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < StatAnnual >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "statistics::annual_csv",
      "method": "GET",
      "path": "/api/t/{tid}/statistics/annual/csv",
      "id": "get_t_tid_statistics_annual_csv",
      "source": "crates/kc-api/src/statistics.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::statistics::YearQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "text/csv",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "stat_annual_csv",
          "signature": "async fn stat_annual_csv (& self , tid : TenantId , year : Option < i32 >) -> Result < String >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "String",
                "name": "String",
                "text": "String"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < String >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "statistics::item_activities",
      "method": "GET",
      "path": "/api/t/{tid}/statistics/item-activities",
      "id": "get_t_tid_statistics_item_activities",
      "source": "crates/kc-api/src/statistics.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StatItemActivity"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "stat_item_activities",
          "signature": "async fn stat_item_activities (& self , tid : TenantId) -> Result < Vec < StatItemActivity > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "StatItemActivity",
                    "name": "StatItemActivity",
                    "text": "StatItemActivity"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < StatItemActivity >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < StatItemActivity > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "statistics::add_item_activity",
      "method": "POST",
      "path": "/api/t/{tid}/statistics/item-activities",
      "id": "post_t_tid_statistics_item_activities",
      "source": "crates/kc-api/src/statistics.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewStatItemActivity"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/StatItemActivity"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_stat_item_activity",
          "signature": "async fn add_stat_item_activity (& self , tid : TenantId , n : & NewStatItemActivity ,) -> Result < StatItemActivity >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewStatItemActivity",
                    "name": "NewStatItemActivity",
                    "text": "NewStatItemActivity"
                  }
                ],
                "name": "reference",
                "text": "& NewStatItemActivity"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "StatItemActivity",
                "name": "StatItemActivity",
                "text": "StatItemActivity"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < StatItemActivity >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "statistics::kipo",
      "method": "GET",
      "path": "/api/t/{tid}/statistics/kipo",
      "id": "get_t_tid_statistics_kipo",
      "source": "crates/kc-api/src/statistics.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::statistics::KipoQuery"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/KipoReport"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "kipo_report",
          "signature": "async fn kipo_report (& self , tid : TenantId , year : i32 , quarter : u8 , include_opening : bool ,) -> Result < KipoReport >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [],
                "base": "i32",
                "name": "i32",
                "text": "i32"
              }
            },
            {
              "pattern": "quarter",
              "type": {
                "args": [],
                "base": "u8",
                "name": "u8",
                "text": "u8"
              }
            },
            {
              "pattern": "include_opening",
              "type": {
                "args": [],
                "base": "bool",
                "name": "bool",
                "text": "bool"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "KipoReport",
                "name": "KipoReport",
                "text": "KipoReport"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < KipoReport >"
          }
        }
      ],
      "errors": [
        "period"
      ]
    },
    {
      "handler": "statistics::main_activities",
      "method": "GET",
      "path": "/api/t/{tid}/statistics/main-activities",
      "id": "get_t_tid_statistics_main_activities",
      "source": "crates/kc-api/src/statistics.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StatMainActivity"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "stat_main_activities",
          "signature": "async fn stat_main_activities (& self , tid : TenantId) -> Result < Vec < StatMainActivity > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "StatMainActivity",
                    "name": "StatMainActivity",
                    "text": "StatMainActivity"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < StatMainActivity >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < StatMainActivity > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "statistics::add_main_activity",
      "method": "POST",
      "path": "/api/t/{tid}/statistics/main-activities",
      "id": "post_t_tid_statistics_main_activities",
      "source": "crates/kc-api/src/statistics.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewStatMainActivity"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/StatMainActivity"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_stat_main_activity",
          "signature": "async fn add_stat_main_activity (& self , tid : TenantId , n : & NewStatMainActivity ,) -> Result < StatMainActivity >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewStatMainActivity",
                    "name": "NewStatMainActivity",
                    "text": "NewStatMainActivity"
                  }
                ],
                "name": "reference",
                "text": "& NewStatMainActivity"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "StatMainActivity",
                "name": "StatMainActivity",
                "text": "StatMainActivity"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < StatMainActivity >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "statistics::payroll",
      "method": "GET",
      "path": "/api/t/{tid}/statistics/payroll",
      "id": "get_t_tid_statistics_payroll",
      "source": "crates/kc-api/src/statistics.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::statistics::PayrollQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StatPayrollPeriod"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "stat_payroll",
          "signature": "async fn stat_payroll (& self , tid : TenantId , year : Option < i32 > , quarterly : bool ,) -> Result < Vec < StatPayrollPeriod > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            },
            {
              "pattern": "quarterly",
              "type": {
                "args": [],
                "base": "bool",
                "name": "bool",
                "text": "bool"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "StatPayrollPeriod",
                    "name": "StatPayrollPeriod",
                    "text": "StatPayrollPeriod"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < StatPayrollPeriod >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < StatPayrollPeriod > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::card",
      "method": "GET",
      "path": "/api/t/{tid}/stock/card",
      "id": "get_t_tid_stock_card",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::stock::CardQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/StockCard"
        },
        "statuses": [
          200
        ]
      },
      "rust": [],
      "errors": []
    },
    {
      "handler": "stock::documents",
      "method": "GET",
      "path": "/api/t/{tid}/stock/documents",
      "id": "get_t_tid_stock_documents",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::stock::YearQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StockDocSummary"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "stock_documents",
          "signature": "async fn stock_documents (& self , tid : TenantId , year : Option < i32 > ,) -> Result < Vec < StockDocSummary > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "StockDocSummary",
                    "name": "StockDocSummary",
                    "text": "StockDocSummary"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < StockDocSummary >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < StockDocSummary > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::create_document",
      "method": "POST",
      "path": "/api/t/{tid}/stock/documents",
      "id": "post_t_tid_stock_documents",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewStockDoc"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/StockDoc"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_stock_document",
          "signature": "async fn create_stock_document (& self , tid : TenantId , d : & NewStockDoc) -> Result < StockDoc >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "d",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewStockDoc",
                    "name": "NewStockDoc",
                    "text": "NewStockDoc"
                  }
                ],
                "name": "reference",
                "text": "& NewStockDoc"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "StockDoc",
                "name": "StockDoc",
                "text": "StockDoc"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < StockDoc >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::document",
      "method": "GET",
      "path": "/api/t/{tid}/stock/documents/{id}",
      "id": "get_t_tid_stock_documents_id",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/StockDocId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/StockDoc"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "stock_document",
          "signature": "async fn stock_document (& self , tid : TenantId , id : StockDocId) -> Result < StockDoc >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "StockDocId",
                "name": "StockDocId",
                "text": "StockDocId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "StockDoc",
                "name": "StockDoc",
                "text": "StockDoc"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < StockDoc >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::cancel_document",
      "method": "POST",
      "path": "/api/t/{tid}/stock/documents/{id}/cancel",
      "id": "post_t_tid_stock_documents_id_cancel",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/StockDocId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelStockDoc"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/StockDoc"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cancel_stock_document",
          "signature": "async fn cancel_stock_document (& self , tid : TenantId , id : StockDocId , reason : & str ,) -> Result < StockDoc >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "StockDocId",
                "name": "StockDocId",
                "text": "StockDocId"
              }
            },
            {
              "pattern": "reason",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "StockDoc",
                "name": "StockDoc",
                "text": "StockDoc"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < StockDoc >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::document_overview",
      "method": "GET",
      "path": "/api/t/{tid}/stock/documents/{id}/overview",
      "id": "get_t_tid_stock_documents_id_overview",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/StockDocId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/StockDocOverview"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "stock_document_overview",
          "signature": "async fn stock_document_overview (& self , tid : TenantId , id : StockDocId ,) -> Result < StockDocOverview >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "StockDocId",
                "name": "StockDocId",
                "text": "StockDocId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "StockDocOverview",
                "name": "StockDocOverview",
                "text": "StockDocOverview"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < StockDocOverview >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::post_document",
      "method": "POST",
      "path": "/api/t/{tid}/stock/documents/{id}/post",
      "id": "post_t_tid_stock_documents_id_post",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/StockDocId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/StockPostResult"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "post_stock_document",
          "signature": "async fn post_stock_document (& self , tid : TenantId , id : StockDocId ,) -> Result < StockPostResult >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "StockDocId",
                "name": "StockDocId",
                "text": "StockDocId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "StockPostResult",
                "name": "StockPostResult",
                "text": "StockPostResult"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < StockPostResult >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::storno_document",
      "method": "POST",
      "path": "/api/t/{tid}/stock/documents/{id}/storno",
      "id": "post_t_tid_stock_documents_id_storno",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/StockDocId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/StornoStockDoc"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/StockPostResult"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "storno_stock_document",
          "signature": "async fn storno_stock_document (& self , tid : TenantId , id : StockDocId , date : NaiveDate , reason : & str ,) -> Result < StockPostResult >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "StockDocId",
                "name": "StockDocId",
                "text": "StockDocId"
              }
            },
            {
              "pattern": "date",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            },
            {
              "pattern": "reason",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "StockPostResult",
                "name": "StockPostResult",
                "text": "StockPostResult"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < StockPostResult >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "einvoice_receipts::list_maps",
      "method": "GET",
      "path": "/api/t/{tid}/stock/item-maps",
      "id": "get_t_tid_stock_item_maps",
      "source": "crates/kc-api/src/einvoice_receipts.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::einvoice_receipts::MapsQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StockItemMap"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "stock_item_maps",
          "signature": "async fn stock_item_maps (& self , tid : TenantId , partner : Option < PartnerId > , all : bool ,) -> Result < Vec < StockItemMap > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "partner",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "PartnerId",
                    "name": "PartnerId",
                    "text": "PartnerId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < PartnerId >"
              }
            },
            {
              "pattern": "all",
              "type": {
                "args": [],
                "base": "bool",
                "name": "bool",
                "text": "bool"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "StockItemMap",
                    "name": "StockItemMap",
                    "text": "StockItemMap"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < StockItemMap >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < StockItemMap > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "einvoice_receipts::create_map",
      "method": "POST",
      "path": "/api/t/{tid}/stock/item-maps",
      "id": "post_t_tid_stock_item_maps",
      "source": "crates/kc-api/src/einvoice_receipts.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewStockItemMap"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/StockItemMap"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_stock_item_map",
          "signature": "async fn create_stock_item_map (& self , tid : TenantId , n : & NewStockItemMap ,) -> Result < StockItemMap >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewStockItemMap",
                    "name": "NewStockItemMap",
                    "text": "NewStockItemMap"
                  }
                ],
                "name": "reference",
                "text": "& NewStockItemMap"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "StockItemMap",
                "name": "StockItemMap",
                "text": "StockItemMap"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < StockItemMap >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "einvoice_receipts::deactivate_map",
      "method": "POST",
      "path": "/api/t/{tid}/stock/item-maps/{id}/deactivate",
      "id": "post_t_tid_stock_item_maps_id_deactivate",
      "source": "crates/kc-api/src/einvoice_receipts.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/DeactivateStockItemMap"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/StockItemMap"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "deactivate_stock_item_map",
          "signature": "async fn deactivate_stock_item_map (& self , tid : TenantId , id : StockItemMapId , reason : & str ,) -> Result < StockItemMap >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "StockItemMapId",
                "name": "StockItemMapId",
                "text": "StockItemMapId"
              }
            },
            {
              "pattern": "reason",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "StockItemMap",
                "name": "StockItemMap",
                "text": "StockItemMap"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < StockItemMap >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::items",
      "method": "GET",
      "path": "/api/t/{tid}/stock/items",
      "id": "get_t_tid_stock_items",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Item"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "items",
          "signature": "async fn items (& self , tid : TenantId) -> Result < Vec < Item > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "Item",
                    "name": "Item",
                    "text": "Item"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < Item >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < Item > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::create_item",
      "method": "POST",
      "path": "/api/t/{tid}/stock/items",
      "id": "post_t_tid_stock_items",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewItem"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Item"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_item",
          "signature": "async fn create_item (& self , tid : TenantId , i : & NewItem) -> Result < Item >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "i",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewItem",
                    "name": "NewItem",
                    "text": "NewItem"
                  }
                ],
                "name": "reference",
                "text": "& NewItem"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Item",
                "name": "Item",
                "text": "Item"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Item >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::item",
      "method": "GET",
      "path": "/api/t/{tid}/stock/items/{id}",
      "id": "get_t_tid_stock_items_id",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/ItemId"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::stock::ItemQuery"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Item"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "item",
          "signature": "async fn item (& self , tid : TenantId , id : ItemId) -> Result < Item >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "ItemId",
                "name": "ItemId",
                "text": "ItemId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Item",
                "name": "Item",
                "text": "Item"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Item >"
          }
        },
        {
          "name": "stock_item_summary",
          "signature": "async fn stock_item_summary (& self , tid : TenantId , id : ItemId) -> Result < Item >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "ItemId",
                "name": "ItemId",
                "text": "ItemId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Item",
                "name": "Item",
                "text": "Item"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Item >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::change_item",
      "method": "POST",
      "path": "/api/t/{tid}/stock/items/{id}",
      "id": "post_t_tid_stock_items_id",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/ItemId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/ItemChange"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Item"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "change_item",
          "signature": "async fn change_item (& self , tid : TenantId , id : ItemId , c : & ItemChange) -> Result < Item >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "ItemId",
                "name": "ItemId",
                "text": "ItemId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "ItemChange",
                    "name": "ItemChange",
                    "text": "ItemChange"
                  }
                ],
                "name": "reference",
                "text": "& ItemChange"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Item",
                "name": "Item",
                "text": "Item"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Item >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::list",
      "method": "GET",
      "path": "/api/t/{tid}/stock/list",
      "id": "get_t_tid_stock_list",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::stock::ListQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StockListRow"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "stock_list",
          "signature": "async fn stock_list (& self , tid : TenantId , warehouse : Option < WarehouseId > , date : Option < NaiveDate > ,) -> Result < Vec < StockListRow > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "warehouse",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "WarehouseId",
                    "name": "WarehouseId",
                    "text": "WarehouseId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < WarehouseId >"
              }
            },
            {
              "pattern": "date",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "StockListRow",
                    "name": "StockListRow",
                    "text": "StockListRow"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < StockListRow >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < StockListRow > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::params",
      "method": "GET",
      "path": "/api/t/{tid}/stock/parameters",
      "id": "get_t_tid_stock_parameters",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StockParam"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "stock_params",
          "signature": "async fn stock_params (& self , tid : TenantId) -> Result < Vec < StockParam > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "StockParam",
                    "name": "StockParam",
                    "text": "StockParam"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < StockParam >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < StockParam > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::set_param",
      "method": "POST",
      "path": "/api/t/{tid}/stock/parameters",
      "id": "post_t_tid_stock_parameters",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewStockParam"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StockParam"
          }
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "set_stock_param",
          "signature": "async fn set_stock_param (& self , tid : TenantId , p : & NewStockParam ,) -> Result < Vec < StockParam > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "p",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewStockParam",
                    "name": "NewStockParam",
                    "text": "NewStockParam"
                  }
                ],
                "name": "reference",
                "text": "& NewStockParam"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "StockParam",
                    "name": "StockParam",
                    "text": "StockParam"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < StockParam >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < StockParam > >"
          }
        }
      ],
      "errors": [
        "bad_stock_param"
      ]
    },
    {
      "handler": "stock_production::orders",
      "method": "GET",
      "path": "/api/t/{tid}/stock/production",
      "id": "get_t_tid_stock_production",
      "source": "crates/kc-api/src/stock_production.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ProductionOrder"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "production_orders",
          "signature": "async fn production_orders (& self , tid : TenantId) -> Result < Vec < ProductionOrder > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "ProductionOrder",
                    "name": "ProductionOrder",
                    "text": "ProductionOrder"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < ProductionOrder >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < ProductionOrder > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock_production::start",
      "method": "POST",
      "path": "/api/t/{tid}/stock/production",
      "id": "post_t_tid_stock_production",
      "source": "crates/kc-api/src/stock_production.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewProductionOrder"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ProductionOrder"
        },
        "statuses": [
          200,
          201
        ]
      },
      "rust": [
        {
          "name": "start_production",
          "signature": "async fn start_production (& self , tid : TenantId , n : & NewProductionOrder ,) -> Result < ProductionOrder >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewProductionOrder",
                    "name": "NewProductionOrder",
                    "text": "NewProductionOrder"
                  }
                ],
                "name": "reference",
                "text": "& NewProductionOrder"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ProductionOrder",
                "name": "ProductionOrder",
                "text": "ProductionOrder"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ProductionOrder >"
          }
        }
      ],
      "errors": [
        "production_key_reused"
      ]
    },
    {
      "handler": "stock_production::finish",
      "method": "POST",
      "path": "/api/t/{tid}/stock/production/{id}/receipt",
      "id": "post_t_tid_stock_production_id_receipt",
      "source": "crates/kc-api/src/stock_production.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "type": "string",
        "format": "date"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ProductionOrder"
        },
        "statuses": [
          200,
          201
        ]
      },
      "rust": [
        {
          "name": "finish_production",
          "signature": "async fn finish_production (& self , tid : TenantId , id : ProductionOrderId , date : NaiveDate ,) -> Result < ProductionOrder >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "ProductionOrderId",
                "name": "ProductionOrderId",
                "text": "ProductionOrderId"
              }
            },
            {
              "pattern": "date",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ProductionOrder",
                "name": "ProductionOrder",
                "text": "ProductionOrder"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ProductionOrder >"
          }
        }
      ],
      "errors": [
        "production_received"
      ]
    },
    {
      "handler": "stock_production::recipes",
      "method": "GET",
      "path": "/api/t/{tid}/stock/recipes",
      "id": "get_t_tid_stock_recipes",
      "source": "crates/kc-api/src/stock_production.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ProductionRecipe"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "production_recipes",
          "signature": "async fn production_recipes (& self , tid : TenantId) -> Result < Vec < ProductionRecipe > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "ProductionRecipe",
                    "name": "ProductionRecipe",
                    "text": "ProductionRecipe"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < ProductionRecipe >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < ProductionRecipe > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock_production::add_recipe",
      "method": "POST",
      "path": "/api/t/{tid}/stock/recipes",
      "id": "post_t_tid_stock_recipes",
      "source": "crates/kc-api/src/stock_production.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewRecipe"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ProductionRecipe"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_recipe",
          "signature": "async fn create_recipe (& self , tid : TenantId , n : & NewRecipe) -> Result < ProductionRecipe >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewRecipe",
                    "name": "NewRecipe",
                    "text": "NewRecipe"
                  }
                ],
                "name": "reference",
                "text": "& NewRecipe"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ProductionRecipe",
                "name": "ProductionRecipe",
                "text": "ProductionRecipe"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ProductionRecipe >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::recon",
      "method": "GET",
      "path": "/api/t/{tid}/stock/reconciliation",
      "id": "get_t_tid_stock_reconciliation",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::stock::DateQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StockRecon"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "stock_reconciliation",
          "signature": "async fn stock_reconciliation (& self , tid : TenantId , date : Option < NaiveDate > ,) -> Result < Vec < StockRecon > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "date",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "StockRecon",
                    "name": "StockRecon",
                    "text": "StockRecon"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < StockRecon >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < StockRecon > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::warehouses",
      "method": "GET",
      "path": "/api/t/{tid}/stock/warehouses",
      "id": "get_t_tid_stock_warehouses",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Warehouse"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "warehouses",
          "signature": "async fn warehouses (& self , tid : TenantId) -> Result < Vec < Warehouse > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "Warehouse",
                    "name": "Warehouse",
                    "text": "Warehouse"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < Warehouse >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < Warehouse > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::create_warehouse",
      "method": "POST",
      "path": "/api/t/{tid}/stock/warehouses",
      "id": "post_t_tid_stock_warehouses",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewWarehouse"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Warehouse"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_warehouse",
          "signature": "async fn create_warehouse (& self , tid : TenantId , w : & NewWarehouse) -> Result < Warehouse >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "w",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewWarehouse",
                    "name": "NewWarehouse",
                    "text": "NewWarehouse"
                  }
                ],
                "name": "reference",
                "text": "& NewWarehouse"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Warehouse",
                "name": "Warehouse",
                "text": "Warehouse"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Warehouse >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::change_warehouse",
      "method": "POST",
      "path": "/api/t/{tid}/stock/warehouses/{id}",
      "id": "post_t_tid_stock_warehouses_id",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/WarehouseId"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/WarehouseChange"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Warehouse"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "change_warehouse",
          "signature": "async fn change_warehouse (& self , tid : TenantId , id : WarehouseId , c : & WarehouseChange ,) -> Result < Warehouse >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "WarehouseId",
                "name": "WarehouseId",
                "text": "WarehouseId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "WarehouseChange",
                    "name": "WarehouseChange",
                    "text": "WarehouseChange"
                  }
                ],
                "name": "reference",
                "text": "& WarehouseChange"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Warehouse",
                "name": "Warehouse",
                "text": "Warehouse"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Warehouse >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::stocktakes",
      "method": "GET",
      "path": "/api/t/{tid}/stocktakes",
      "id": "get_t_tid_stocktakes",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StocktakeSummary"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "stocktakes",
          "signature": "async fn stocktakes (& self , tid : TenantId) -> Result < Vec < StocktakeSummary > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "StocktakeSummary",
                    "name": "StocktakeSummary",
                    "text": "StocktakeSummary"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < StocktakeSummary >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < StocktakeSummary > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::create_stocktake",
      "method": "POST",
      "path": "/api/t/{tid}/stocktakes",
      "id": "post_t_tid_stocktakes",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewStocktake"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Stocktake"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_stocktake",
          "signature": "async fn create_stocktake (& self , tid : TenantId , n : & NewStocktake) -> Result < Stocktake >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewStocktake",
                    "name": "NewStocktake",
                    "text": "NewStocktake"
                  }
                ],
                "name": "reference",
                "text": "& NewStocktake"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Stocktake",
                "name": "Stocktake",
                "text": "Stocktake"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Stocktake >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::stocktake",
      "method": "GET",
      "path": "/api/t/{tid}/stocktakes/{id}",
      "id": "get_t_tid_stocktakes_id",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/StocktakeId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Stocktake"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "stocktake",
          "signature": "async fn stocktake (& self , tid : TenantId , id : StocktakeId) -> Result < Stocktake >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "StocktakeId",
                "name": "StocktakeId",
                "text": "StocktakeId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Stocktake",
                "name": "Stocktake",
                "text": "Stocktake"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Stocktake >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::count",
      "method": "POST",
      "path": "/api/t/{tid}/stocktakes/{id}/counts",
      "id": "post_t_tid_stocktakes_id_counts",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/StocktakeId"
          }
        }
      ],
      "query": null,
      "body": {
        "type": "array",
        "items": {
          "$ref": "#/$defs/StocktakeCount"
        }
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Stocktake"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "stocktake_count",
          "signature": "async fn stocktake_count (& self , tid : TenantId , id : StocktakeId , counts : & [StocktakeCount] ,) -> Result < Stocktake >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "StocktakeId",
                "name": "StocktakeId",
                "text": "StocktakeId"
              }
            },
            {
              "pattern": "counts",
              "type": {
                "args": [
                  {
                    "args": [
                      {
                        "args": [],
                        "base": "StocktakeCount",
                        "name": "StocktakeCount",
                        "text": "StocktakeCount"
                      }
                    ],
                    "name": "slice",
                    "text": "[StocktakeCount]"
                  }
                ],
                "name": "reference",
                "text": "& [StocktakeCount]"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Stocktake",
                "name": "Stocktake",
                "text": "Stocktake"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Stocktake >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::lock",
      "method": "POST",
      "path": "/api/t/{tid}/stocktakes/{id}/lock",
      "id": "post_t_tid_stocktakes_id_lock",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/StocktakeId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Stocktake"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "lock_stocktake",
          "signature": "async fn lock_stocktake (& self , tid : TenantId , id : StocktakeId) -> Result < Stocktake >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "StocktakeId",
                "name": "StocktakeId",
                "text": "StocktakeId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Stocktake",
                "name": "Stocktake",
                "text": "Stocktake"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Stocktake >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "stock::post_stocktake",
      "method": "POST",
      "path": "/api/t/{tid}/stocktakes/{id}/post",
      "id": "post_t_tid_stocktakes_id_post",
      "source": "crates/kc-api/src/stock.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "$ref": "#/$defs/StocktakeId"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/StockPostResult"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "post_stocktake",
          "signature": "async fn post_stocktake (& self , tid : TenantId , id : StocktakeId) -> Result < StockPostResult >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "StocktakeId",
                "name": "StocktakeId",
                "text": "StocktakeId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "StockPostResult",
                "name": "StockPostResult",
                "text": "StockPostResult"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < StockPostResult >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "archive::subscription",
      "method": "GET",
      "path": "/api/t/{tid}/subscription",
      "id": "get_t_tid_subscription",
      "source": "crates/kc-api/src/archive.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Subscription"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "subscription",
          "signature": "async fn subscription (& self , tid : TenantId) -> Result < Subscription >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Subscription",
                "name": "Subscription",
                "text": "Subscription"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Subscription >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "support::overview",
      "method": "GET",
      "path": "/api/t/{tid}/support",
      "id": "get_t_tid_support",
      "source": "crates/kc-api/src/support.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SupportOverview"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "support",
          "signature": "async fn support (& self , tid : TenantId) -> Result < SupportOverview >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SupportOverview",
                "name": "SupportOverview",
                "text": "SupportOverview"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SupportOverview >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "support::chat_session",
      "method": "POST",
      "path": "/api/t/{tid}/support/session",
      "id": "post_t_tid_support_session",
      "source": "crates/kc-api/src/support.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/ChatSession"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "support_chat_session",
          "signature": "async fn support_chat_session (& self , tid : TenantId) -> Result < ChatSession >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "ChatSession",
                "name": "ChatSession",
                "text": "ChatSession"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < ChatSession >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "support::suggest",
      "method": "POST",
      "path": "/api/t/{tid}/support/suggest",
      "id": "post_t_tid_support_suggest",
      "source": "crates/kc-api/src/support.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/SupportSuggestRequest"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SupportSuggestion"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "support_suggest",
          "signature": "async fn support_suggest (& self , tid : TenantId , q : & SupportSuggestRequest ,) -> Result < SupportSuggestion >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "q",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "SupportSuggestRequest",
                    "name": "SupportSuggestRequest",
                    "text": "SupportSuggestRequest"
                  }
                ],
                "name": "reference",
                "text": "& SupportSuggestRequest"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SupportSuggestion",
                "name": "SupportSuggestion",
                "text": "SupportSuggestion"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SupportSuggestion >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "support::create_ticket",
      "method": "POST",
      "path": "/api/t/{tid}/support/tickets",
      "id": "post_t_tid_support_tickets",
      "source": "crates/kc-api/src/support.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewSupportTicket"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SupportThread"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "support_create",
          "signature": "async fn support_create (& self , tid : TenantId , t : & NewSupportTicket ,) -> Result < SupportThread >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "t",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewSupportTicket",
                    "name": "NewSupportTicket",
                    "text": "NewSupportTicket"
                  }
                ],
                "name": "reference",
                "text": "& NewSupportTicket"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SupportThread",
                "name": "SupportThread",
                "text": "SupportThread"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SupportThread >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "support::show_ticket",
      "method": "GET",
      "path": "/api/t/{tid}/support/tickets/{id}",
      "id": "get_t_tid_support_tickets_id",
      "source": "crates/kc-api/src/support.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SupportThread"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "support_ticket",
          "signature": "async fn support_ticket (& self , tid : TenantId , id : i64) -> Result < SupportThread >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SupportThread",
                "name": "SupportThread",
                "text": "SupportThread"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SupportThread >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "support::close",
      "method": "POST",
      "path": "/api/t/{tid}/support/tickets/{id}/close",
      "id": "post_t_tid_support_tickets_id_close",
      "source": "crates/kc-api/src/support.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SupportThread"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "support_close",
          "signature": "async fn support_close (& self , tid : TenantId , id : i64) -> Result < SupportThread >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SupportThread",
                "name": "SupportThread",
                "text": "SupportThread"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SupportThread >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "support::reply",
      "method": "POST",
      "path": "/api/t/{tid}/support/tickets/{id}/messages",
      "id": "post_t_tid_support_tickets_id_messages",
      "source": "crates/kc-api/src/support.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewSupportMessage"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SupportThread"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "support_reply",
          "signature": "async fn support_reply (& self , tid : TenantId , id : i64 , m : & NewSupportMessage ,) -> Result < SupportThread >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            },
            {
              "pattern": "m",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewSupportMessage",
                    "name": "NewSupportMessage",
                    "text": "NewSupportMessage"
                  }
                ],
                "name": "reference",
                "text": "& NewSupportMessage"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SupportThread",
                "name": "SupportThread",
                "text": "SupportThread"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SupportThread >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "support::reopen",
      "method": "POST",
      "path": "/api/t/{tid}/support/tickets/{id}/reopen",
      "id": "post_t_tid_support_tickets_id_reopen",
      "source": "crates/kc-api/src/support.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/SupportThread"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "support_reopen",
          "signature": "async fn support_reopen (& self , tid : TenantId , id : i64) -> Result < SupportThread >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "SupportThread",
                "name": "SupportThread",
                "text": "SupportThread"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < SupportThread >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "total_income_tax::regimes",
      "method": "GET",
      "path": "/api/t/{tid}/tax-regimes",
      "id": "get_t_tid_tax_regimes",
      "source": "crates/kc-api/src/total_income_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TaxRegimeSetting"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "tax_regimes",
          "signature": "async fn tax_regimes (& self , tid : TenantId) -> Result < Vec < TaxRegimeSetting > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "TaxRegimeSetting",
                    "name": "TaxRegimeSetting",
                    "text": "TaxRegimeSetting"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < TaxRegimeSetting >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < TaxRegimeSetting > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "total_income_tax::set_regime",
      "method": "POST",
      "path": "/api/t/{tid}/tax-regimes",
      "id": "post_t_tid_tax_regimes",
      "source": "crates/kc-api/src/total_income_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewTaxRegimeSetting"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TaxRegimeSetting"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "set_tax_regime",
          "signature": "async fn set_tax_regime (& self , tid : TenantId , n : & NewTaxRegimeSetting ,) -> Result < TaxRegimeSetting >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewTaxRegimeSetting",
                    "name": "NewTaxRegimeSetting",
                    "text": "NewTaxRegimeSetting"
                  }
                ],
                "name": "reference",
                "text": "& NewTaxRegimeSetting"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TaxRegimeSetting",
                "name": "TaxRegimeSetting",
                "text": "TaxRegimeSetting"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TaxRegimeSetting >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "total_income_tax::list",
      "method": "GET",
      "path": "/api/t/{tid}/total-income-tax",
      "id": "get_t_tid_total_income_tax",
      "source": "crates/kc-api/src/total_income_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TotalIncomeTaxReturn"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "total_income_tax_returns",
          "signature": "async fn total_income_tax_returns (& self , tid : TenantId ,) -> Result < Vec < TotalIncomeTaxReturn > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "TotalIncomeTaxReturn",
                    "name": "TotalIncomeTaxReturn",
                    "text": "TotalIncomeTaxReturn"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < TotalIncomeTaxReturn >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < TotalIncomeTaxReturn > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "total_income_tax::create",
      "method": "POST",
      "path": "/api/t/{tid}/total-income-tax",
      "id": "post_t_tid_total_income_tax",
      "source": "crates/kc-api/src/total_income_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewTotalIncomeTaxReturn"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TotalIncomeTaxReturn"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_total_income_tax_return",
          "signature": "async fn create_total_income_tax_return (& self , tid : TenantId , n : & NewTotalIncomeTaxReturn ,) -> Result < TotalIncomeTaxReturn >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewTotalIncomeTaxReturn",
                    "name": "NewTotalIncomeTaxReturn",
                    "text": "NewTotalIncomeTaxReturn"
                  }
                ],
                "name": "reference",
                "text": "& NewTotalIncomeTaxReturn"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TotalIncomeTaxReturn",
                "name": "TotalIncomeTaxReturn",
                "text": "TotalIncomeTaxReturn"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TotalIncomeTaxReturn >"
          }
        }
      ],
      "errors": [
        "bad_total_income_tax"
      ]
    },
    {
      "handler": "total_income_tax::params",
      "method": "GET",
      "path": "/api/t/{tid}/total-income-tax/params",
      "id": "get_t_tid_total_income_tax_params",
      "source": "crates/kc-api/src/total_income_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TotalIncomeTaxParams"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "total_income_tax_params",
          "signature": "async fn total_income_tax_params (& self , tid : TenantId ,) -> Result < Vec < TotalIncomeTaxParams > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "TotalIncomeTaxParams",
                    "name": "TotalIncomeTaxParams",
                    "text": "TotalIncomeTaxParams"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < TotalIncomeTaxParams >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < TotalIncomeTaxParams > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "total_income_tax::add_params",
      "method": "POST",
      "path": "/api/t/{tid}/total-income-tax/params",
      "id": "post_t_tid_total_income_tax_params",
      "source": "crates/kc-api/src/total_income_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewTotalIncomeTaxParams"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TotalIncomeTaxParams"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_total_income_tax_params",
          "signature": "async fn add_total_income_tax_params (& self , tid : TenantId , n : & NewTotalIncomeTaxParams ,) -> Result < TotalIncomeTaxParams >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "n",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewTotalIncomeTaxParams",
                    "name": "NewTotalIncomeTaxParams",
                    "text": "NewTotalIncomeTaxParams"
                  }
                ],
                "name": "reference",
                "text": "& NewTotalIncomeTaxParams"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TotalIncomeTaxParams",
                "name": "TotalIncomeTaxParams",
                "text": "TotalIncomeTaxParams"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TotalIncomeTaxParams >"
          }
        }
      ],
      "errors": [
        "bad_total_income_tax"
      ]
    },
    {
      "handler": "total_income_tax::preview",
      "method": "GET",
      "path": "/api/t/{tid}/total-income-tax/preview",
      "id": "get_t_tid_total_income_tax_preview",
      "source": "crates/kc-api/src/total_income_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::total_income_tax::PreviewQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TotalIncomeTaxPreview"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "total_income_tax_preview",
          "signature": "async fn total_income_tax_preview (& self , tid : TenantId , date : Option < NaiveDate > ,) -> Result < TotalIncomeTaxPreview >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "date",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TotalIncomeTaxPreview",
                "name": "TotalIncomeTaxPreview",
                "text": "TotalIncomeTaxPreview"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TotalIncomeTaxPreview >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "total_income_tax::get_one",
      "method": "GET",
      "path": "/api/t/{tid}/total-income-tax/{id}",
      "id": "get_t_tid_total_income_tax_id",
      "source": "crates/kc-api/src/total_income_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TotalIncomeTaxReturn"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "total_income_tax_return",
          "signature": "async fn total_income_tax_return (& self , tid : TenantId , id : TotalIncomeTaxReturnId ,) -> Result < TotalIncomeTaxReturn >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "TotalIncomeTaxReturnId",
                "name": "TotalIncomeTaxReturnId",
                "text": "TotalIncomeTaxReturnId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TotalIncomeTaxReturn",
                "name": "TotalIncomeTaxReturn",
                "text": "TotalIncomeTaxReturn"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TotalIncomeTaxReturn >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "total_income_tax::cancel",
      "method": "POST",
      "path": "/api/t/{tid}/total-income-tax/{id}/cancel",
      "id": "post_t_tid_total_income_tax_id_cancel",
      "source": "crates/kc-api/src/total_income_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/CancelTotalIncomeTax"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TotalIncomeTaxReturn"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "cancel_total_income_tax_return",
          "signature": "async fn cancel_total_income_tax_return (& self , tid : TenantId , id : TotalIncomeTaxReturnId , c : & CancelTotalIncomeTax ,) -> Result < TotalIncomeTaxReturn >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "TotalIncomeTaxReturnId",
                "name": "TotalIncomeTaxReturnId",
                "text": "TotalIncomeTaxReturnId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "CancelTotalIncomeTax",
                    "name": "CancelTotalIncomeTax",
                    "text": "CancelTotalIncomeTax"
                  }
                ],
                "name": "reference",
                "text": "& CancelTotalIncomeTax"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TotalIncomeTaxReturn",
                "name": "TotalIncomeTaxReturn",
                "text": "TotalIncomeTaxReturn"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TotalIncomeTaxReturn >"
          }
        }
      ],
      "errors": [
        "already_cancelled"
      ]
    },
    {
      "handler": "total_income_tax::form",
      "method": "GET",
      "path": "/api/t/{tid}/total-income-tax/{id}/form",
      "id": "get_t_tid_total_income_tax_id_form",
      "source": "crates/kc-api/src/total_income_tax.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::tax_pdf::Options"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "text/html",
        "schema": null,
        "alternateContentTypes": {
          "format=pdf": "application/pdf"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "total_income_tax_pdf",
          "signature": "async fn total_income_tax_pdf (& self , tid : TenantId , id : TotalIncomeTaxReturnId ,) -> Result < Vec < u8 > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "TotalIncomeTaxReturnId",
                "name": "TotalIncomeTaxReturnId",
                "text": "TotalIncomeTaxReturnId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < u8 > >"
          }
        },
        {
          "name": "total_income_tax_form",
          "signature": "async fn total_income_tax_form (& self , tid : TenantId , id : TotalIncomeTaxReturnId ,) -> Result < String >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "TotalIncomeTaxReturnId",
                "name": "TotalIncomeTaxReturnId",
                "text": "TotalIncomeTaxReturnId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "String",
                "name": "String",
                "text": "String"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < String >"
          }
        }
      ],
      "errors": [
        "tax_pdf"
      ]
    },
    {
      "handler": "travel_orders::rates",
      "method": "GET",
      "path": "/api/t/{tid}/travel-allowance-rates",
      "id": "get_t_tid_travel_allowance_rates",
      "source": "crates/kc-api/src/travel_orders.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TravelRate"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "travel_rates",
          "signature": "async fn travel_rates (& self , tid : TenantId) -> Result < Vec < TravelRate > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "TravelRate",
                    "name": "TravelRate",
                    "text": "TravelRate"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < TravelRate >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < TravelRate > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "travel_orders::add_rate",
      "method": "POST",
      "path": "/api/t/{tid}/travel-allowance-rates",
      "id": "post_t_tid_travel_allowance_rates",
      "source": "crates/kc-api/src/travel_orders.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewTravelRate"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TravelRate"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_travel_rate",
          "signature": "async fn add_travel_rate (& self , tid : TenantId , r : & NewTravelRate) -> Result < TravelRate >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "r",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewTravelRate",
                    "name": "NewTravelRate",
                    "text": "NewTravelRate"
                  }
                ],
                "name": "reference",
                "text": "& NewTravelRate"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TravelRate",
                "name": "TravelRate",
                "text": "TravelRate"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TravelRate >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "travel_orders::cancel_expense",
      "method": "POST",
      "path": "/api/t/{tid}/travel-expenses/{id}/cancel",
      "id": "post_t_tid_travel_expenses_id_cancel",
      "source": "crates/kc-api/src/travel_orders.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/TravelCancel"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TravelOrderDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "cancel_travel_expense",
          "signature": "async fn cancel_travel_expense (& self , tid : TenantId , expense : TravelExpenseId , c : & TravelCancel ,) -> Result < TravelOrderDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "expense",
              "type": {
                "args": [],
                "base": "TravelExpenseId",
                "name": "TravelExpenseId",
                "text": "TravelExpenseId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "TravelCancel",
                    "name": "TravelCancel",
                    "text": "TravelCancel"
                  }
                ],
                "name": "reference",
                "text": "& TravelCancel"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TravelOrderDetail",
                "name": "TravelOrderDetail",
                "text": "TravelOrderDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TravelOrderDetail >"
          }
        }
      ],
      "errors": [
        "travel_state"
      ]
    },
    {
      "handler": "travel_orders::list",
      "method": "GET",
      "path": "/api/t/{tid}/travel-orders",
      "id": "get_t_tid_travel_orders",
      "source": "crates/kc-api/src/travel_orders.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::travel_orders::ListQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TravelOrder"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "travel_orders",
          "signature": "async fn travel_orders (& self , tid : TenantId , year : Option < i32 > ,) -> Result < Vec < TravelOrder > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "year",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "i32",
                    "name": "i32",
                    "text": "i32"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < i32 >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "TravelOrder",
                    "name": "TravelOrder",
                    "text": "TravelOrder"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < TravelOrder >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < TravelOrder > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "travel_orders::create",
      "method": "POST",
      "path": "/api/t/{tid}/travel-orders",
      "id": "post_t_tid_travel_orders",
      "source": "crates/kc-api/src/travel_orders.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewTravelOrder"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TravelOrderDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_travel_order",
          "signature": "async fn create_travel_order (& self , tid : TenantId , o : & NewTravelOrder ,) -> Result < TravelOrderDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "o",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewTravelOrder",
                    "name": "NewTravelOrder",
                    "text": "NewTravelOrder"
                  }
                ],
                "name": "reference",
                "text": "& NewTravelOrder"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TravelOrderDetail",
                "name": "TravelOrderDetail",
                "text": "TravelOrderDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TravelOrderDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "travel_orders::get",
      "method": "GET",
      "path": "/api/t/{tid}/travel-orders/{id}",
      "id": "get_t_tid_travel_orders_id",
      "source": "crates/kc-api/src/travel_orders.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TravelOrderDetail"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "travel_order",
          "signature": "async fn travel_order (& self , tid : TenantId , id : TravelOrderId ,) -> Result < TravelOrderDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "TravelOrderId",
                "name": "TravelOrderId",
                "text": "TravelOrderId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TravelOrderDetail",
                "name": "TravelOrderDetail",
                "text": "TravelOrderDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TravelOrderDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "travel_orders::cancel",
      "method": "POST",
      "path": "/api/t/{tid}/travel-orders/{id}/cancel",
      "id": "post_t_tid_travel_orders_id_cancel",
      "source": "crates/kc-api/src/travel_orders.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/TravelCancel"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TravelOrderDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "cancel_travel_order",
          "signature": "async fn cancel_travel_order (& self , tid : TenantId , id : TravelOrderId , c : & TravelCancel ,) -> Result < TravelOrderDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "TravelOrderId",
                "name": "TravelOrderId",
                "text": "TravelOrderId"
              }
            },
            {
              "pattern": "c",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "TravelCancel",
                    "name": "TravelCancel",
                    "text": "TravelCancel"
                  }
                ],
                "name": "reference",
                "text": "& TravelCancel"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TravelOrderDetail",
                "name": "TravelOrderDetail",
                "text": "TravelOrderDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TravelOrderDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "travel_orders::add_expense",
      "method": "POST",
      "path": "/api/t/{tid}/travel-orders/{id}/expenses",
      "id": "post_t_tid_travel_orders_id_expenses",
      "source": "crates/kc-api/src/travel_orders.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewTravelExpense"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TravelOrderDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "add_travel_expense",
          "signature": "async fn add_travel_expense (& self , tid : TenantId , id : TravelOrderId , e : & NewTravelExpense ,) -> Result < TravelOrderDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "TravelOrderId",
                "name": "TravelOrderId",
                "text": "TravelOrderId"
              }
            },
            {
              "pattern": "e",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewTravelExpense",
                    "name": "NewTravelExpense",
                    "text": "NewTravelExpense"
                  }
                ],
                "name": "reference",
                "text": "& NewTravelExpense"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TravelOrderDetail",
                "name": "TravelOrderDetail",
                "text": "TravelOrderDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TravelOrderDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "travel_orders::payment_order",
      "method": "POST",
      "path": "/api/t/{tid}/travel-orders/{id}/payment-order",
      "id": "post_t_tid_travel_orders_id_payment_order",
      "source": "crates/kc-api/src/travel_orders.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewTravelPayment"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TravelOrderDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "travel_payment_order",
          "signature": "async fn travel_payment_order (& self , tid : TenantId , id : TravelOrderId , p : & NewTravelPayment ,) -> Result < TravelOrderDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "TravelOrderId",
                "name": "TravelOrderId",
                "text": "TravelOrderId"
              }
            },
            {
              "pattern": "p",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewTravelPayment",
                    "name": "NewTravelPayment",
                    "text": "NewTravelPayment"
                  }
                ],
                "name": "reference",
                "text": "& NewTravelPayment"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TravelOrderDetail",
                "name": "TravelOrderDetail",
                "text": "TravelOrderDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TravelOrderDetail >"
          }
        }
      ],
      "errors": [
        "travel_payment"
      ]
    },
    {
      "handler": "travel_orders::preview",
      "method": "GET",
      "path": "/api/t/{tid}/travel-orders/{id}/preview",
      "id": "get_t_tid_travel_orders_id_preview",
      "source": "crates/kc-api/src/travel_orders.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::travel_orders::PreviewQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TravelCalculation"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "travel_order_preview",
          "signature": "async fn travel_order_preview (& self , tid : TenantId , id : TravelOrderId , date : Option < NaiveDate > ,) -> Result < TravelCalculation >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "TravelOrderId",
                "name": "TravelOrderId",
                "text": "TravelOrderId"
              }
            },
            {
              "pattern": "date",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TravelCalculation",
                "name": "TravelCalculation",
                "text": "TravelCalculation"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TravelCalculation >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "travel_orders::settle",
      "method": "POST",
      "path": "/api/t/{tid}/travel-orders/{id}/settle",
      "id": "post_t_tid_travel_orders_id_settle",
      "source": "crates/kc-api/src/travel_orders.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/TravelSettle"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/TravelOrderDetail"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "settle_travel_order",
          "signature": "async fn settle_travel_order (& self , tid : TenantId , id : TravelOrderId , s : & TravelSettle ,) -> Result < TravelOrderDetail >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "TravelOrderId",
                "name": "TravelOrderId",
                "text": "TravelOrderId"
              }
            },
            {
              "pattern": "s",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "TravelSettle",
                    "name": "TravelSettle",
                    "text": "TravelSettle"
                  }
                ],
                "name": "reference",
                "text": "& TravelSettle"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "TravelOrderDetail",
                "name": "TravelOrderDetail",
                "text": "TravelOrderDetail"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < TravelOrderDetail >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "trial_balance",
      "method": "GET",
      "path": "/api/t/{tid}/trial-balance",
      "id": "get_t_tid_trial_balance",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::LedgerQ"
      },
      "body": null,
      "auth": "BookDb",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TrialBalanceRow"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "trial_balance",
          "signature": "async fn trial_balance (& self , tid : TenantId , from : Option < NaiveDate > , to : Option < NaiveDate > ,) -> Result < Vec < TrialBalanceRow > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "from",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            },
            {
              "pattern": "to",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "TrialBalanceRow",
                    "name": "TrialBalanceRow",
                    "text": "TrialBalanceRow"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < TrialBalanceRow >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < TrialBalanceRow > >"
          }
        },
        {
          "name": "trial_balance_for_center",
          "signature": "async fn trial_balance_for_center (& self , tid : TenantId , from : Option < NaiveDate > , to : Option < NaiveDate > , center : CostCenterId ,) -> Result < Vec < TrialBalanceRow > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "from",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            },
            {
              "pattern": "to",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            },
            {
              "pattern": "center",
              "type": {
                "args": [],
                "base": "CostCenterId",
                "name": "CostCenterId",
                "text": "CostCenterId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "TrialBalanceRow",
                    "name": "TrialBalanceRow",
                    "text": "TrialBalanceRow"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < TrialBalanceRow >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < TrialBalanceRow > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "efaktura::ujp_status",
      "method": "GET",
      "path": "/api/t/{tid}/ujp/status",
      "id": "get_t_tid_ujp_status",
      "source": "crates/kc-api/src/efaktura.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/UjpStatus"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "ujp_status",
          "signature": "async fn ujp_status (& self , tid : TenantId) -> Result < UjpStatus >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "UjpStatus",
                "name": "UjpStatus",
                "text": "UjpStatus"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < UjpStatus >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "readings::usage",
      "method": "GET",
      "path": "/api/t/{tid}/usage",
      "id": "get_t_tid_usage",
      "source": "crates/kc-api/src/readings.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/UsageQuota"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "usage",
          "signature": "async fn usage (& self , tid : TenantId) -> Result < UsageQuota >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "UsageQuota",
                "name": "UsageQuota",
                "text": "UsageQuota"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < UsageQuota >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "vat::book",
      "method": "GET",
      "path": "/api/t/{tid}/vat/book",
      "id": "get_t_tid_vat_book",
      "source": "crates/kc-api/src/vat.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::vat::RangeQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/VatBookRow"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "vat_book",
          "signature": "async fn vat_book (& self , tid : TenantId , from : NaiveDate , to : NaiveDate , direction : Option < VatDirection > ,) -> Result < Vec < VatBookRow > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "from",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            },
            {
              "pattern": "to",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            },
            {
              "pattern": "direction",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "VatDirection",
                    "name": "VatDirection",
                    "text": "VatDirection"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < VatDirection >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "VatBookRow",
                    "name": "VatBookRow",
                    "text": "VatBookRow"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < VatBookRow >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < VatBookRow > >"
          }
        }
      ],
      "errors": [
        "bad_direction"
      ]
    },
    {
      "handler": "vat::registrations",
      "method": "GET",
      "path": "/api/t/{tid}/vat/registrations",
      "id": "get_t_tid_vat_registrations",
      "source": "crates/kc-api/src/vat.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/VatRegistration"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "vat_registrations",
          "signature": "async fn vat_registrations (& self , tid : TenantId) -> Result < Vec < VatRegistration > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "VatRegistration",
                    "name": "VatRegistration",
                    "text": "VatRegistration"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < VatRegistration >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < VatRegistration > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "vat::register",
      "method": "POST",
      "path": "/api/t/{tid}/vat/registrations",
      "id": "post_t_tid_vat_registrations",
      "source": "crates/kc-api/src/vat.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewVatRegistration"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/VatRegistration"
          }
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "register_vat",
          "signature": "async fn register_vat (& self , tid : TenantId , req : & NewVatRegistration ,) -> Result < Vec < VatRegistration > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "req",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewVatRegistration",
                    "name": "NewVatRegistration",
                    "text": "NewVatRegistration"
                  }
                ],
                "name": "reference",
                "text": "& NewVatRegistration"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "VatRegistration",
                    "name": "VatRegistration",
                    "text": "VatRegistration"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < VatRegistration >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < VatRegistration > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "vat::returns",
      "method": "GET",
      "path": "/api/t/{tid}/vat/returns",
      "id": "get_t_tid_vat_returns",
      "source": "crates/kc-api/src/vat.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/VatReturn"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "vat_returns",
          "signature": "async fn vat_returns (& self , tid : TenantId) -> Result < Vec < VatReturn > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "VatReturn",
                    "name": "VatReturn",
                    "text": "VatReturn"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < VatReturn >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < VatReturn > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "vat::file_return",
      "method": "POST",
      "path": "/api/t/{tid}/vat/returns",
      "id": "post_t_tid_vat_returns",
      "source": "crates/kc-api/src/vat.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/NewVatReturn"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/VatReturn"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "file_vat_return",
          "signature": "async fn file_vat_return (& self , tid : TenantId , req : & NewVatReturn) -> Result < VatReturn >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "req",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewVatReturn",
                    "name": "NewVatReturn",
                    "text": "NewVatReturn"
                  }
                ],
                "name": "reference",
                "text": "& NewVatReturn"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "VatReturn",
                "name": "VatReturn",
                "text": "VatReturn"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < VatReturn >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "vat::get_return",
      "method": "GET",
      "path": "/api/t/{tid}/vat/returns/{id}",
      "id": "get_t_tid_vat_returns_id",
      "source": "crates/kc-api/src/vat.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::vat::SourceQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/VatReturn"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "vat_return",
          "signature": "async fn vat_return (& self , tid : TenantId , id : i64) -> Result < VatReturn >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "VatReturn",
                "name": "VatReturn",
                "text": "VatReturn"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < VatReturn >"
          }
        },
        {
          "name": "vat_return_field",
          "signature": "async fn vat_return_field (& self , tid : TenantId , id : i64 , field : & str) -> Result < VatReturn >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            },
            {
              "pattern": "field",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "str",
                    "name": "str",
                    "text": "str"
                  }
                ],
                "name": "reference",
                "text": "& str"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "VatReturn",
                "name": "VatReturn",
                "text": "VatReturn"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < VatReturn >"
          }
        }
      ],
      "errors": [
        "bad_vat_field"
      ]
    },
    {
      "handler": "vat::form",
      "method": "GET",
      "path": "/api/t/{tid}/vat/returns/{id}/form",
      "id": "get_t_tid_vat_returns_id_form",
      "source": "crates/kc-api/src/vat.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::vat::VatFormQuery"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/pdf",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "vat_return_pdf",
          "signature": "async fn vat_return_pdf (& self , tid : TenantId , id : i64 , nil : bool) -> Result < Vec < u8 > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            },
            {
              "pattern": "nil",
              "type": {
                "args": [],
                "base": "bool",
                "name": "bool",
                "text": "bool"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < u8 > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "vat::classified_form",
      "method": "POST",
      "path": "/api/t/{tid}/vat/returns/{id}/form",
      "id": "post_t_tid_vat_returns_id_form",
      "source": "crates/kc-api/src/vat.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/Ddv04Supplement"
      },
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/pdf",
        "schema": null,
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "classified_vat_form",
          "signature": "async fn classified_vat_form (& self , tid : TenantId , id : i64 , supplement : & Ddv04Supplement ,) -> Result < Vec < u8 > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            },
            {
              "pattern": "supplement",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "Ddv04Supplement",
                    "name": "Ddv04Supplement",
                    "text": "Ddv04Supplement"
                  }
                ],
                "name": "reference",
                "text": "& Ddv04Supplement"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "u8",
                    "name": "u8",
                    "text": "u8"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < u8 >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < u8 > >"
          }
        }
      ],
      "errors": [
        "vat_classification"
      ]
    },
    {
      "handler": "vat::form_items",
      "method": "GET",
      "path": "/api/t/{tid}/vat/returns/{id}/form/items",
      "id": "get_t_tid_vat_returns_id_form_items",
      "source": "crates/kc-api/src/vat.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "id",
          "schema": {
            "type": "integer",
            "format": "i64"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Ddv04Item"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "vat_form_items",
          "signature": "async fn vat_form_items (& self , tid : TenantId , id : i64) -> Result < Vec < Ddv04Item > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "id",
              "type": {
                "args": [],
                "base": "i64",
                "name": "i64",
                "text": "i64"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "Ddv04Item",
                    "name": "Ddv04Item",
                    "text": "Ddv04Item"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < Ddv04Item >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < Ddv04Item > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "vat::summary",
      "method": "GET",
      "path": "/api/t/{tid}/vat/summary",
      "id": "get_t_tid_vat_summary",
      "source": "crates/kc-api/src/vat.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::vat::RangeQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/VatSummary"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "vat_summary",
          "signature": "async fn vat_summary (& self , tid : TenantId , from : NaiveDate , to : NaiveDate ,) -> Result < VatSummary >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "from",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            },
            {
              "pattern": "to",
              "type": {
                "args": [],
                "base": "NaiveDate",
                "name": "NaiveDate",
                "text": "NaiveDate"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "VatSummary",
                "name": "VatSummary",
                "text": "VatSummary"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < VatSummary >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "year::status",
      "method": "GET",
      "path": "/api/t/{tid}/year-close",
      "id": "get_t_tid_year_close",
      "source": "crates/kc-api/src/year.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::year::DateQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/YearCloseStatus"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "year_close_status",
          "signature": "async fn year_close_status (& self , tid : TenantId , date : Option < NaiveDate > ,) -> Result < YearCloseStatus >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "date",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "YearCloseStatus",
                "name": "YearCloseStatus",
                "text": "YearCloseStatus"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < YearCloseStatus >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "year::close",
      "method": "POST",
      "path": "/api/t/{tid}/year-close",
      "id": "post_t_tid_year_close",
      "source": "crates/kc-api/src/year.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/YearCloseRequest"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/YearClosing"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "close_year",
          "signature": "async fn close_year (& self , tid : TenantId , req : & YearCloseRequest) -> Result < YearClosing >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "req",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "YearCloseRequest",
                    "name": "YearCloseRequest",
                    "text": "YearCloseRequest"
                  }
                ],
                "name": "reference",
                "text": "& YearCloseRequest"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "YearClosing",
                "name": "YearClosing",
                "text": "YearClosing"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < YearClosing >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "year::overview",
      "method": "GET",
      "path": "/api/t/{tid}/year-close/overview",
      "id": "get_t_tid_year_close_overview",
      "source": "crates/kc-api/src/year.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": {
        "$ref": "#/$defs/api::year::DateQ"
      },
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/YearCloseOverview"
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "year_close_overview",
          "signature": "async fn year_close_overview (& self , tid : TenantId , date : Option < NaiveDate > ,) -> Result < YearCloseOverview >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "date",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NaiveDate",
                    "name": "NaiveDate",
                    "text": "NaiveDate"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < NaiveDate >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "YearCloseOverview",
                "name": "YearCloseOverview",
                "text": "YearCloseOverview"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < YearCloseOverview >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "year::reopen",
      "method": "POST",
      "path": "/api/t/{tid}/year-close/reopen",
      "id": "post_t_tid_year_close_reopen",
      "source": "crates/kc-api/src/year.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": {
        "$ref": "#/$defs/YearCloseRequest"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/YearClosing"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "reopen_year",
          "signature": "async fn reopen_year (& self , tid : TenantId , req : & YearCloseRequest) -> Result < YearClosing >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            },
            {
              "pattern": "req",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "YearCloseRequest",
                    "name": "YearCloseRequest",
                    "text": "YearCloseRequest"
                  }
                ],
                "name": "reference",
                "text": "& YearCloseRequest"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "YearClosing",
                "name": "YearClosing",
                "text": "YearClosing"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < YearClosing >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "year::closings",
      "method": "GET",
      "path": "/api/t/{tid}/year-closings",
      "id": "get_t_tid_year_closings",
      "source": "crates/kc-api/src/year.rs",
      "pathParams": [
        {
          "name": "tid",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/YearClosing"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "year_closings",
          "signature": "async fn year_closings (& self , tid : TenantId) -> Result < Vec < YearClosing > >",
          "params": [
            {
              "pattern": "tid",
              "type": {
                "args": [],
                "base": "TenantId",
                "name": "TenantId",
                "text": "TenantId"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "YearClosing",
                    "name": "YearClosing",
                    "text": "YearClosing"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < YearClosing >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < YearClosing > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "list_tenants",
      "method": "GET",
      "path": "/api/tenants",
      "id": "get_tenants",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [],
      "query": null,
      "body": null,
      "auth": "Db",
      "response": {
        "status": 200,
        "contentType": "application/json",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Tenant"
          }
        },
        "statuses": [
          200
        ]
      },
      "rust": [
        {
          "name": "tenants",
          "signature": "async fn tenants (& self) -> Result < Vec < Tenant > >",
          "params": [],
          "output": {
            "args": [
              {
                "args": [
                  {
                    "args": [],
                    "base": "Tenant",
                    "name": "Tenant",
                    "text": "Tenant"
                  }
                ],
                "base": "Vec",
                "name": "Vec",
                "text": "Vec < Tenant >"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Vec < Tenant > >"
          }
        }
      ],
      "errors": []
    },
    {
      "handler": "create_tenant",
      "method": "POST",
      "path": "/api/tenants",
      "id": "post_tenants",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [],
      "query": {
        "$ref": "#/$defs/api::NewClientScope"
      },
      "body": {
        "$ref": "#/$defs/NewTenantWithDetails"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Tenant"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_tenant",
          "signature": "async fn create_tenant (& self , t : & NewTenant) -> Result < Tenant >",
          "params": [
            {
              "pattern": "t",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewTenant",
                    "name": "NewTenant",
                    "text": "NewTenant"
                  }
                ],
                "name": "reference",
                "text": "& NewTenant"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Tenant",
                "name": "Tenant",
                "text": "Tenant"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Tenant >"
          }
        },
        {
          "name": "create_bureau_client",
          "signature": "async fn create_bureau_client (& self , bureau : BureauId , t : & NewTenant) -> Result < Tenant >",
          "params": [
            {
              "pattern": "bureau",
              "type": {
                "args": [],
                "base": "BureauId",
                "name": "BureauId",
                "text": "BureauId"
              }
            },
            {
              "pattern": "t",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewTenant",
                    "name": "NewTenant",
                    "text": "NewTenant"
                  }
                ],
                "name": "reference",
                "text": "& NewTenant"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Tenant",
                "name": "Tenant",
                "text": "Tenant"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Tenant >"
          }
        }
      ],
      "errors": [
        "bad_edb",
        "missing_name"
      ]
    },
    {
      "handler": "create_tenant",
      "method": "POST",
      "path": "/api/tenants/with-details",
      "id": "post_tenants_with_details",
      "source": "crates/kc-api/src/lib.rs",
      "pathParams": [],
      "query": {
        "$ref": "#/$defs/api::NewClientScope"
      },
      "body": {
        "$ref": "#/$defs/NewTenantWithDetails"
      },
      "auth": "Db",
      "response": {
        "status": 201,
        "contentType": "application/json",
        "schema": {
          "$ref": "#/$defs/Tenant"
        },
        "statuses": [
          201
        ]
      },
      "rust": [
        {
          "name": "create_tenant_with_details",
          "signature": "async fn create_tenant_with_details (& self , t : & NewTenantWithDetails , bureau : Option < BureauId > ,) -> Result < Tenant >",
          "params": [
            {
              "pattern": "t",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "NewTenantWithDetails",
                    "name": "NewTenantWithDetails",
                    "text": "NewTenantWithDetails"
                  }
                ],
                "name": "reference",
                "text": "& NewTenantWithDetails"
              }
            },
            {
              "pattern": "bureau",
              "type": {
                "args": [
                  {
                    "args": [],
                    "base": "BureauId",
                    "name": "BureauId",
                    "text": "BureauId"
                  }
                ],
                "base": "Option",
                "name": "Option",
                "text": "Option < BureauId >"
              }
            }
          ],
          "output": {
            "args": [
              {
                "args": [],
                "base": "Tenant",
                "name": "Tenant",
                "text": "Tenant"
              }
            ],
            "base": "Result",
            "name": "Result",
            "text": "Result < Tenant >"
          }
        }
      ],
      "errors": [
        "bad_edb",
        "missing_name"
      ]
    }
  ],
  "$defs": {
    "api::addon::BillingScope": {
      "type": "object",
      "properties": {
        "tenant": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "AiPackageOrder": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "payer_name": {
          "type": "string"
        },
        "payer_edb": {
          "type": "string"
        },
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "documents": {
          "type": "integer",
          "format": "i32"
        },
        "used": {
          "type": "integer",
          "format": "i64"
        },
        "invoice_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "valid_from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "valid_until": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "payer_name",
        "payer_edb",
        "gross",
        "documents",
        "used"
      ]
    },
    "Money": {
      "type": "integer",
      "format": "i64"
    },
    "AiDocumentAllowance": {
      "type": "object",
      "properties": {
        "can_buy": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "monthly": {
          "type": "integer",
          "format": "i32"
        },
        "remaining": {
          "type": "integer",
          "format": "i32"
        },
        "max_pages": {
          "type": "integer",
          "format": "i32"
        },
        "renews_on": {
          "type": "string",
          "format": "date"
        },
        "offer": {
          "$ref": "#/$defs/AiPackageOffer"
        }
      },
      "required": [
        "monthly",
        "remaining",
        "max_pages",
        "renews_on",
        "offer"
      ]
    },
    "AiPackageOffer": {
      "type": "object",
      "properties": {
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "documents": {
          "type": "integer",
          "format": "i32"
        },
        "promo_gross": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        },
        "promo_until": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "promo_remaining": {
          "type": "integer",
          "format": "i32"
        }
      },
      "required": [
        "gross",
        "documents",
        "promo_remaining"
      ]
    },
    "DeviceLoginRequest": {
      "type": "object",
      "properties": {
        "client": {
          "type": "string"
        }
      },
      "required": [
        "client"
      ]
    },
    "DeviceLoginStart": {
      "type": "object",
      "properties": {
        "device_code": {
          "type": "string"
        },
        "user_code": {
          "type": "string"
        },
        "verification_url": {
          "type": "string"
        },
        "expires_at": {
          "type": "string",
          "format": "date-time"
        },
        "interval": {
          "type": "integer",
          "format": "u32",
          "minimum": 0
        }
      },
      "required": [
        "device_code",
        "user_code",
        "verification_url",
        "expires_at",
        "interval"
      ]
    },
    "DeviceCode": {
      "type": "object",
      "properties": {
        "device_code": {
          "type": "string"
        }
      },
      "required": [
        "device_code"
      ]
    },
    "DeviceLoginPoll": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "const": "pending",
              "type": "string"
            }
          },
          "required": [
            "status"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "const": "denied",
              "type": "string"
            }
          },
          "required": [
            "status"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "const": "expired",
              "type": "string"
            }
          },
          "required": [
            "status"
          ]
        },
        {
          "type": "object",
          "properties": {
            "session": {
              "$ref": "#/$defs/Session"
            },
            "status": {
              "const": "approved",
              "type": "string"
            }
          },
          "required": [
            "session",
            "status"
          ]
        }
      ]
    },
    "Session": {
      "type": "object",
      "properties": {
        "token": {
          "type": "string"
        },
        "user": {
          "$ref": "#/$defs/Me"
        },
        "activation": {
          "anyOf": [
            {
              "$ref": "#/$defs/SessionActivation"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "token",
        "user"
      ]
    },
    "Me": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "email": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "preferences": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "x-serde-default": true,
          "x-omitted-when": "std::collections::BTreeMap::is_empty"
        },
        "platform_admin": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "email_verified": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "has_avatar": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "mfa_required_by": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "x-serde-default": true,
          "default": [],
          "x-omitted-when": "Vec::is_empty"
        }
      },
      "required": [
        "id",
        "email",
        "name"
      ]
    },
    "SessionActivation": {
      "type": "object",
      "properties": {
        "expires_at": {
          "type": "string",
          "format": "date-time"
        },
        "approve_device": {
          "type": "boolean"
        },
        "device_name": {
          "type": "string"
        },
        "max_devices": {
          "type": "integer",
          "format": "i32"
        },
        "devices": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RegisteredDevice"
          }
        }
      },
      "required": [
        "expires_at",
        "approve_device",
        "device_name",
        "max_devices",
        "devices"
      ]
    },
    "RegisteredDevice": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "approved_at": {
          "type": "string",
          "format": "date-time"
        },
        "last_used_at": {
          "type": "string",
          "format": "date-time"
        },
        "active": {
          "type": "boolean"
        },
        "current": {
          "type": "boolean"
        },
        "session": {
          "anyOf": [
            {
              "$ref": "#/$defs/DeviceSessionDetails"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "id",
        "name",
        "approved_at",
        "last_used_at",
        "active",
        "current"
      ]
    },
    "DeviceSessionDetails": {
      "type": "object",
      "properties": {
        "ip": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "country": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "user_agent": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "AuthCode": {
      "type": "object",
      "properties": {
        "code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": []
    },
    "VerifyEmail": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ]
    },
    "Login": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "password": {
          "type": "string"
        }
      },
      "required": [
        "email",
        "password"
      ]
    },
    "LoginStart": {
      "anyOf": [
        {
          "$ref": "#/$defs/Session"
        },
        {
          "$ref": "#/$defs/MfaRequired"
        }
      ]
    },
    "MfaRequired": {
      "type": "object",
      "properties": {
        "mfa_ticket": {
          "type": "string"
        },
        "retry_after_seconds": {
          "type": "integer",
          "format": "u64",
          "minimum": 0,
          "x-serde-default": true,
          "default": 0
        },
        "totp": {
          "type": "boolean"
        },
        "passkey": {
          "type": "boolean"
        }
      },
      "required": [
        "mfa_ticket",
        "totp",
        "passkey"
      ]
    },
    "MfaLogin": {
      "type": "object",
      "properties": {
        "ticket": {
          "type": "string"
        },
        "code": {
          "type": "string"
        }
      },
      "required": [
        "ticket",
        "code"
      ]
    },
    "PasskeyAssertion": {
      "type": "object",
      "properties": {
        "ticket": {
          "type": "string"
        },
        "credential_id": {
          "type": "string"
        },
        "client_data_json": {
          "type": "string"
        },
        "authenticator_data": {
          "type": "string"
        },
        "signature": {
          "type": "string"
        }
      },
      "required": [
        "ticket",
        "credential_id",
        "client_data_json",
        "authenticator_data",
        "signature"
      ]
    },
    "MfaTicket": {
      "type": "object",
      "properties": {
        "ticket": {
          "type": "string"
        }
      },
      "required": [
        "ticket"
      ]
    },
    "PasskeyRequestOptions": {
      "type": "object",
      "properties": {
        "challenge": {
          "type": "string"
        },
        "rp_id": {
          "type": "string"
        },
        "allow_credentials": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "challenge",
        "rp_id",
        "allow_credentials"
      ]
    },
    "ChangePassword": {
      "type": "object",
      "properties": {
        "current": {
          "type": "string"
        },
        "new": {
          "type": "string"
        }
      },
      "required": [
        "current",
        "new"
      ]
    },
    "PasswordResetRequest": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        }
      },
      "required": [
        "email"
      ]
    },
    "PasswordResetConfirm": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "password": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "password"
      ]
    },
    "Register": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "password": {
          "type": "string"
        }
      },
      "required": [
        "email",
        "name",
        "password"
      ]
    },
    "ActivateSession": {
      "type": "object",
      "properties": {
        "transfer": {
          "type": "boolean"
        },
        "approve_device": {
          "type": "boolean"
        },
        "replace_device": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "transfer",
        "approve_device"
      ]
    },
    "Board": {
      "type": "object",
      "properties": {
        "period": {
          "type": "string",
          "format": "date"
        },
        "rows": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BoardRow"
          }
        }
      },
      "required": [
        "period",
        "rows"
      ]
    },
    "BoardRow": {
      "type": "object",
      "properties": {
        "tenant_id": {
          "$ref": "#/$defs/TenantId"
        },
        "name": {
          "type": "string"
        },
        "edb": {
          "type": "string"
        },
        "role": {
          "$ref": "#/$defs/Role"
        },
        "bureau": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "cells": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BoardCell"
          }
        }
      },
      "required": [
        "tenant_id",
        "name",
        "edb",
        "role",
        "cells"
      ]
    },
    "TenantId": {
      "type": "string",
      "format": "uuid"
    },
    "Role": {
      "type": "string",
      "enum": [
        "super_admin",
        "admin",
        "accountant",
        "sales",
        "operator",
        "reviewer",
        "viewer"
      ]
    },
    "BoardCell": {
      "type": "object",
      "properties": {
        "task": {
          "$ref": "#/$defs/CloseTask"
        },
        "status": {
          "$ref": "#/$defs/CloseStatus"
        },
        "open_count": {
          "type": "integer",
          "format": "i64"
        },
        "due_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "task",
        "status",
        "open_count"
      ]
    },
    "CloseTask": {
      "type": "string",
      "enum": [
        "bank",
        "open_items",
        "drafts",
        "fx",
        "payroll",
        "vat",
        "lock"
      ]
    },
    "CloseStatus": {
      "type": "string",
      "enum": [
        "not_started",
        "in_progress",
        "done",
        "overdue",
        "not_applicable"
      ]
    },
    "MyDocumentWork": {
      "type": "object",
      "properties": {
        "scope_id": {
          "type": "string",
          "format": "uuid"
        },
        "source": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "client_name": {
          "type": "string"
        },
        "incoming": {
          "type": "boolean"
        }
      },
      "required": [
        "scope_id",
        "source",
        "title",
        "client_name",
        "incoming"
      ]
    },
    "ChangeDocumentWork": {
      "allOf": [
        {
          "type": "object",
          "properties": {
            "version": {
              "type": "integer",
              "format": "i64"
            }
          },
          "required": [
            "version"
          ]
        },
        {
          "$ref": "#/$defs/WorkDecision"
        }
      ]
    },
    "WorkDecision": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "email": {
              "type": "string"
            },
            "message": {
              "type": "string",
              "x-serde-default": true,
              "default": ""
            },
            "action": {
              "const": "offer",
              "type": "string"
            }
          },
          "required": [
            "email",
            "action"
          ]
        },
        {
          "type": "object",
          "properties": {
            "action": {
              "const": "accept",
              "type": "string"
            }
          },
          "required": [
            "action"
          ]
        },
        {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string"
            },
            "action": {
              "const": "decline",
              "type": "string"
            }
          },
          "required": [
            "reason",
            "action"
          ]
        }
      ]
    },
    "DocumentWork": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "version": {
          "type": "integer",
          "format": "i64"
        },
        "worker": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "offered_to": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "message": {
          "type": "string"
        },
        "decision": {
          "type": "string"
        },
        "can_offer": {
          "type": "boolean"
        },
        "can_reply": {
          "type": "boolean"
        },
        "staff": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WorkRecipient"
          }
        }
      },
      "required": [
        "id",
        "version",
        "message",
        "decision",
        "can_offer",
        "can_reply",
        "staff"
      ]
    },
    "WorkRecipient": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "eligible": {
          "type": "boolean"
        }
      },
      "required": [
        "email",
        "name",
        "eligible"
      ]
    },
    "Bureau": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/BureauId"
        },
        "name": {
          "type": "string"
        },
        "edb": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "role": {
          "$ref": "#/$defs/BureauRole"
        }
      },
      "required": [
        "id",
        "name",
        "role"
      ]
    },
    "BureauId": {
      "type": "string",
      "format": "uuid"
    },
    "BureauRole": {
      "type": "string",
      "enum": [
        "super_admin",
        "admin",
        "staff"
      ]
    },
    "NewBureau": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "edb": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "name"
      ]
    },
    "BureauAccessRequest": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "client": {
          "type": "string"
        },
        "recipient": {
          "type": "string"
        },
        "sender": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "client",
        "recipient",
        "sender"
      ]
    },
    "HandoverReceipt": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "client_name": {
          "type": "string"
        },
        "recorded_at": {
          "type": "string",
          "format": "date-time"
        },
        "books_from": {
          "type": "string",
          "format": "date"
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "client_name",
        "recorded_at",
        "books_from",
        "reason"
      ]
    },
    "api::bureau::ClientChoiceQuery": {
      "type": "object",
      "properties": {
        "q": {
          "type": "string"
        },
        "offset": {
          "type": "integer",
          "format": "u32",
          "minimum": 0
        }
      },
      "required": [
        "q",
        "offset"
      ]
    },
    "ClientChoicePage": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "format": "i64"
        },
        "matched": {
          "type": "integer",
          "format": "i64"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ClientChoice"
          }
        }
      },
      "required": [
        "total",
        "matched",
        "items"
      ]
    },
    "ClientChoice": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/TenantId"
        },
        "name": {
          "type": "string"
        },
        "edb": {
          "type": "string"
        },
        "role": {
          "$ref": "#/$defs/Role"
        }
      },
      "required": [
        "id",
        "name",
        "edb",
        "role"
      ]
    },
    "BureauClient": {
      "type": "object",
      "properties": {
        "tenant_id": {
          "$ref": "#/$defs/TenantId"
        },
        "name": {
          "type": "string"
        },
        "edb": {
          "type": "string"
        },
        "since": {
          "type": "string",
          "format": "date-time"
        },
        "my_role": {
          "anyOf": [
            {
              "$ref": "#/$defs/Role"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "tenant_id",
        "name",
        "edb",
        "since"
      ]
    },
    "BureauClientLink": {
      "type": "object",
      "properties": {
        "tenant_id": {
          "$ref": "#/$defs/TenantId"
        },
        "reason": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "tenant_id"
      ]
    },
    "api::bureau::Assignment": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        }
      },
      "required": [
        "email",
        "enabled"
      ]
    },
    "GridQuery": {
      "type": "object",
      "properties": {
        "offset": {
          "type": "integer",
          "format": "usize",
          "minimum": 0
        },
        "limit": {
          "type": "integer",
          "format": "usize",
          "minimum": 0
        },
        "search": {
          "type": "string"
        },
        "lookup": {
          "type": "string"
        },
        "sort": {
          "anyOf": [
            {
              "type": "array",
              "prefixItems": [
                {
                  "type": "string"
                },
                {
                  "type": "boolean"
                }
              ],
              "minItems": 2,
              "maxItems": 2
            },
            {
              "type": "null"
            }
          ]
        },
        "filters": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/GridFilter"
          }
        },
        "include_inactive": {
          "type": "boolean"
        },
        "from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "to": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "partner": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ]
        },
        "record": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ]
        },
        "warehouse": {
          "anyOf": [
            {
              "$ref": "#/$defs/WarehouseId"
            },
            {
              "type": "null"
            }
          ]
        },
        "subject": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        },
        "labels": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "offset",
        "limit",
        "search",
        "lookup",
        "filters",
        "include_inactive",
        "labels"
      ]
    },
    "GridFilter": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string"
        },
        "min": {
          "type": "string"
        },
        "max": {
          "type": "string"
        },
        "set": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "text",
        "min",
        "max"
      ]
    },
    "PartnerId": {
      "type": "string",
      "format": "uuid"
    },
    "WarehouseId": {
      "type": "string",
      "format": "uuid"
    },
    "GridPage": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "format": "usize",
          "minimum": 0
        },
        "matched": {
          "type": "integer",
          "format": "usize",
          "minimum": 0
        },
        "rows": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/GridRecord"
          }
        },
        "sums": {
          "type": "object",
          "additionalProperties": {
            "type": "integer",
            "format": "i128"
          }
        },
        "facets": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "usize",
              "minimum": 0
            }
          }
        }
      },
      "required": [
        "total",
        "matched",
        "rows",
        "sums",
        "facets"
      ]
    },
    "GridRecord": {
      "type": "object",
      "properties": {
        "steps": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BoardCell"
          },
          "x-serde-default": true,
          "default": [],
          "x-omitted-when": "Vec::is_empty"
        },
        "fx": {
          "anyOf": [
            {
              "$ref": "#/$defs/Fx"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "period_end": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "draft": {
          "anyOf": [
            {
              "$ref": "#/$defs/DraftSummary"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "deadline": {
          "anyOf": [
            {
              "$ref": "#/$defs/Deadline"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "payment_batch": {
          "anyOf": [
            {
              "$ref": "#/$defs/PaymentBatch"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "payment_plan": {
          "anyOf": [
            {
              "$ref": "#/$defs/PaymentPlanRow"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "bank_account": {
          "anyOf": [
            {
              "$ref": "#/$defs/BankAccountId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "electronic": {
          "anyOf": [
            {
              "$ref": "#/$defs/Einvoice"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "booked": {
          "anyOf": [
            {
              "$ref": "#/$defs/BookedInvoice"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "key": {
          "type": "string"
        },
        "cells": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "style": {
          "type": "string"
        },
        "company": {
          "anyOf": [
            {
              "$ref": "#/$defs/Tenant"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "can_delete": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "hint": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "key",
        "cells",
        "style"
      ]
    },
    "Fx": {
      "type": "object",
      "properties": {
        "currency": {
          "type": "string"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "rate_micro": {
          "type": "integer",
          "format": "i64"
        }
      },
      "required": [
        "currency",
        "amount",
        "rate_micro"
      ]
    },
    "DraftSummary": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/DraftId"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "status": {
          "$ref": "#/$defs/DraftStatus"
        },
        "posting_date": {
          "type": "string",
          "format": "date"
        },
        "doc_number": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "total": {
          "$ref": "#/$defs/Money"
        },
        "balanced": {
          "type": "boolean"
        },
        "entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_by": {
          "type": "string"
        },
        "offline": {
          "anyOf": [
            {
              "$ref": "#/$defs/OfflineOutcome"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "offline_note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "id",
        "version",
        "status",
        "posting_date",
        "doc_number",
        "description",
        "total",
        "balanced",
        "created_at",
        "created_by",
        "updated_at",
        "updated_by"
      ]
    },
    "DraftId": {
      "type": "integer",
      "format": "i64"
    },
    "DraftStatus": {
      "type": "string",
      "enum": [
        "draft",
        "approved",
        "rejected",
        "posted",
        "cancelled"
      ]
    },
    "EntryId": {
      "type": "integer",
      "format": "i64"
    },
    "OfflineOutcome": {
      "type": "string",
      "enum": [
        "posted",
        "draft",
        "conflict"
      ]
    },
    "Deadline": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/DeadlineId"
        },
        "rule_code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "verified": {
          "type": "boolean"
        },
        "period_start": {
          "type": "string",
          "format": "date"
        },
        "period_end": {
          "type": "string",
          "format": "date"
        },
        "due_date": {
          "type": "string",
          "format": "date"
        },
        "status": {
          "$ref": "#/$defs/DeadlineStatus"
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "marked_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "marked_by": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "due_non_working": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": [
        "id",
        "rule_code",
        "name",
        "source",
        "verified",
        "period_start",
        "period_end",
        "due_date",
        "status"
      ]
    },
    "DeadlineId": {
      "type": "integer",
      "format": "i64"
    },
    "DeadlineStatus": {
      "type": "string",
      "enum": [
        "open",
        "done",
        "overdue"
      ]
    },
    "PaymentBatch": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/PaymentBatchId"
        },
        "bank_account_id": {
          "$ref": "#/$defs/BankAccountId"
        },
        "payer_account": {
          "type": "string"
        },
        "format": {
          "type": "string"
        },
        "attachment_id": {
          "$ref": "#/$defs/AttachmentId"
        },
        "filename": {
          "type": "string"
        },
        "sha256": {
          "type": "string"
        },
        "order_count": {
          "type": "integer",
          "format": "i32"
        },
        "total": {
          "$ref": "#/$defs/Money"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "bank_account_id",
        "payer_account",
        "format",
        "attachment_id",
        "filename",
        "sha256",
        "order_count",
        "total",
        "created_at",
        "created_by"
      ]
    },
    "PaymentBatchId": {
      "type": "integer",
      "format": "i64"
    },
    "BankAccountId": {
      "type": "string",
      "format": "uuid"
    },
    "AttachmentId": {
      "type": "string",
      "format": "uuid"
    },
    "PaymentPlanRow": {
      "type": "object",
      "properties": {
        "entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "partner_id": {
          "$ref": "#/$defs/PartnerId"
        },
        "partner_name": {
          "type": "string"
        },
        "account_code": {
          "type": "string"
        },
        "doc_number": {
          "type": "string"
        },
        "due_date": {
          "type": "string",
          "format": "date"
        },
        "open": {
          "$ref": "#/$defs/Money"
        },
        "ordered": {
          "$ref": "#/$defs/Money"
        },
        "remaining": {
          "$ref": "#/$defs/Money"
        },
        "payee_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "entry_id",
        "line_no",
        "partner_id",
        "partner_name",
        "account_code",
        "doc_number",
        "due_date",
        "open",
        "ordered",
        "remaining"
      ]
    },
    "Einvoice": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/EinvoiceId"
        },
        "direction": {
          "$ref": "#/$defs/EinvoiceDirection"
        },
        "kind": {
          "$ref": "#/$defs/EinvoiceKind"
        },
        "ref_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EinvoiceId"
            },
            {
              "type": "null"
            }
          ]
        },
        "environment": {
          "$ref": "#/$defs/UjpEnvironment"
        },
        "doc_type": {
          "type": "string"
        },
        "doc_number": {
          "type": "string"
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "seller_edb": {
          "type": "string"
        },
        "seller_name": {
          "type": "string"
        },
        "buyer_edb": {
          "type": "string"
        },
        "buyer_name": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "net": {
          "$ref": "#/$defs/Money"
        },
        "vat": {
          "$ref": "#/$defs/Money"
        },
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "euid": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "qr_link": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "sent_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "send_state": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "last_error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "status_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "status_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "decision": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "storno_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EinvoiceId"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "retry_state": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "retry_attempt": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "retry_next_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "retry_note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "invoice_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "vat_reported": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "doc_alt": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "offline": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "receipt_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "receipt_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "id",
        "direction",
        "kind",
        "environment",
        "doc_type",
        "doc_number",
        "doc_date",
        "seller_edb",
        "seller_name",
        "buyer_edb",
        "buyer_name",
        "currency",
        "net",
        "vat",
        "gross",
        "created_at",
        "created_by"
      ]
    },
    "EinvoiceId": {
      "type": "integer",
      "format": "i64"
    },
    "EinvoiceDirection": {
      "type": "string",
      "enum": [
        "out",
        "in"
      ]
    },
    "EinvoiceKind": {
      "type": "string",
      "enum": [
        "original",
        "storno",
        "correction"
      ]
    },
    "UjpEnvironment": {
      "type": "string",
      "enum": [
        "test",
        "production"
      ]
    },
    "BookedInvoice": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/InvoiceId"
        },
        "number": {
          "type": "string"
        },
        "cancelled": {
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "number",
        "cancelled"
      ]
    },
    "InvoiceId": {
      "type": "integer",
      "format": "i64"
    },
    "Tenant": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/TenantId"
        },
        "name": {
          "type": "string"
        },
        "edb": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "role": {
          "$ref": "#/$defs/Role"
        },
        "archived": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "books_delegated": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false,
          "x-omitted-when": "std::ops::Not::not"
        }
      },
      "required": [
        "id",
        "name",
        "edb",
        "created_at",
        "role"
      ]
    },
    "InboxBoardFilter": {
      "type": "object",
      "properties": {
        "mine": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "client": {
          "anyOf": [
            {
              "$ref": "#/$defs/TenantId"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "anyOf": [
            {
              "$ref": "#/$defs/InboxStatus"
            },
            {
              "type": "null"
            }
          ]
        },
        "q": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "offset": {
          "type": "integer",
          "format": "u32",
          "minimum": 0,
          "x-serde-default": true,
          "default": 0
        },
        "workspace": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "assignees": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "unassigned": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "unassigned_lane": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "to": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "InboxStatus": {
      "type": "string",
      "enum": [
        "pending",
        "waiting",
        "done"
      ]
    },
    "InboxBoardPage": {
      "type": "object",
      "properties": {
        "cards": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InboxBoardCard"
          }
        },
        "total": {
          "type": "integer",
          "format": "i64"
        }
      },
      "required": [
        "cards",
        "total"
      ]
    },
    "InboxBoardCard": {
      "type": "object",
      "properties": {
        "item_key": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "client": {
          "anyOf": [
            {
              "$ref": "#/$defs/InboxClient"
            },
            {
              "type": "null"
            }
          ]
        },
        "intake_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/IntakeDocumentId"
            },
            {
              "type": "null"
            }
          ]
        },
        "intake_box": {
          "anyOf": [
            {
              "$ref": "#/$defs/IntakeBoxId"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "scheduled": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "deadline": {
          "anyOf": [
            {
              "$ref": "#/$defs/InboxDeadline"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "draft_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/DraftId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "status": {
          "$ref": "#/$defs/InboxStatus"
        },
        "incoming": {
          "type": "boolean"
        },
        "assignee": {
          "anyOf": [
            {
              "$ref": "#/$defs/InboxBoardPerson"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "can_move": {
          "type": "boolean"
        },
        "version": {
          "type": "integer",
          "format": "i64"
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "item_key",
        "title",
        "created_at",
        "status",
        "incoming",
        "can_move",
        "version",
        "note"
      ]
    },
    "InboxClient": {
      "type": "object",
      "properties": {
        "tenant_id": {
          "$ref": "#/$defs/TenantId"
        },
        "name": {
          "type": "string"
        },
        "edb": {
          "type": "string"
        },
        "can_work": {
          "type": "boolean"
        },
        "pending": {
          "type": "integer",
          "format": "i64"
        },
        "done": {
          "type": "integer",
          "format": "i64"
        }
      },
      "required": [
        "tenant_id",
        "name",
        "edb",
        "can_work",
        "pending",
        "done"
      ]
    },
    "IntakeDocumentId": {
      "type": "string",
      "format": "uuid"
    },
    "IntakeBoxId": {
      "type": "string",
      "format": "uuid"
    },
    "InboxDeadline": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/DeadlineId"
        },
        "period_end": {
          "type": "string",
          "format": "date"
        },
        "due_date": {
          "type": "string",
          "format": "date"
        }
      },
      "required": [
        "id",
        "period_end",
        "due_date"
      ]
    },
    "InboxBoardPerson": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ]
    },
    "api::inbox::WorkQuery": {
      "type": "object",
      "properties": {
        "client": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        },
        "offset": {
          "type": "integer",
          "format": "u32",
          "minimum": 0,
          "x-serde-default": true,
          "default": 0
        },
        "q": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": []
    },
    "InboxCounts": {
      "type": "object",
      "properties": {
        "pending": {
          "type": "integer",
          "format": "i64"
        },
        "waiting": {
          "type": "integer",
          "format": "i64"
        },
        "done": {
          "type": "integer",
          "format": "i64"
        },
        "drafts": {
          "type": "integer",
          "format": "i64",
          "x-serde-default": true,
          "default": 0
        },
        "deadlines": {
          "type": "integer",
          "format": "i64",
          "x-serde-default": true,
          "default": 0
        },
        "unassigned": {
          "type": "integer",
          "format": "i64",
          "x-serde-default": true,
          "default": 0
        },
        "organization": {
          "type": "integer",
          "format": "i64",
          "x-serde-default": true,
          "default": 0
        },
        "my_work": {
          "type": "integer",
          "format": "i64",
          "x-serde-default": true,
          "default": 0
        }
      },
      "required": [
        "pending",
        "waiting",
        "done"
      ]
    },
    "InboxGroupsPage": {
      "type": "object",
      "properties": {
        "groups": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InboxClient"
          }
        },
        "has_more": {
          "type": "boolean"
        }
      },
      "required": [
        "groups",
        "has_more"
      ]
    },
    "BureauMember": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "role": {
          "$ref": "#/$defs/BureauRole"
        },
        "since": {
          "type": "string",
          "format": "date-time"
        },
        "granted_by": {
          "type": "string"
        }
      },
      "required": [
        "email",
        "name",
        "role",
        "since",
        "granted_by"
      ]
    },
    "SetBureauMember": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "role": {
          "anyOf": [
            {
              "$ref": "#/$defs/BureauRole"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "email"
      ]
    },
    "PracticeOfflinePermit": {
      "type": "object",
      "properties": {
        "permit": {
          "$ref": "#/$defs/OfflinePermit"
        },
        "tenants": {
          "type": "array",
          "items": {
            "type": "array",
            "prefixItems": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "string"
              }
            ],
            "minItems": 2,
            "maxItems": 2
          }
        }
      },
      "required": [
        "permit",
        "tenants"
      ]
    },
    "OfflinePermit": {
      "type": "object",
      "properties": {
        "tenants": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid"
          },
          "x-serde-default": true,
          "default": []
        },
        "tenant_deadlines": {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "format": "date-time"
          },
          "x-serde-default": true,
          "default": {}
        },
        "user_id": {
          "type": "string",
          "format": "uuid"
        },
        "device_id": {
          "type": "string",
          "format": "uuid"
        },
        "issued_at": {
          "type": "string",
          "format": "date-time"
        },
        "expires_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "user_id",
        "device_id",
        "issued_at",
        "expires_at"
      ]
    },
    "RoutingSettings": {
      "type": "object",
      "properties": {
        "mode": {
          "$ref": "#/$defs/RoutingMode"
        },
        "limit": {
          "type": "integer",
          "format": "i32"
        },
        "clients": {
          "type": "integer",
          "format": "i32"
        },
        "managers": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "mode",
        "limit",
        "clients",
        "managers"
      ]
    },
    "RoutingMode": {
      "type": "string",
      "enum": [
        "round_robin",
        "manager"
      ]
    },
    "api::bureau::WorkspaceQuery": {
      "type": "object",
      "properties": {
        "selected": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        },
        "all": {
          "type": "boolean"
        }
      },
      "required": [
        "all"
      ]
    },
    "WorkCalendar": {
      "type": "object",
      "properties": {
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "holidays": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Holiday"
          }
        },
        "working_days": {
          "type": "integer",
          "format": "i32"
        },
        "covered": {
          "type": "boolean"
        },
        "program": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "year",
        "holidays",
        "working_days",
        "covered"
      ]
    },
    "Holiday": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "format": "date"
        },
        "name": {
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/HolidayKind",
          "x-serde-default": true
        },
        "community": {
          "anyOf": [
            {
              "$ref": "#/$defs/Community"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "article": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "source": {
          "type": "string"
        },
        "verified": {
          "type": "boolean"
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "date",
        "name",
        "source",
        "verified"
      ]
    },
    "HolidayKind": {
      "type": "string",
      "enum": [
        "state",
        "holiday",
        "transferred",
        "community"
      ]
    },
    "Community": {
      "type": "string",
      "enum": [
        "orthodox",
        "catholic",
        "muslim",
        "jewish",
        "albanian",
        "turkish",
        "serbian",
        "roma",
        "vlach",
        "bosniak"
      ]
    },
    "ClientOverview": {
      "type": "object",
      "properties": {
        "tenant_id": {
          "$ref": "#/$defs/TenantId"
        },
        "name": {
          "type": "string"
        },
        "edb": {
          "type": "string"
        },
        "role": {
          "$ref": "#/$defs/Role"
        },
        "bureau": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "drafts_open": {
          "type": "integer",
          "format": "i64"
        },
        "drafts_approved": {
          "type": "integer",
          "format": "i64"
        },
        "drafts_rejected": {
          "type": "integer",
          "format": "i64"
        },
        "deadlines_open": {
          "type": "integer",
          "format": "i64"
        },
        "deadlines_overdue": {
          "type": "integer",
          "format": "i64"
        },
        "next_due": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "next_deadline": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "tenant_id",
        "name",
        "edb",
        "role",
        "drafts_open",
        "drafts_approved",
        "drafts_rejected",
        "deadlines_open",
        "deadlines_overdue"
      ]
    },
    "api::desktop::DownloadQ": {
      "type": "object",
      "properties": {
        "target": {
          "type": "string"
        },
        "version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "target"
      ]
    },
    "DesktopDownload": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "file_name": {
          "type": "string"
        },
        "size": {
          "type": "integer",
          "format": "u64",
          "minimum": 0
        },
        "sha256": {
          "type": "string"
        },
        "expires_in": {
          "type": "integer",
          "format": "u64",
          "minimum": 0
        }
      },
      "required": [
        "version",
        "url",
        "file_name",
        "size",
        "sha256",
        "expires_in"
      ]
    },
    "DesktopLatest": {
      "type": "object",
      "properties": {
        "files": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DesktopLatestFile"
          }
        }
      },
      "required": [
        "files"
      ]
    },
    "DesktopLatestFile": {
      "type": "object",
      "properties": {
        "target": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "published_at": {
          "type": "string",
          "format": "date-time"
        },
        "file_name": {
          "type": "string"
        },
        "size": {
          "type": "integer",
          "format": "u64",
          "minimum": 0
        },
        "sha256": {
          "type": "string"
        }
      },
      "required": [
        "target",
        "version",
        "published_at",
        "file_name",
        "size",
        "sha256"
      ]
    },
    "DesktopReleases": {
      "type": "object",
      "properties": {
        "versions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DesktopVersion"
          }
        }
      },
      "required": [
        "versions"
      ]
    },
    "DesktopVersion": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string"
        },
        "published_at": {
          "type": "string",
          "format": "date-time"
        },
        "notes": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "files": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DesktopFile"
          }
        }
      },
      "required": [
        "version",
        "published_at",
        "files"
      ]
    },
    "DesktopFile": {
      "type": "object",
      "properties": {
        "target": {
          "type": "string"
        },
        "file_name": {
          "type": "string"
        },
        "size": {
          "type": "integer",
          "format": "u64",
          "minimum": 0
        },
        "sha256": {
          "type": "string"
        },
        "signature": {
          "type": "string"
        }
      },
      "required": [
        "target",
        "file_name",
        "size",
        "sha256",
        "signature"
      ]
    },
    "api::desktop::UpdateQ": {
      "type": "object",
      "properties": {
        "target": {
          "type": "string"
        },
        "version": {
          "type": "string"
        }
      },
      "required": [
        "target",
        "version"
      ]
    },
    "DesktopUpdateCheck": {
      "type": "object",
      "properties": {
        "update": {
          "anyOf": [
            {
              "$ref": "#/$defs/DesktopUpdate"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "DesktopUpdate": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        },
        "published_at": {
          "type": "string",
          "format": "date-time"
        },
        "file": {
          "$ref": "#/$defs/DesktopFile"
        },
        "url": {
          "type": "string"
        },
        "expires_in": {
          "type": "integer",
          "format": "u64",
          "minimum": 0
        }
      },
      "required": [
        "version",
        "notes",
        "published_at",
        "file",
        "url",
        "expires_in"
      ]
    },
    "CorrectionRule": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "kinds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FilingKind"
          }
        },
        "window_from": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "window_days": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "requires_status": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FilingStatus"
          }
        },
        "requires_basis": {
          "type": "boolean"
        },
        "source": {
          "type": "string"
        },
        "in_force": {
          "type": "boolean"
        },
        "note": {
          "type": "string"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        }
      },
      "required": [
        "code",
        "name",
        "kinds",
        "requires_status",
        "requires_basis",
        "source",
        "in_force",
        "note",
        "valid_from"
      ]
    },
    "FilingKind": {
      "type": "string",
      "enum": [
        "annual_account",
        "vat_return",
        "inactivity_notice"
      ]
    },
    "FilingStatus": {
      "type": "string",
      "enum": [
        "prepared",
        "signed",
        "submitted",
        "accepted",
        "rejected",
        "cancelled"
      ]
    },
    "api::intake::BoxScope": {
      "type": "object",
      "properties": {
        "bureau": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "IntakeBox": {
      "type": "object",
      "properties": {
        "can_buy": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "bureau": {
          "type": "boolean"
        },
        "manage": {
          "type": "boolean"
        },
        "active": {
          "type": "boolean"
        },
        "address": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "balance": {
          "type": "integer",
          "format": "i64"
        },
        "documents": {
          "type": "integer",
          "format": "i32"
        },
        "gross": {
          "type": "integer",
          "format": "i64"
        },
        "pending": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ]
        },
        "invoice_ready": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "hook": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "name",
        "bureau",
        "manage",
        "active",
        "balance",
        "documents",
        "gross"
      ]
    },
    "api::intake::ItemQuery": {
      "type": "object",
      "properties": {
        "item": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "IntakeItem": {
      "type": "object",
      "properties": {
        "buyer_edb": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "assigned_tenant": {
          "anyOf": [
            {
              "$ref": "#/$defs/TenantId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "assigned_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "pages": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "credits": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "confirmed_credits": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "filename": {
          "type": "string"
        },
        "origin": {
          "type": "string"
        },
        "mime": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "kind": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "summary": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "attempts": {
          "type": "integer",
          "format": "i32"
        }
      },
      "required": [
        "id",
        "filename",
        "origin",
        "mime",
        "created_at",
        "attempts"
      ]
    },
    "api::intake::Source": {
      "type": "object",
      "properties": {
        "camera": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": []
    },
    "api::intake::Enable": {
      "type": "object",
      "properties": {
        "bureau": {
          "type": "boolean"
        }
      },
      "required": [
        "bureau"
      ]
    },
    "api::intake::Buy": {
      "type": "object",
      "properties": {
        "gross": {
          "type": "integer",
          "format": "i64"
        }
      },
      "required": [
        "gross"
      ]
    },
    "IntakeWebhook": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        }
      },
      "required": [
        "url",
        "enabled"
      ]
    },
    "AcceptInvitation": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ]
    },
    "api::security::Page": {
      "type": "object",
      "properties": {
        "before": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ]
        },
        "limit": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "ActivityEntry": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "at": {
          "type": "string",
          "format": "date-time"
        },
        "email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "tenant_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        },
        "method": {
          "type": "string"
        },
        "route": {
          "type": "string"
        },
        "status": {
          "type": "integer",
          "format": "i16"
        },
        "ip": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "user_agent": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "duration_ms": {
          "type": "integer",
          "format": "i32"
        }
      },
      "required": [
        "id",
        "at",
        "method",
        "route",
        "status",
        "duration_ms"
      ]
    },
    "IntegrationKey": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/IntegrationKeyId"
        },
        "name": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "revoked_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "name",
        "created_at"
      ]
    },
    "IntegrationKeyId": {
      "type": "string",
      "format": "uuid"
    },
    "NewIntegrationKey": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        }
      },
      "required": [
        "name"
      ]
    },
    "IssuedIntegrationKey": {
      "type": "object",
      "properties": {
        "secret": {
          "type": "string"
        }
      },
      "required": [
        "secret"
      ]
    },
    "BrowserLoginSummary": {
      "type": "object",
      "properties": {
        "measured": {
          "type": "integer",
          "format": "i64"
        },
        "distinct_browsers": {
          "type": "integer",
          "format": "i64"
        }
      },
      "required": [
        "measured",
        "distinct_browsers"
      ]
    },
    "BrowserLoginSample": {
      "type": "object",
      "properties": {
        "fingerprint": {
          "type": "string"
        }
      },
      "required": [
        "fingerprint"
      ]
    },
    "ConfigSnapshot": {
      "type": "object",
      "properties": {
        "config": {
          "$ref": "#/$defs/AccountConfig"
        },
        "rows": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EffectiveConfigRow"
          }
        }
      },
      "required": [
        "config",
        "rows"
      ]
    },
    "AccountConfig": {
      "type": "object",
      "properties": {
        "schema_version": {
          "type": "integer",
          "format": "u32",
          "minimum": 0
        },
        "preferences": {
          "$ref": "#/$defs/ConfigPreferences",
          "x-serde-default": true,
          "x-omitted-when": "is_default"
        },
        "defaults": {
          "$ref": "#/$defs/ConfigDefaults",
          "x-serde-default": true,
          "x-omitted-when": "is_default"
        },
        "companies": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompanyConfig"
          },
          "x-serde-default": true,
          "default": [],
          "x-omitted-when": "Vec::is_empty"
        }
      },
      "required": [
        "schema_version"
      ]
    },
    "ConfigPreferences": {
      "type": "object",
      "properties": {
        "language": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "theme": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "ConfigDefaults": {
      "type": "object",
      "properties": {
        "numbering": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/PolicyInput"
          },
          "x-serde-default": true,
          "default": {},
          "x-omitted-when": "BTreeMap::is_empty"
        },
        "eujp_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "certificate_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "PolicyInput": {
      "type": "object",
      "properties": {
        "mode": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "template": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "reset": {
          "anyOf": [
            {
              "$ref": "#/$defs/SeriesReset"
            },
            {
              "type": "null"
            }
          ]
        },
        "start_number": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "SeriesReset": {
      "type": "string",
      "enum": [
        "yearly",
        "never"
      ]
    },
    "CompanyConfig": {
      "type": "object",
      "properties": {
        "edb": {
          "type": "string"
        },
        "numbering": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/PolicyInput"
          },
          "x-serde-default": true,
          "default": {},
          "x-omitted-when": "BTreeMap::is_empty"
        },
        "eujp_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "inherit_certificate": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "edb"
      ]
    },
    "EffectiveConfigRow": {
      "type": "object",
      "properties": {
        "edb": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "doc_type": {
          "$ref": "#/$defs/SeriesDocType"
        },
        "warehouse": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "template": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "next": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "eujp_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "eujp_inherited": {
          "type": "boolean"
        },
        "certificate": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "certificate_inherited": {
          "type": "boolean"
        }
      },
      "required": [
        "edb",
        "name",
        "doc_type",
        "template",
        "source",
        "eujp_inherited",
        "certificate_inherited"
      ]
    },
    "SeriesDocType": {
      "type": "string",
      "enum": [
        "invoice",
        "advance",
        "credit_note",
        "stock_receipt",
        "stock_issue",
        "stock_transfer",
        "stock_return_supplier",
        "stock_return_customer",
        "stock_stocktake",
        "stock_storno",
        "stock_cost",
        "stock_price_leveling",
        "sales_quote",
        "sales_order",
        "sales_proforma"
      ]
    },
    "ConfigImport": {
      "type": "object",
      "properties": {
        "config": {
          "$ref": "#/$defs/AccountConfig"
        },
        "reason": {
          "type": "string"
        },
        "preview_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "config",
        "reason"
      ]
    },
    "ConfigPreview": {
      "type": "object",
      "properties": {
        "before": {
          "$ref": "#/$defs/ConfigSnapshot"
        },
        "after": {
          "$ref": "#/$defs/ConfigSnapshot"
        },
        "preview_id": {
          "type": "string"
        }
      },
      "required": [
        "before",
        "after",
        "preview_id"
      ]
    },
    "DeviceLoginInfo": {
      "type": "object",
      "properties": {
        "user_code": {
          "type": "string"
        },
        "client": {
          "type": "string"
        },
        "ip": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "expires_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "user_code",
        "client",
        "created_at",
        "expires_at"
      ]
    },
    "DeviceLoginDecision": {
      "type": "object",
      "properties": {
        "approve": {
          "type": "boolean"
        }
      },
      "required": [
        "approve"
      ]
    },
    "PasswordConfirm": {
      "type": "object",
      "properties": {
        "password": {
          "type": "string"
        }
      },
      "required": [
        "password"
      ]
    },
    "UploadCert": {
      "type": "object",
      "properties": {
        "p12_base64": {
          "type": "string"
        },
        "password": {
          "type": "string"
        }
      },
      "required": [
        "p12_base64",
        "password"
      ]
    },
    "EinvoiceSetup": {
      "type": "object",
      "properties": {
        "edb": {
          "type": "string"
        },
        "environment": {
          "$ref": "#/$defs/UjpEnvironment"
        },
        "eujp_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "settings": {
          "anyOf": [
            {
              "$ref": "#/$defs/EinvoiceSettings"
            },
            {
              "type": "null"
            }
          ]
        },
        "certificate": {
          "anyOf": [
            {
              "$ref": "#/$defs/EinvoiceCert"
            },
            {
              "type": "null"
            }
          ]
        },
        "unlocked_until": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "secret_key": {
          "type": "boolean"
        },
        "custom_endpoint": {
          "type": "boolean"
        },
        "signer": {
          "$ref": "#/$defs/SignerStatus",
          "x-serde-default": true
        }
      },
      "required": [
        "edb",
        "environment",
        "secret_key",
        "custom_endpoint"
      ]
    },
    "EinvoiceSettings": {
      "type": "object",
      "properties": {
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "environment": {
          "$ref": "#/$defs/UjpEnvironment"
        },
        "eujp_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "version",
        "environment",
        "created_at",
        "created_by"
      ]
    },
    "EinvoiceCert": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "subject": {
          "type": "string"
        },
        "serial_hex": {
          "type": "string"
        },
        "not_after": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "edb_hint": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "sha256": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "storage": {
          "$ref": "#/$defs/CertStorage",
          "x-serde-default": true
        }
      },
      "required": [
        "id",
        "subject",
        "serial_hex",
        "sha256",
        "created_at",
        "created_by"
      ]
    },
    "CertStorage": {
      "type": "string",
      "enum": [
        "server",
        "local"
      ]
    },
    "SignerStatus": {
      "type": "object",
      "properties": {
        "connected": {
          "type": "boolean"
        },
        "signer": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "last_seen": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "pending": {
          "type": "integer",
          "format": "usize",
          "minimum": 0
        }
      },
      "required": [
        "connected",
        "pending"
      ]
    },
    "LocalCert": {
      "type": "object",
      "properties": {
        "cert_base64": {
          "type": "string"
        }
      },
      "required": [
        "cert_base64"
      ]
    },
    "UnlockCert": {
      "type": "object",
      "properties": {
        "password": {
          "type": "string"
        }
      },
      "required": [
        "password"
      ]
    },
    "UjpCompanySettings": {
      "type": "object",
      "properties": {
        "tenant_id": {
          "$ref": "#/$defs/TenantId"
        },
        "name": {
          "type": "string"
        },
        "setup": {
          "$ref": "#/$defs/EinvoiceSetup"
        },
        "sources": {
          "$ref": "#/$defs/UjpSettingsSources"
        }
      },
      "required": [
        "tenant_id",
        "name",
        "setup",
        "sources"
      ]
    },
    "UjpSettingsSources": {
      "type": "object",
      "properties": {
        "account_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        },
        "eujp_inherited": {
          "type": "boolean"
        },
        "certificate_inherited": {
          "type": "boolean"
        },
        "use_account_certificate": {
          "type": "boolean"
        }
      },
      "required": [
        "eujp_inherited",
        "certificate_inherited",
        "use_account_certificate"
      ]
    },
    "SetEinvoiceSettings": {
      "type": "object",
      "properties": {
        "environment": {
          "anyOf": [
            {
              "$ref": "#/$defs/UjpEnvironment"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "eujp_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": []
    },
    "SetProfileName": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        }
      },
      "required": [
        "name"
      ]
    },
    "PasskeyRegistration": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "client_data_json": {
          "type": "string"
        },
        "attestation_object": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "client_data_json",
        "attestation_object"
      ]
    },
    "RecoveryCodes": {
      "type": "object",
      "properties": {
        "codes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "codes"
      ]
    },
    "PasskeyCreationOptions": {
      "type": "object",
      "properties": {
        "challenge": {
          "type": "string"
        },
        "rp_id": {
          "type": "string"
        },
        "rp_name": {
          "type": "string"
        },
        "user_id": {
          "type": "string"
        },
        "user_name": {
          "type": "string"
        },
        "user_display_name": {
          "type": "string"
        },
        "exclude_credentials": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "challenge",
        "rp_id",
        "rp_name",
        "user_id",
        "user_name",
        "user_display_name",
        "exclude_credentials"
      ]
    },
    "SetPreference": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      },
      "required": [
        "key",
        "value"
      ]
    },
    "api::security::SecurityQuery": {
      "type": "object",
      "properties": {
        "summary_only": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": []
    },
    "AccountSecurityInfo": {
      "type": "object",
      "properties": {
        "totp": {
          "type": "boolean"
        },
        "passkeys": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PasskeyInfo"
          }
        },
        "recovery_left": {
          "type": "integer",
          "format": "i32"
        },
        "passkeys_available": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SecurityEvent"
          }
        }
      },
      "required": [
        "totp",
        "passkeys",
        "recovery_left",
        "passkeys_available",
        "events"
      ]
    },
    "PasskeyInfo": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "name": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "last_used_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "name",
        "created_at"
      ]
    },
    "SecurityEvent": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "at": {
          "type": "string",
          "format": "date-time"
        },
        "event": {
          "type": "string"
        },
        "ip": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "detail": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "at",
        "event"
      ]
    },
    "SupportOverview": {
      "type": "object",
      "properties": {
        "available": {
          "type": "boolean"
        },
        "ai": {
          "type": "boolean"
        },
        "live_chat": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "tickets": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SupportTicket"
          }
        }
      },
      "required": [
        "available",
        "ai",
        "tickets"
      ]
    },
    "SupportTicket": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "tenant_id": {
          "type": "string",
          "format": "uuid"
        },
        "subject": {
          "type": "string"
        },
        "lang": {
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/SupportStatus"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "last_at": {
          "type": "string",
          "format": "date-time"
        },
        "last_author": {
          "type": "string"
        },
        "messages": {
          "type": "integer",
          "format": "i64"
        }
      },
      "required": [
        "id",
        "tenant_id",
        "subject",
        "lang",
        "status",
        "created_at",
        "last_at",
        "last_author",
        "messages"
      ]
    },
    "SupportStatus": {
      "type": "string"
    },
    "ChatSession": {
      "type": "object",
      "properties": {
        "inbox_id": {
          "type": "string",
          "format": "uuid"
        },
        "jwt": {
          "type": "string"
        }
      },
      "required": [
        "inbox_id",
        "jwt"
      ]
    },
    "TotpSetup": {
      "type": "object",
      "properties": {
        "secret": {
          "type": "string"
        },
        "uri": {
          "type": "string"
        },
        "qr_svg": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "secret",
        "uri"
      ]
    },
    "TotpCode": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ]
    },
    "api::organization::DirectoryQuery": {
      "type": "object",
      "properties": {
        "tenant": {
          "anyOf": [
            {
              "$ref": "#/$defs/TenantId"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "OrganizationDirectory": {
      "type": "object",
      "properties": {
        "current": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        },
        "organizations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OrganizationSummary"
          }
        }
      },
      "required": [
        "organizations"
      ]
    },
    "OrganizationSummary": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "logo_version": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ]
        },
        "can_view_profile": {
          "type": "boolean"
        },
        "can_edit": {
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "name",
        "can_view_profile",
        "can_edit"
      ]
    },
    "OrganizationProfile": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "edb": {
          "type": "string"
        },
        "details": {
          "$ref": "#/$defs/TenantDetails"
        }
      },
      "required": [
        "name",
        "edb",
        "details"
      ]
    },
    "TenantDetails": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "postal_code": {
          "type": "string"
        },
        "municipality": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "embs": {
          "type": "string"
        },
        "vat_number": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "website": {
          "type": "string"
        },
        "billing_address": {
          "type": "string"
        },
        "billing_email": {
          "type": "string"
        },
        "billing_reference": {
          "type": "string"
        },
        "contacts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TenantContact"
          }
        }
      },
      "required": [
        "address",
        "city",
        "postal_code",
        "municipality",
        "country",
        "embs",
        "vat_number",
        "phone",
        "email",
        "website",
        "billing_address",
        "billing_email",
        "billing_reference",
        "contacts"
      ]
    },
    "TenantContact": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "role": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        },
        "email": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "role",
        "phone",
        "email"
      ]
    },
    "SignInfo": {
      "type": "object",
      "properties": {
        "state": {
          "type": "string"
        },
        "tenant": {
          "type": "string"
        },
        "contract_number": {
          "type": "string"
        },
        "contract_title": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "signer_name": {
          "type": "string"
        },
        "signer_email": {
          "type": "string"
        },
        "signer_edb": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "position": {
          "type": "integer",
          "format": "i32"
        },
        "expires_at": {
          "type": "string",
          "format": "date-time"
        },
        "document_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ]
        },
        "document_sha256": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "signers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SignInfoSigner"
          }
        }
      },
      "required": [
        "state",
        "tenant",
        "contract_number",
        "contract_title",
        "message",
        "signer_name",
        "signer_email",
        "position",
        "expires_at",
        "signers"
      ]
    },
    "SignInfoSigner": {
      "type": "object",
      "properties": {
        "position": {
          "type": "integer",
          "format": "i32"
        },
        "name": {
          "type": "string"
        },
        "signed": {
          "type": "boolean"
        }
      },
      "required": [
        "position",
        "name",
        "signed"
      ]
    },
    "SignDecline": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "reason"
      ]
    },
    "SignFinish": {
      "type": "object",
      "properties": {
        "signature": {
          "type": "string"
        },
        "cert": {
          "type": "string"
        },
        "chain": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "x-serde-default": true,
          "default": []
        }
      },
      "required": [
        "signature",
        "cert"
      ]
    },
    "SignFinished": {
      "type": "object",
      "properties": {
        "document_id": {
          "type": "integer",
          "format": "i64"
        },
        "completed": {
          "type": "boolean"
        }
      },
      "required": [
        "document_id",
        "completed"
      ]
    },
    "SignPrepare": {
      "type": "object",
      "properties": {
        "cert": {
          "type": "string"
        }
      },
      "required": [
        "cert"
      ]
    },
    "SignPrepared": {
      "type": "object",
      "properties": {
        "to_be_signed": {
          "type": "string"
        },
        "signing_time": {
          "type": "string",
          "format": "date-time"
        },
        "document_id": {
          "type": "integer",
          "format": "i64"
        }
      },
      "required": [
        "to_be_signed",
        "signing_time",
        "document_id"
      ]
    },
    "api::absences::ListQ": {
      "type": "object",
      "properties": {
        "year": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "employee_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "Absence": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/AbsenceId"
        },
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/AbsenceKind"
        },
        "payer": {
          "$ref": "#/$defs/AbsencePayer"
        },
        "case_from": {
          "type": "string",
          "format": "date"
        },
        "date_from": {
          "type": "string",
          "format": "date"
        },
        "date_to": {
          "type": "string",
          "format": "date"
        },
        "days": {
          "type": "integer",
          "format": "i32"
        },
        "employer_liable": {
          "type": "boolean"
        },
        "document": {
          "type": "string"
        },
        "note": {
          "type": "string"
        },
        "insurance_approval": {
          "type": "string",
          "x-serde-default": true,
          "default": "",
          "x-omitted-when": "String::is_empty"
        },
        "status": {
          "$ref": "#/$defs/LeaveStatus"
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "cancelled_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "employee_id",
        "first_name",
        "last_name",
        "kind",
        "payer",
        "case_from",
        "date_from",
        "date_to",
        "days",
        "employer_liable",
        "document",
        "note",
        "status",
        "created_at",
        "created_by"
      ]
    },
    "AbsenceId": {
      "type": "integer",
      "format": "i64"
    },
    "EmployeeId": {
      "type": "string",
      "format": "uuid"
    },
    "AbsenceKind": {
      "type": "string",
      "enum": [
        "sick",
        "work_injury",
        "child_care",
        "donation",
        "maternity"
      ]
    },
    "AbsencePayer": {
      "type": "string",
      "enum": [
        "employer",
        "fund",
        "budget"
      ]
    },
    "LeaveStatus": {
      "type": "string",
      "enum": [
        "active",
        "cancelled"
      ]
    },
    "NewAbsence": {
      "type": "object",
      "properties": {
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "kind": {
          "$ref": "#/$defs/AbsenceKind"
        },
        "case_from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "date_from": {
          "type": "string",
          "format": "date"
        },
        "date_to": {
          "type": "string",
          "format": "date"
        },
        "employer_liable": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "document": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "insurance_approval": {
          "type": "string",
          "x-serde-default": true,
          "default": "",
          "x-omitted-when": "String::is_empty"
        }
      },
      "required": [
        "employee_id",
        "kind",
        "date_from",
        "date_to"
      ]
    },
    "CancelAbsence": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "reason"
      ]
    },
    "Account": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "synthetic": {
          "type": "boolean"
        },
        "kind": {
          "$ref": "#/$defs/AccountKind",
          "x-serde-default": true
        }
      },
      "required": [
        "code",
        "name",
        "synthetic"
      ]
    },
    "AccountKind": {
      "type": "string",
      "enum": [
        "general",
        "cash",
        "fixed_asset",
        "fixed_asset_depr",
        "partner"
      ]
    },
    "NewAccount": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "name"
      ]
    },
    "api::LedgerQ": {
      "type": "object",
      "properties": {
        "from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "to": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "cost_center": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": []
    },
    "CardRow": {
      "type": "object",
      "properties": {
        "posting_date": {
          "type": "string",
          "format": "date"
        },
        "entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "number": {
          "type": "integer",
          "format": "i32"
        },
        "doc_number": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "debit": {
          "$ref": "#/$defs/Money"
        },
        "credit": {
          "$ref": "#/$defs/Money"
        },
        "running_balance": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "posting_date",
        "entry_id",
        "year",
        "number",
        "doc_number",
        "description",
        "debit",
        "credit",
        "running_balance"
      ]
    },
    "api::partners::DateQ": {
      "type": "object",
      "properties": {
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "AgeingRow": {
      "type": "object",
      "properties": {
        "partner_id": {
          "$ref": "#/$defs/PartnerId"
        },
        "partner_code": {
          "type": "integer",
          "format": "i32"
        },
        "partner_name": {
          "type": "string"
        },
        "side": {
          "$ref": "#/$defs/AgeingSide"
        },
        "not_due": {
          "$ref": "#/$defs/Money"
        },
        "d0_30": {
          "$ref": "#/$defs/Money"
        },
        "d31_60": {
          "$ref": "#/$defs/Money"
        },
        "d61_90": {
          "$ref": "#/$defs/Money"
        },
        "over_90": {
          "$ref": "#/$defs/Money"
        },
        "total": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "partner_id",
        "partner_code",
        "partner_name",
        "side",
        "not_due",
        "d0_30",
        "d31_60",
        "d61_90",
        "over_90",
        "total"
      ]
    },
    "AgeingSide": {
      "type": "string",
      "enum": [
        "receivable",
        "payable"
      ]
    },
    "AgreementSummary": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/AgreementId"
        },
        "number": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/AgreementKind"
        },
        "partner_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "value": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        },
        "currency": {
          "type": "string"
        },
        "valid_from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "valid_to": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "$ref": "#/$defs/AgreementStatus"
        },
        "signed_parties": {
          "type": "integer",
          "format": "i64"
        },
        "parties": {
          "type": "integer",
          "format": "i64"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "number",
        "title",
        "kind",
        "currency",
        "status",
        "signed_parties",
        "parties",
        "created_at"
      ]
    },
    "AgreementId": {
      "type": "integer",
      "format": "i64"
    },
    "AgreementKind": {
      "type": "string",
      "enum": [
        "sale",
        "service",
        "lease",
        "employment",
        "loan",
        "other"
      ]
    },
    "AgreementStatus": {
      "type": "string",
      "enum": [
        "draft",
        "signing",
        "concluded",
        "expired",
        "terminated",
        "cancelled"
      ]
    },
    "NewAgreement": {
      "type": "object",
      "properties": {
        "number": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/AgreementKind"
        },
        "partner_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "value": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "currency": {
          "type": "string",
          "x-serde-default": "mkd",
          "default": "MKD"
        },
        "valid_from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "valid_to": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "parties": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NewParty"
          },
          "x-serde-default": true,
          "default": []
        }
      },
      "required": [
        "number",
        "title",
        "kind"
      ]
    },
    "NewParty": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "identifier": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "signatory": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "ours": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": [
        "name"
      ]
    },
    "AgreementDetail": {
      "type": "object",
      "properties": {
        "summary": {
          "$ref": "#/$defs/AgreementSummary"
        },
        "partner_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ]
        },
        "note": {
          "type": "string"
        },
        "created_by": {
          "type": "string"
        },
        "parties": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AgreementParty"
          }
        },
        "documents": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AgreementDocument"
          }
        },
        "events": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AgreementEvent"
          }
        },
        "main_document": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "summary",
        "note",
        "created_by",
        "parties",
        "documents",
        "events"
      ]
    },
    "AgreementParty": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "name": {
          "type": "string"
        },
        "identifier": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "signatory": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "ours": {
          "type": "boolean"
        },
        "signature_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "name",
        "ours"
      ]
    },
    "AgreementDocument": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "kind": {
          "$ref": "#/$defs/AgreementDocKind"
        },
        "title": {
          "type": "string"
        },
        "attachment_id": {
          "$ref": "#/$defs/AttachmentId"
        },
        "file_name": {
          "type": "string"
        },
        "size": {
          "type": "integer",
          "format": "i64"
        },
        "sha256": {
          "type": "string"
        },
        "replaces": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ]
        },
        "superseded": {
          "type": "boolean"
        },
        "intact": {
          "type": "boolean"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AgreementSignature"
          }
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "kind",
        "title",
        "attachment_id",
        "file_name",
        "size",
        "sha256",
        "superseded",
        "intact",
        "signatures",
        "created_at",
        "created_by"
      ]
    },
    "AgreementDocKind": {
      "type": "string",
      "enum": [
        "main",
        "annex",
        "attachment"
      ]
    },
    "AgreementSignature": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "source": {
          "$ref": "#/$defs/SignatureSource"
        },
        "kind": {
          "$ref": "#/$defs/SignatureKind"
        },
        "signer_name": {
          "type": "string"
        },
        "organization": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "org_identifier": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "subject_serial": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "issuer": {
          "type": "string"
        },
        "qualified": {
          "type": "boolean"
        },
        "signing_time": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "cert_not_before": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "cert_not_after": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "cert_sha256": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "valid": {
          "type": "boolean"
        },
        "problem": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "covers_whole": {
          "type": "boolean"
        },
        "signature_attachment": {
          "anyOf": [
            {
              "$ref": "#/$defs/AttachmentId"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "source",
        "kind",
        "signer_name",
        "issuer",
        "qualified",
        "valid",
        "covers_whole",
        "created_at",
        "created_by"
      ]
    },
    "SignatureSource": {
      "type": "string",
      "enum": [
        "embedded",
        "detached",
        "kontocloud"
      ]
    },
    "SignatureKind": {
      "type": "string",
      "enum": [
        "signature",
        "seal"
      ]
    },
    "AgreementEvent": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "event": {
          "$ref": "#/$defs/AgreementEventKind"
        },
        "on_paper": {
          "type": "boolean"
        },
        "event_date": {
          "type": "string",
          "format": "date"
        },
        "reason": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "event",
        "on_paper",
        "event_date",
        "reason",
        "created_at",
        "created_by"
      ]
    },
    "AgreementEventKind": {
      "type": "string",
      "enum": [
        "sent",
        "concluded",
        "terminated",
        "cancelled"
      ]
    },
    "NewAgreementDocument": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/AgreementDocKind"
        },
        "title": {
          "type": "string"
        },
        "attachment_id": {
          "$ref": "#/$defs/AttachmentId"
        },
        "replaces": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "kind",
        "title",
        "attachment_id"
      ]
    },
    "AddSignature": {
      "type": "object",
      "properties": {
        "attachment_id": {
          "$ref": "#/$defs/AttachmentId"
        }
      },
      "required": [
        "attachment_id"
      ]
    },
    "AgreementEventReq": {
      "type": "object",
      "properties": {
        "event": {
          "$ref": "#/$defs/AgreementEventKind"
        },
        "on_paper": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "event_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "reason": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "event"
      ]
    },
    "SignRequest": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/SignRequestId"
        },
        "contract_id": {
          "$ref": "#/$defs/AgreementId"
        },
        "document_id": {
          "type": "integer",
          "format": "i64"
        },
        "message": {
          "type": "string"
        },
        "lang": {
          "type": "string",
          "x-serde-default": "sign_lang_default",
          "default": "mk"
        },
        "status": {
          "$ref": "#/$defs/SignRequestStatus"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "signers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SignSigner"
          }
        },
        "events": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SignEvent"
          }
        },
        "mails": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SignMail"
          }
        },
        "issued": {
          "anyOf": [
            {
              "$ref": "#/$defs/SignLinkIssued"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "id",
        "contract_id",
        "document_id",
        "message",
        "status",
        "created_at",
        "created_by",
        "signers",
        "events",
        "mails"
      ]
    },
    "SignRequestId": {
      "type": "integer",
      "format": "i64"
    },
    "SignRequestStatus": {
      "type": "string",
      "enum": [
        "pending",
        "completed",
        "declined",
        "cancelled"
      ]
    },
    "SignSigner": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "position": {
          "type": "integer",
          "format": "i32"
        },
        "name": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "edb": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "signed_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "link_expires_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "internal": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": [
        "id",
        "position",
        "name",
        "email"
      ]
    },
    "SignEvent": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "event": {
          "$ref": "#/$defs/SignEventKind"
        },
        "signer_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ]
        },
        "reason": {
          "type": "string"
        },
        "document_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "event",
        "reason",
        "created_at",
        "created_by"
      ]
    },
    "SignEventKind": {
      "type": "string",
      "enum": [
        "sent",
        "opened",
        "signed",
        "declined",
        "expired",
        "cancelled"
      ]
    },
    "SignMail": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "to_email": {
          "type": "string"
        },
        "subject": {
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/MailStatus"
        },
        "detail": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "to_email",
        "subject",
        "status",
        "detail",
        "created_at"
      ]
    },
    "MailStatus": {
      "type": "string",
      "enum": [
        "sent",
        "failed",
        "not_configured"
      ]
    },
    "SignLinkIssued": {
      "type": "object",
      "properties": {
        "signer_id": {
          "type": "integer",
          "format": "i64"
        },
        "email": {
          "type": "string"
        },
        "mail": {
          "$ref": "#/$defs/MailStatus"
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "signer_id",
        "email",
        "mail"
      ]
    },
    "NewSignRequest": {
      "type": "object",
      "properties": {
        "signers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NewSigner"
          }
        },
        "message": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "lang": {
          "type": "string",
          "x-serde-default": "sign_lang_default",
          "default": "mk"
        }
      },
      "required": [
        "signers"
      ]
    },
    "NewSigner": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "edb": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "internal": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": [
        "name",
        "email"
      ]
    },
    "SignCancel": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "reason"
      ]
    },
    "api::addon::AiConfirmation": {
      "type": "object",
      "properties": {
        "confirmed_credits": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "Draft": {
      "type": "object",
      "properties": {
        "summary": {
          "$ref": "#/$defs/DraftSummary"
        },
        "versions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DraftVersion"
          }
        },
        "reviews": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DraftReview"
          }
        },
        "cancellation": {
          "anyOf": [
            {
              "$ref": "#/$defs/DraftCancellation"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "summary",
        "versions",
        "reviews"
      ]
    },
    "DraftVersion": {
      "type": "object",
      "properties": {
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "entry": {
          "$ref": "#/$defs/NewEntry"
        },
        "total": {
          "$ref": "#/$defs/Money"
        },
        "balanced": {
          "type": "boolean"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "version",
        "entry",
        "total",
        "balanced",
        "created_at",
        "created_by"
      ]
    },
    "NewEntry": {
      "type": "object",
      "properties": {
        "posting_date": {
          "type": "string",
          "format": "date"
        },
        "event_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "document": {
          "$ref": "#/$defs/DocumentRef"
        },
        "description": {
          "type": "string"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NewLine"
          }
        },
        "attachments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AttachmentId"
          },
          "x-serde-default": true,
          "default": [],
          "x-omitted-when": "Vec::is_empty"
        },
        "vat": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NewVatRecord"
          },
          "x-serde-default": true,
          "default": [],
          "x-omitted-when": "Vec::is_empty"
        }
      },
      "required": [
        "posting_date",
        "document",
        "description",
        "lines"
      ]
    },
    "DocumentRef": {
      "type": "object",
      "properties": {
        "number": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "issuer": {
          "type": "string"
        }
      },
      "required": [
        "number",
        "date",
        "issuer"
      ]
    },
    "NewLine": {
      "type": "object",
      "properties": {
        "account": {
          "type": "string"
        },
        "debit": {
          "$ref": "#/$defs/Money"
        },
        "credit": {
          "$ref": "#/$defs/Money"
        },
        "asset": {
          "anyOf": [
            {
              "$ref": "#/$defs/AssetId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "partner": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "due_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "fx": {
          "anyOf": [
            {
              "$ref": "#/$defs/Fx"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "cost_center": {
          "anyOf": [
            {
              "$ref": "#/$defs/CostCenterId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "account",
        "debit",
        "credit"
      ]
    },
    "AssetId": {
      "type": "string",
      "format": "uuid"
    },
    "CostCenterId": {
      "type": "string",
      "format": "uuid"
    },
    "NewVatRecord": {
      "type": "object",
      "properties": {
        "direction": {
          "$ref": "#/$defs/VatDirection"
        },
        "treatment": {
          "$ref": "#/$defs/VatTreatment"
        },
        "advance": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "doc_kind": {
          "$ref": "#/$defs/VatDocKind"
        },
        "doc_number": {
          "type": "string"
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "counterparty": {
          "type": "string"
        },
        "counterparty_vat": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "base": {
          "$ref": "#/$defs/Money"
        },
        "rate": {
          "type": "integer",
          "format": "i32"
        },
        "vat": {
          "$ref": "#/$defs/Money"
        },
        "corrects_period": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "direction",
        "treatment",
        "doc_kind",
        "doc_number",
        "doc_date",
        "counterparty",
        "base",
        "rate",
        "vat"
      ]
    },
    "VatDirection": {
      "type": "string",
      "enum": [
        "output",
        "input",
        "import"
      ]
    },
    "VatTreatment": {
      "type": "string",
      "enum": [
        "taxable",
        "exempt_deductible",
        "exempt_nondeductible",
        "not_taxable",
        "reverse_charge",
        "reverse_charge_nondeductible",
        "deductible",
        "nondeductible"
      ]
    },
    "VatDocKind": {
      "type": "string",
      "enum": [
        "invoice",
        "calculation",
        "customs",
        "fiscal_receipt",
        "other"
      ]
    },
    "DraftReview": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "decision": {
          "$ref": "#/$defs/ReviewDecision"
        },
        "note": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "version",
        "decision",
        "note",
        "created_at",
        "created_by"
      ]
    },
    "ReviewDecision": {
      "type": "string",
      "enum": [
        "approved",
        "rejected"
      ]
    },
    "DraftCancellation": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "reason",
        "created_at",
        "created_by"
      ]
    },
    "api::addon::OrderQuantity": {
      "type": "object",
      "properties": {
        "packs": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "expected_gross": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "ApprovalSetting": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "changed_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "changed_by": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "enabled"
      ]
    },
    "SetApproval": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "enabled",
        "reason"
      ]
    },
    "AssetCount": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/AssetCountId"
        },
        "number": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "location": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "description": {
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/AssetCountStatus"
        },
        "decision": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "surplus_entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ]
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "storno_entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "number",
        "date",
        "description",
        "status",
        "created_at",
        "created_by"
      ]
    },
    "AssetCountId": {
      "type": "integer",
      "format": "i64"
    },
    "AssetCountStatus": {
      "type": "string",
      "enum": [
        "open",
        "locked",
        "booked",
        "cancelled"
      ]
    },
    "NewAssetCount": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "format": "date"
        },
        "location": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "description": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "date"
      ]
    },
    "AssetCountDetail": {
      "type": "object",
      "properties": {
        "count": {
          "$ref": "#/$defs/AssetCount"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AssetCountLine"
          }
        }
      },
      "required": [
        "count",
        "lines"
      ]
    },
    "AssetCountLine": {
      "type": "object",
      "properties": {
        "asset_id": {
          "$ref": "#/$defs/AssetId"
        },
        "inventory_no": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "expected": {
          "type": "boolean"
        },
        "found": {
          "type": "boolean"
        },
        "location": {
          "type": "string"
        },
        "custodian": {
          "type": "string"
        },
        "cost": {
          "$ref": "#/$defs/Money"
        },
        "accumulated": {
          "$ref": "#/$defs/Money"
        },
        "value": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        },
        "result": {
          "$ref": "#/$defs/AssetCountResult"
        }
      },
      "required": [
        "asset_id",
        "inventory_no",
        "name",
        "expected",
        "found",
        "location",
        "custodian",
        "cost",
        "accumulated",
        "result"
      ]
    },
    "AssetCountResult": {
      "type": "string",
      "enum": [
        "ok",
        "shortage",
        "surplus",
        "other_location"
      ]
    },
    "BookAssetCount": {
      "type": "object",
      "properties": {
        "decision": {
          "type": "string"
        }
      },
      "required": [
        "decision"
      ]
    },
    "CancelAssetDocument": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "reason"
      ]
    },
    "NewAssetCountEntry": {
      "type": "object",
      "properties": {
        "asset_id": {
          "$ref": "#/$defs/AssetId"
        },
        "found": {
          "type": "boolean"
        },
        "value": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "asset_id",
        "found"
      ]
    },
    "api::fixed_assets::AssetQ": {
      "type": "object",
      "properties": {
        "asset_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "AssetDisposal": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/AssetDisposalId"
        },
        "number": {
          "type": "string"
        },
        "asset_id": {
          "$ref": "#/$defs/AssetId"
        },
        "inventory_no": {
          "type": "string"
        },
        "asset_name": {
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/AssetDisposalKind"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "reason": {
          "type": "string"
        },
        "price": {
          "$ref": "#/$defs/Money"
        },
        "partner_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ]
        },
        "partner_name": {
          "type": "string"
        },
        "proceeds_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "catch_up": {
          "$ref": "#/$defs/Money"
        },
        "cost": {
          "$ref": "#/$defs/Money"
        },
        "accumulated": {
          "$ref": "#/$defs/Money"
        },
        "net_value": {
          "$ref": "#/$defs/Money"
        },
        "gain": {
          "$ref": "#/$defs/Money"
        },
        "loss": {
          "$ref": "#/$defs/Money"
        },
        "gain_account": {
          "type": "string"
        },
        "loss_account": {
          "type": "string"
        },
        "entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "count_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/AssetCountId"
            },
            {
              "type": "null"
            }
          ]
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "storno_entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "number",
        "asset_id",
        "inventory_no",
        "asset_name",
        "kind",
        "date",
        "reason",
        "price",
        "partner_name",
        "catch_up",
        "cost",
        "accumulated",
        "net_value",
        "gain",
        "loss",
        "gain_account",
        "loss_account",
        "entry_id",
        "created_at",
        "created_by"
      ]
    },
    "AssetDisposalId": {
      "type": "integer",
      "format": "i64"
    },
    "AssetDisposalKind": {
      "type": "string",
      "enum": [
        "sale",
        "writeoff",
        "shortage"
      ]
    },
    "NewAssetDisposal": {
      "type": "object",
      "properties": {
        "asset_id": {
          "$ref": "#/$defs/AssetId"
        },
        "kind": {
          "$ref": "#/$defs/AssetDisposalKind"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "reason": {
          "type": "string"
        },
        "price": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true
        },
        "partner_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "proceeds_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "asset_id",
        "kind",
        "date",
        "reason"
      ]
    },
    "AssetRevaluation": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/AssetRevaluationId"
        },
        "number": {
          "type": "string"
        },
        "asset_id": {
          "$ref": "#/$defs/AssetId"
        },
        "inventory_no": {
          "type": "string"
        },
        "asset_name": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "fair_value": {
          "$ref": "#/$defs/Money"
        },
        "appraisal": {
          "type": "string"
        },
        "catch_up": {
          "$ref": "#/$defs/Money"
        },
        "cost_before": {
          "$ref": "#/$defs/Money"
        },
        "accumulated_before": {
          "$ref": "#/$defs/Money"
        },
        "net_value": {
          "$ref": "#/$defs/Money"
        },
        "diff": {
          "$ref": "#/$defs/Money"
        },
        "reserve_delta": {
          "$ref": "#/$defs/Money"
        },
        "pnl_delta": {
          "$ref": "#/$defs/Money"
        },
        "reserve_account": {
          "type": "string"
        },
        "income_account": {
          "type": "string"
        },
        "expense_account": {
          "type": "string"
        },
        "entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "note": {
          "type": "string"
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "storno_entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "number",
        "asset_id",
        "inventory_no",
        "asset_name",
        "date",
        "fair_value",
        "appraisal",
        "catch_up",
        "cost_before",
        "accumulated_before",
        "net_value",
        "diff",
        "reserve_delta",
        "pnl_delta",
        "reserve_account",
        "income_account",
        "expense_account",
        "entry_id",
        "note",
        "created_at",
        "created_by"
      ]
    },
    "AssetRevaluationId": {
      "type": "integer",
      "format": "i64"
    },
    "NewAssetRevaluation": {
      "type": "object",
      "properties": {
        "asset_id": {
          "$ref": "#/$defs/AssetId"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "fair_value": {
          "$ref": "#/$defs/Money"
        },
        "appraisal": {
          "type": "string"
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "asset_id",
        "date",
        "fair_value",
        "appraisal"
      ]
    },
    "FixedAsset": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/AssetId"
        },
        "inventory_no": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "asset_account": {
          "type": "string"
        },
        "depr_account": {
          "type": "string"
        },
        "expense_account": {
          "type": "string"
        },
        "rate_bp": {
          "type": "integer",
          "format": "i32"
        },
        "in_use_from": {
          "type": "string",
          "format": "date"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "cost": {
          "$ref": "#/$defs/Money"
        },
        "accumulated": {
          "$ref": "#/$defs/Money"
        },
        "location": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "custodian": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "disposed_on": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "depr_group": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "id",
        "inventory_no",
        "name",
        "asset_account",
        "depr_account",
        "expense_account",
        "rate_bp",
        "in_use_from",
        "created_at",
        "created_by",
        "cost",
        "accumulated"
      ]
    },
    "NewFixedAsset": {
      "type": "object",
      "properties": {
        "inventory_no": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "asset_account": {
          "type": "string"
        },
        "depr_account": {
          "type": "string"
        },
        "expense_account": {
          "type": "string"
        },
        "rate_bp": {
          "type": "integer",
          "format": "i32"
        },
        "in_use_from": {
          "type": "string",
          "format": "date"
        },
        "depr_group": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "inventory_no",
        "name",
        "asset_account",
        "depr_account",
        "expense_account",
        "rate_bp",
        "in_use_from"
      ]
    },
    "AssetCard": {
      "type": "object",
      "properties": {
        "asset": {
          "$ref": "#/$defs/FixedAsset"
        },
        "rows": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AssetCardRow"
          }
        }
      },
      "required": [
        "asset",
        "rows"
      ]
    },
    "AssetCardRow": {
      "type": "object",
      "properties": {
        "posting_date": {
          "type": "string",
          "format": "date"
        },
        "entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "number": {
          "type": "integer",
          "format": "i32"
        },
        "doc_number": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "account": {
          "type": "string"
        },
        "cost": {
          "$ref": "#/$defs/Money"
        },
        "depreciation": {
          "$ref": "#/$defs/Money"
        },
        "net": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "posting_date",
        "entry_id",
        "year",
        "number",
        "doc_number",
        "description",
        "account",
        "cost",
        "depreciation",
        "net"
      ]
    },
    "AssetAssignment": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "asset_id": {
          "$ref": "#/$defs/AssetId"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "location": {
          "type": "string"
        },
        "custodian": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "asset_id",
        "valid_from",
        "location",
        "custodian",
        "reason",
        "created_at",
        "created_by"
      ]
    },
    "NewAssetAssignment": {
      "type": "object",
      "properties": {
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "location": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "custodian": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "reason": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "valid_from"
      ]
    },
    "AttachmentMeta": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/AttachmentId"
        },
        "filename": {
          "type": "string"
        },
        "content_type": {
          "type": "string"
        },
        "size": {
          "type": "integer",
          "format": "i64"
        },
        "sha256": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "filename",
        "content_type",
        "size",
        "sha256",
        "created_at",
        "created_by"
      ]
    },
    "api::UploadQ": {
      "type": "object",
      "properties": {
        "convert": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "api::LimitQ": {
      "type": "object",
      "properties": {
        "limit": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "AuditEvent": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "at": {
          "type": "string",
          "format": "date-time"
        },
        "actor": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "entity": {
          "type": "string"
        },
        "entity_id": {
          "type": "string"
        },
        "details": {}
      },
      "required": [
        "id",
        "at",
        "actor",
        "action",
        "entity",
        "entity_id",
        "details"
      ]
    },
    "BankAccount": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/BankAccountId"
        },
        "account_no": {
          "type": "string"
        },
        "bank_name": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "gl_account": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "account_no",
        "bank_name",
        "currency",
        "gl_account",
        "name",
        "created_at",
        "created_by"
      ]
    },
    "NewBankAccount": {
      "type": "object",
      "properties": {
        "account_no": {
          "type": "string"
        },
        "bank_name": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "gl_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "name": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "account_no",
        "bank_name",
        "currency"
      ]
    },
    "CancelMatch": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "reason"
      ]
    },
    "BankStatementDetail": {
      "type": "object",
      "properties": {
        "statement": {
          "$ref": "#/$defs/BankStatement"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BankStatementLine"
          }
        }
      },
      "required": [
        "statement",
        "lines"
      ]
    },
    "BankStatement": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/StatementId"
        },
        "bank_account_id": {
          "$ref": "#/$defs/BankAccountId"
        },
        "account_no": {
          "type": "string"
        },
        "bank_name": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "gl_account": {
          "type": "string"
        },
        "statement_no": {
          "type": "string"
        },
        "statement_date": {
          "type": "string",
          "format": "date"
        },
        "opening": {
          "$ref": "#/$defs/Money"
        },
        "closing": {
          "$ref": "#/$defs/Money"
        },
        "format": {
          "$ref": "#/$defs/StatementFormat"
        },
        "attachment_id": {
          "$ref": "#/$defs/AttachmentId"
        },
        "filename": {
          "type": "string"
        },
        "sha256": {
          "type": "string"
        },
        "lines": {
          "type": "integer",
          "format": "i64"
        },
        "unassigned": {
          "type": "integer",
          "format": "i64"
        },
        "status": {
          "$ref": "#/$defs/StatementStatus"
        },
        "entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "bank_account_id",
        "account_no",
        "bank_name",
        "currency",
        "gl_account",
        "statement_no",
        "statement_date",
        "opening",
        "closing",
        "format",
        "attachment_id",
        "filename",
        "sha256",
        "lines",
        "unassigned",
        "status",
        "created_at",
        "created_by"
      ]
    },
    "StatementId": {
      "type": "integer",
      "format": "i64"
    },
    "StatementFormat": {
      "type": "string",
      "enum": [
        "camt053",
        "mt940",
        "stb_txt",
        "stb_dat",
        "nlb_txt",
        "kb300",
        "excel",
        "mapped_xml",
        "csv"
      ]
    },
    "StatementStatus": {
      "type": "string",
      "enum": [
        "open",
        "ready",
        "posted"
      ]
    },
    "BankStatementLine": {
      "type": "object",
      "properties": {
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "booking_date": {
          "type": "string",
          "format": "date"
        },
        "value_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "counterparty_name": {
          "type": "string"
        },
        "counterparty_account": {
          "type": "string"
        },
        "counterparty_edb": {
          "type": "string"
        },
        "reference": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "bank_ref": {
          "type": "string"
        },
        "assigned": {
          "$ref": "#/$defs/Money"
        },
        "assignments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BankAssignment"
          }
        }
      },
      "required": [
        "line_no",
        "booking_date",
        "amount",
        "counterparty_name",
        "counterparty_account",
        "counterparty_edb",
        "reference",
        "description",
        "bank_ref",
        "assigned",
        "assignments"
      ]
    },
    "BankAssignment": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "item": {
          "anyOf": [
            {
              "$ref": "#/$defs/LineRef"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "account": {
          "type": "string"
        },
        "partner": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "partner_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "note": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "cancelled": {
          "anyOf": [
            {
              "$ref": "#/$defs/MatchCancellation"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "rule": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "cost_center": {
          "anyOf": [
            {
              "$ref": "#/$defs/CostCenterId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "id",
        "line_no",
        "amount",
        "account",
        "note",
        "created_at",
        "created_by"
      ]
    },
    "LineRef": {
      "type": "object",
      "properties": {
        "entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "line_no": {
          "type": "integer",
          "format": "i32"
        }
      },
      "required": [
        "entry_id",
        "line_no"
      ]
    },
    "MatchCancellation": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "reason",
        "created_at",
        "created_by"
      ]
    },
    "ImportStatement": {
      "type": "object",
      "properties": {
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/BankAccountId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "format": {
          "anyOf": [
            {
              "$ref": "#/$defs/StatementFormat"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "profile": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "opening": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "closing": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": []
    },
    "BankProfile": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "config": {
          "$ref": "#/$defs/CsvProfileConfig"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "config",
        "created_at",
        "created_by"
      ]
    },
    "CsvProfileConfig": {
      "type": "object",
      "properties": {
        "delimiter": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1,
          "x-serde-default": "default_delimiter",
          "default": ";"
        },
        "date_format": {
          "type": "string",
          "x-serde-default": "default_date_format",
          "default": "%d.%m.%Y"
        },
        "skip_rows": {
          "type": "integer",
          "format": "usize",
          "minimum": 0,
          "x-serde-default": true,
          "default": 0
        },
        "header": {
          "type": "boolean",
          "x-serde-default": "default_true",
          "default": true
        },
        "columns": {
          "$ref": "#/$defs/CsvColumns"
        }
      },
      "required": [
        "columns"
      ]
    },
    "CsvColumns": {
      "type": "object",
      "properties": {
        "booking_date": {
          "anyOf": [
            {
              "$ref": "#/$defs/CsvColumn"
            },
            {
              "type": "null"
            }
          ]
        },
        "value_date": {
          "anyOf": [
            {
              "$ref": "#/$defs/CsvColumn"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "amount": {
          "anyOf": [
            {
              "$ref": "#/$defs/CsvColumn"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "debit": {
          "anyOf": [
            {
              "$ref": "#/$defs/CsvColumn"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "credit": {
          "anyOf": [
            {
              "$ref": "#/$defs/CsvColumn"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "counterparty_name": {
          "anyOf": [
            {
              "$ref": "#/$defs/CsvColumn"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "counterparty_account": {
          "anyOf": [
            {
              "$ref": "#/$defs/CsvColumn"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "counterparty_edb": {
          "anyOf": [
            {
              "$ref": "#/$defs/CsvColumn"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "reference": {
          "anyOf": [
            {
              "$ref": "#/$defs/CsvColumn"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "description": {
          "anyOf": [
            {
              "$ref": "#/$defs/CsvColumn"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "bank_ref": {
          "anyOf": [
            {
              "$ref": "#/$defs/CsvColumn"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": []
    },
    "CsvColumn": {
      "anyOf": [
        {
          "type": "integer",
          "format": "usize",
          "minimum": 0
        },
        {
          "type": "string"
        }
      ]
    },
    "NewBankProfile": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "config": {
          "$ref": "#/$defs/CsvProfileConfig"
        }
      },
      "required": [
        "name",
        "config"
      ]
    },
    "BankRule": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/BankRuleId"
        },
        "name": {
          "type": "string"
        },
        "priority": {
          "type": "integer",
          "format": "i32"
        },
        "direction": {
          "$ref": "#/$defs/RuleDirection"
        },
        "counterparty_account": {
          "type": "string"
        },
        "counterparty_edb": {
          "type": "string"
        },
        "text_contains": {
          "type": "string"
        },
        "account": {
          "type": "string"
        },
        "partner": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "partner_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "cost_center": {
          "anyOf": [
            {
              "$ref": "#/$defs/CostCenterId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "active": {
          "type": "boolean"
        },
        "deactivation_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "priority",
        "direction",
        "counterparty_account",
        "counterparty_edb",
        "text_contains",
        "account",
        "valid_from",
        "active",
        "created_at",
        "created_by"
      ]
    },
    "BankRuleId": {
      "type": "string",
      "format": "uuid"
    },
    "RuleDirection": {
      "type": "string",
      "enum": [
        "in",
        "out",
        "any"
      ]
    },
    "NewBankRule": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "priority": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": "default_priority",
          "default": 100
        },
        "direction": {
          "$ref": "#/$defs/RuleDirection"
        },
        "counterparty_account": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "counterparty_edb": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "text_contains": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "account": {
          "type": "string"
        },
        "partner": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "cost_center": {
          "anyOf": [
            {
              "$ref": "#/$defs/CostCenterId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        }
      },
      "required": [
        "name",
        "direction",
        "account",
        "valid_from"
      ]
    },
    "BankAutomation": {
      "type": "object",
      "properties": {
        "bank_account": {
          "type": "string",
          "format": "uuid"
        },
        "max_amount": {
          "$ref": "#/$defs/Money"
        },
        "mode": {
          "$ref": "#/$defs/BankAutomationMode"
        }
      },
      "required": [
        "bank_account",
        "max_amount",
        "mode"
      ]
    },
    "BankAutomationMode": {
      "type": "string",
      "enum": [
        "off",
        "assign",
        "post"
      ]
    },
    "RulePreviewLine": {
      "type": "object",
      "properties": {
        "statement": {
          "type": "string"
        },
        "line": {
          "type": "integer",
          "format": "i32"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "description": {
          "type": "string"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "statement",
        "line",
        "date",
        "description",
        "amount"
      ]
    },
    "api::bank::StatementsQ": {
      "type": "object",
      "properties": {
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/BankAccountId"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "api::bank::StatementQuery": {
      "type": "object",
      "properties": {
        "summary_only": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": []
    },
    "AutoMatchResult": {
      "type": "object",
      "properties": {
        "assignments": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "i64"
          }
        },
        "lines": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "i32"
          }
        }
      },
      "required": [
        "assignments",
        "lines"
      ]
    },
    "NewBankAssignment": {
      "type": "object",
      "properties": {
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "item": {
          "anyOf": [
            {
              "$ref": "#/$defs/LineRef"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "partner": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "cost_center": {
          "anyOf": [
            {
              "$ref": "#/$defs/CostCenterId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "line_no",
        "amount"
      ]
    },
    "Entry": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/EntryId"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "number": {
          "type": "integer",
          "format": "i32"
        },
        "posting_date": {
          "type": "string",
          "format": "date"
        },
        "event_date": {
          "type": "string",
          "format": "date"
        },
        "document": {
          "$ref": "#/$defs/DocumentRef"
        },
        "description": {
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/EntryKind"
        },
        "reverses": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ]
        },
        "reversed_by": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Line"
          }
        },
        "attachments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AttachmentMeta"
          },
          "x-serde-default": true,
          "default": []
        },
        "vat": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/VatRecord"
          },
          "x-serde-default": true,
          "default": []
        }
      },
      "required": [
        "id",
        "year",
        "number",
        "posting_date",
        "event_date",
        "document",
        "description",
        "kind",
        "created_at",
        "created_by",
        "lines"
      ]
    },
    "EntryKind": {
      "type": "string",
      "enum": [
        "regular",
        "storno",
        "closing",
        "opening"
      ]
    },
    "Line": {
      "type": "object",
      "properties": {
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "account": {
          "type": "string"
        },
        "debit": {
          "$ref": "#/$defs/Money"
        },
        "credit": {
          "$ref": "#/$defs/Money"
        },
        "asset": {
          "anyOf": [
            {
              "$ref": "#/$defs/AssetId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "partner": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "due_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "fx": {
          "anyOf": [
            {
              "$ref": "#/$defs/Fx"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "cost_center": {
          "anyOf": [
            {
              "$ref": "#/$defs/CostCenterId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "line_no",
        "account",
        "debit",
        "credit"
      ]
    },
    "VatRecord": {
      "type": "object",
      "properties": {
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "direction": {
          "$ref": "#/$defs/VatDirection"
        },
        "treatment": {
          "$ref": "#/$defs/VatTreatment"
        },
        "advance": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "doc_kind": {
          "$ref": "#/$defs/VatDocKind"
        },
        "doc_number": {
          "type": "string"
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "counterparty": {
          "type": "string"
        },
        "counterparty_vat": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "base": {
          "$ref": "#/$defs/Money"
        },
        "rate": {
          "type": "integer",
          "format": "i32"
        },
        "vat": {
          "$ref": "#/$defs/Money"
        },
        "corrects_period": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "period_start": {
          "type": "string",
          "format": "date"
        },
        "period_end": {
          "type": "string",
          "format": "date"
        }
      },
      "required": [
        "line_no",
        "direction",
        "treatment",
        "doc_kind",
        "doc_number",
        "doc_date",
        "counterparty",
        "base",
        "rate",
        "vat",
        "period_start",
        "period_end"
      ]
    },
    "BankRuleSuggestion": {
      "type": "object",
      "properties": {
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "rule": {
          "$ref": "#/$defs/BankRuleId"
        },
        "rule_name": {
          "type": "string"
        },
        "account": {
          "type": "string"
        },
        "partner": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "cost_center": {
          "anyOf": [
            {
              "$ref": "#/$defs/CostCenterId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "line_no",
        "rule",
        "rule_name",
        "account",
        "amount"
      ]
    },
    "BankSuggestion": {
      "type": "object",
      "properties": {
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "item": {
          "$ref": "#/$defs/LineRef"
        },
        "partner_id": {
          "$ref": "#/$defs/PartnerId"
        },
        "partner_name": {
          "type": "string"
        },
        "doc_number": {
          "type": "string"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "score": {
          "type": "integer",
          "format": "i32"
        },
        "reasons": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "sure": {
          "type": "boolean"
        }
      },
      "required": [
        "line_no",
        "item",
        "partner_id",
        "partner_name",
        "doc_number",
        "amount",
        "score",
        "reasons",
        "sure"
      ]
    },
    "BookTransfer": {
      "type": "object",
      "properties": {
        "previous": {
          "anyOf": [
            {
              "$ref": "#/$defs/BureauId"
            },
            {
              "type": "null"
            }
          ]
        },
        "destination": {
          "anyOf": [
            {
              "$ref": "#/$defs/BureauId"
            },
            {
              "type": "null"
            }
          ]
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "reason"
      ]
    },
    "BookDestination": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "books_from": {
          "type": "string",
          "format": "date"
        }
      },
      "required": [
        "name",
        "books_from"
      ]
    },
    "api::bureau::Mandate": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "reason"
      ]
    },
    "api::buyout_note::ListQ": {
      "type": "object",
      "properties": {
        "year": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "BuyoutNote": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/BuyoutNoteId"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "number": {
          "type": "integer",
          "format": "i32"
        },
        "note_date": {
          "type": "string",
          "format": "date"
        },
        "warehouse_id": {
          "$ref": "#/$defs/WarehouseId"
        },
        "warehouse_code": {
          "type": "string"
        },
        "warehouse_name": {
          "type": "string"
        },
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "embg": {
          "type": "string"
        },
        "person_name": {
          "type": "string"
        },
        "basis": {
          "$ref": "#/$defs/BuyoutBasis"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "norm_cost": {
          "$ref": "#/$defs/Money"
        },
        "contributions": {
          "$ref": "#/$defs/Money"
        },
        "pit": {
          "$ref": "#/$defs/Money"
        },
        "net": {
          "$ref": "#/$defs/Money"
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "status": {
          "$ref": "#/$defs/BuyoutNoteStatus"
        },
        "entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "storno_entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "receipt_doc_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/StockDocId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "payment_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/OtherIncomeId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "payment_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "cancel_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "year",
        "number",
        "note_date",
        "warehouse_id",
        "warehouse_code",
        "warehouse_name",
        "employee_id",
        "embg",
        "person_name",
        "basis",
        "amount",
        "gross",
        "norm_cost",
        "contributions",
        "pit",
        "net",
        "status",
        "created_at",
        "created_by"
      ]
    },
    "BuyoutNoteId": {
      "type": "integer",
      "format": "i64"
    },
    "BuyoutBasis": {
      "type": "string",
      "enum": [
        "net",
        "gross"
      ]
    },
    "BuyoutNoteStatus": {
      "type": "string",
      "enum": [
        "posted",
        "cancelled"
      ]
    },
    "StockDocId": {
      "type": "integer",
      "format": "i64"
    },
    "OtherIncomeId": {
      "type": "integer",
      "format": "i64"
    },
    "NewBuyoutNote": {
      "type": "object",
      "properties": {
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "warehouse_id": {
          "$ref": "#/$defs/WarehouseId"
        },
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "basis": {
          "$ref": "#/$defs/BuyoutBasis",
          "x-serde-default": true
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NewBuyoutNoteLine"
          }
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "warehouse_id",
        "employee_id",
        "lines"
      ]
    },
    "NewBuyoutNoteLine": {
      "type": "object",
      "properties": {
        "item_id": {
          "$ref": "#/$defs/ItemId"
        },
        "quantity": {
          "$ref": "#/$defs/Qty"
        },
        "price": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "item_id",
        "quantity",
        "price"
      ]
    },
    "ItemId": {
      "type": "string",
      "format": "uuid"
    },
    "Qty": {
      "type": "integer",
      "format": "i64"
    },
    "BuyoutNoteDetail": {
      "type": "object",
      "properties": {
        "note": {
          "$ref": "#/$defs/BuyoutNote"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BuyoutNoteLine"
          }
        },
        "agricultural": {
          "anyOf": [
            {
              "$ref": "#/$defs/AgriculturalCheck"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "note",
        "lines"
      ]
    },
    "BuyoutNoteLine": {
      "type": "object",
      "properties": {
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "item_id": {
          "$ref": "#/$defs/ItemId"
        },
        "item_code": {
          "type": "string"
        },
        "item_name": {
          "type": "string"
        },
        "unit": {
          "type": "string"
        },
        "quantity": {
          "$ref": "#/$defs/Qty"
        },
        "price": {
          "$ref": "#/$defs/Money"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "gross": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "line_no",
        "item_id",
        "item_code",
        "item_name",
        "unit",
        "quantity",
        "price",
        "amount",
        "gross"
      ]
    },
    "AgriculturalCheck": {
      "type": "object",
      "properties": {
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "embg": {
          "type": "string"
        },
        "previous": {
          "$ref": "#/$defs/Money"
        },
        "total": {
          "$ref": "#/$defs/Money"
        },
        "threshold": {
          "$ref": "#/$defs/Money"
        },
        "exceeded": {
          "type": "boolean"
        }
      },
      "required": [
        "year",
        "embg",
        "previous",
        "total",
        "threshold",
        "exceeded"
      ]
    },
    "CancelBuyoutNote": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        },
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "reason"
      ]
    },
    "api::CashBookQ": {
      "type": "object",
      "properties": {
        "account": {
          "type": "string"
        },
        "from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "to": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "account"
      ]
    },
    "CashBook": {
      "type": "object",
      "properties": {
        "account": {
          "type": "string"
        },
        "from": {
          "type": "string",
          "format": "date"
        },
        "to": {
          "type": "string",
          "format": "date"
        },
        "opening": {
          "$ref": "#/$defs/Money"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CashBookItem"
          }
        },
        "closing": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "account",
        "from",
        "to",
        "opening",
        "items",
        "closing"
      ]
    },
    "CashBookItem": {
      "type": "object",
      "properties": {
        "posting_date": {
          "type": "string",
          "format": "date"
        },
        "entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "number": {
          "type": "integer",
          "format": "i32"
        },
        "doc_number": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "receipt": {
          "$ref": "#/$defs/Money"
        },
        "payment": {
          "$ref": "#/$defs/Money"
        },
        "balance": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "posting_date",
        "entry_id",
        "year",
        "number",
        "doc_number",
        "description",
        "receipt",
        "payment",
        "balance"
      ]
    },
    "api::RangeQ": {
      "type": "object",
      "properties": {
        "from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "to": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "CashFlow": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string",
          "format": "date"
        },
        "to": {
          "type": "string",
          "format": "date"
        },
        "accounts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CashAccountFlow"
          }
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CashFlowLine"
          }
        }
      },
      "required": [
        "from",
        "to",
        "accounts",
        "lines"
      ]
    },
    "CashAccountFlow": {
      "type": "object",
      "properties": {
        "account": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/CashAccountKind"
        },
        "opening": {
          "$ref": "#/$defs/Money"
        },
        "inflow": {
          "$ref": "#/$defs/Money"
        },
        "outflow": {
          "$ref": "#/$defs/Money"
        },
        "closing": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "account",
        "name",
        "kind",
        "opening",
        "inflow",
        "outflow",
        "closing"
      ]
    },
    "CashAccountKind": {
      "type": "string",
      "enum": [
        "bank",
        "cash",
        "other"
      ]
    },
    "CashFlowLine": {
      "type": "object",
      "properties": {
        "activity": {
          "$ref": "#/$defs/CashFlowActivity"
        },
        "account": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "inflow": {
          "$ref": "#/$defs/Money"
        },
        "outflow": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "activity",
        "account",
        "name",
        "inflow",
        "outflow"
      ]
    },
    "CashFlowActivity": {
      "type": "string",
      "enum": [
        "operating",
        "investing",
        "financing"
      ]
    },
    "MonthClose": {
      "type": "object",
      "properties": {
        "period": {
          "type": "string",
          "format": "date"
        },
        "steps": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CloseStep"
          }
        }
      },
      "required": [
        "period",
        "steps"
      ]
    },
    "CloseStep": {
      "type": "object",
      "properties": {
        "task": {
          "$ref": "#/$defs/CloseTask"
        },
        "status": {
          "$ref": "#/$defs/CloseStatus"
        },
        "auto_status": {
          "$ref": "#/$defs/CloseStatus"
        },
        "open_count": {
          "type": "integer",
          "format": "i64"
        },
        "total_count": {
          "type": "integer",
          "format": "i64"
        },
        "due_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "mark": {
          "anyOf": [
            {
              "$ref": "#/$defs/CloseMarkState"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "marked_by": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "marked_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "task",
        "status",
        "auto_status",
        "open_count",
        "total_count"
      ]
    },
    "CloseMarkState": {
      "type": "string",
      "enum": [
        "done",
        "not_applicable",
        "auto"
      ]
    },
    "MarkCloseStep": {
      "type": "object",
      "properties": {
        "state": {
          "$ref": "#/$defs/CloseMarkState"
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "state"
      ]
    },
    "api::efaktura::SuggestQ": {
      "type": "object",
      "properties": {
        "q": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": []
    },
    "CompanySuggestion": {
      "type": "object",
      "properties": {
        "edb": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "embs": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "partner_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        },
        "active": {
          "type": "boolean"
        }
      },
      "required": [
        "edb",
        "name",
        "embs",
        "city",
        "active"
      ]
    },
    "Compensation": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/CompensationId"
        },
        "number": {
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/CompensationKind"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "total": {
          "$ref": "#/$defs/Money"
        },
        "note": {
          "type": "string"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompensationLine"
          }
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "storno_entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "number",
        "kind",
        "date",
        "entry_id",
        "total",
        "note",
        "lines",
        "created_at",
        "created_by"
      ]
    },
    "CompensationId": {
      "type": "integer",
      "format": "i64"
    },
    "CompensationKind": {
      "type": "string",
      "enum": [
        "bilateral",
        "multilateral"
      ]
    },
    "CompensationLine": {
      "type": "object",
      "properties": {
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "item_entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "item_line_no": {
          "type": "integer",
          "format": "i32"
        },
        "partner_id": {
          "$ref": "#/$defs/PartnerId"
        },
        "partner_name": {
          "type": "string"
        },
        "account_code": {
          "type": "string"
        },
        "doc_number": {
          "type": "string"
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "receivable": {
          "type": "boolean"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "line_no",
        "item_entry_id",
        "item_line_no",
        "partner_id",
        "partner_name",
        "account_code",
        "doc_number",
        "doc_date",
        "receivable",
        "amount"
      ]
    },
    "NewCompensation": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/CompensationKind"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompensationItem"
          }
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "kind",
        "date",
        "items"
      ]
    },
    "CompensationItem": {
      "type": "object",
      "properties": {
        "entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "entry_id",
        "line_no",
        "amount"
      ]
    },
    "api::compensations::ProposalQ": {
      "type": "object",
      "properties": {
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "CompensationProposal": {
      "type": "object",
      "properties": {
        "partner_id": {
          "$ref": "#/$defs/PartnerId"
        },
        "partner_name": {
          "type": "string"
        },
        "receivable": {
          "$ref": "#/$defs/Money"
        },
        "payable": {
          "$ref": "#/$defs/Money"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ProposalItem"
          }
        }
      },
      "required": [
        "partner_id",
        "partner_name",
        "receivable",
        "payable",
        "amount",
        "items"
      ]
    },
    "ProposalItem": {
      "type": "object",
      "properties": {
        "entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "account_code": {
          "type": "string"
        },
        "doc_number": {
          "type": "string"
        },
        "due_date": {
          "type": "string",
          "format": "date"
        },
        "receivable": {
          "type": "boolean"
        },
        "open": {
          "$ref": "#/$defs/Money"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "entry_id",
        "line_no",
        "account_code",
        "doc_number",
        "due_date",
        "receivable",
        "open",
        "amount"
      ]
    },
    "CancelCompensation": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        },
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "reason"
      ]
    },
    "ContactEmail": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "updated_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "updated_by": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": []
    },
    "SetContactEmail": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": []
    },
    "ContractId": {
      "type": "string",
      "format": "uuid"
    },
    "ContractChange": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/ContractKind"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "valid_to": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "hours_per_week": {
          "type": "integer",
          "format": "i32"
        },
        "salary_basis": {
          "$ref": "#/$defs/SalaryBasis"
        },
        "salary_amount": {
          "$ref": "#/$defs/Money"
        },
        "cost_account": {
          "type": "string"
        },
        "personal_exemption": {
          "type": "boolean",
          "x-serde-default": "yes",
          "default": true
        },
        "prior_service": {
          "$ref": "#/$defs/PriorService",
          "x-serde-default": true,
          "x-omitted-when": "PriorService::is_empty"
        },
        "reason": {
          "type": "string"
        },
        "effective_from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "kind",
        "valid_from",
        "hours_per_week",
        "salary_basis",
        "salary_amount",
        "cost_account",
        "reason"
      ]
    },
    "ContractData": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/ContractKind"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "valid_to": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "hours_per_week": {
          "type": "integer",
          "format": "i32"
        },
        "salary_basis": {
          "$ref": "#/$defs/SalaryBasis"
        },
        "salary_amount": {
          "$ref": "#/$defs/Money"
        },
        "cost_account": {
          "type": "string"
        },
        "personal_exemption": {
          "type": "boolean",
          "x-serde-default": "yes",
          "default": true
        },
        "prior_service": {
          "$ref": "#/$defs/PriorService",
          "x-serde-default": true,
          "x-omitted-when": "PriorService::is_empty"
        }
      },
      "required": [
        "kind",
        "valid_from",
        "hours_per_week",
        "salary_basis",
        "salary_amount",
        "cost_account"
      ]
    },
    "ContractKind": {
      "type": "string",
      "enum": [
        "indefinite",
        "fixed_term"
      ]
    },
    "SalaryBasis": {
      "type": "string",
      "enum": [
        "gross",
        "net",
        "points"
      ]
    },
    "PriorService": {
      "type": "object",
      "properties": {
        "years": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": true,
          "default": 0
        },
        "months": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": true,
          "default": 0
        },
        "days": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": true,
          "default": 0
        },
        "insured_since": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "proof": {
          "anyOf": [
            {
              "$ref": "#/$defs/AttachmentId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "approval": {
          "type": "string",
          "x-serde-default": true,
          "default": "",
          "x-omitted-when": "String::is_empty"
        }
      },
      "required": []
    },
    "Contract": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/ContractId"
        },
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "current": {
          "$ref": "#/$defs/ContractData"
        },
        "versions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ContractVersion"
          }
        }
      },
      "required": [
        "id",
        "employee_id",
        "version",
        "current",
        "versions"
      ]
    },
    "ContractVersion": {
      "type": "object",
      "properties": {
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "kind": {
          "$ref": "#/$defs/ContractKind"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "valid_to": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "hours_per_week": {
          "type": "integer",
          "format": "i32"
        },
        "salary_basis": {
          "$ref": "#/$defs/SalaryBasis"
        },
        "salary_amount": {
          "$ref": "#/$defs/Money"
        },
        "cost_account": {
          "type": "string"
        },
        "personal_exemption": {
          "type": "boolean",
          "x-serde-default": "yes",
          "default": true
        },
        "prior_service": {
          "$ref": "#/$defs/PriorService",
          "x-serde-default": true,
          "x-omitted-when": "PriorService::is_empty"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "effective_from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "version",
        "kind",
        "valid_from",
        "hours_per_week",
        "salary_basis",
        "salary_amount",
        "cost_account",
        "created_at",
        "created_by"
      ]
    },
    "api::cost_centers::ResultQ": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string",
          "format": "date"
        },
        "to": {
          "type": "string",
          "format": "date"
        }
      },
      "required": [
        "from",
        "to"
      ]
    },
    "CostCenterResultRow": {
      "type": "object",
      "properties": {
        "cost_center": {
          "anyOf": [
            {
              "$ref": "#/$defs/CostCenterId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "parent": {
          "anyOf": [
            {
              "$ref": "#/$defs/CostCenterId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "active": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "revenue": {
          "$ref": "#/$defs/Money"
        },
        "expenses": {
          "$ref": "#/$defs/Money"
        },
        "profit": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "revenue",
        "expenses",
        "profit"
      ]
    },
    "CostCenterRule": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/CostCenterRuleId"
        },
        "account_prefix": {
          "type": "string"
        },
        "required": {
          "type": "boolean"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "account_prefix",
        "required",
        "valid_from",
        "created_at",
        "created_by"
      ]
    },
    "CostCenterRuleId": {
      "type": "integer",
      "format": "i64"
    },
    "NewCostCenterRule": {
      "type": "object",
      "properties": {
        "account_prefix": {
          "type": "string"
        },
        "required": {
          "type": "boolean"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "account_prefix",
        "required",
        "valid_from"
      ]
    },
    "CostCenter": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/CostCenterId"
        },
        "code": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "name": {
          "type": "string"
        },
        "parent": {
          "anyOf": [
            {
              "$ref": "#/$defs/CostCenterId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "active": {
          "type": "boolean"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "changed_at": {
          "type": "string",
          "format": "date-time"
        },
        "changed_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "code",
        "version",
        "name",
        "active",
        "created_at",
        "created_by",
        "changed_at",
        "changed_by"
      ]
    },
    "NewCostCenter": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "parent": {
          "anyOf": [
            {
              "$ref": "#/$defs/CostCenterId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "code",
        "name"
      ]
    },
    "CostCenterChange": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "parent": {
          "anyOf": [
            {
              "$ref": "#/$defs/CostCenterId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "active": {
          "type": "boolean"
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "active",
        "reason"
      ]
    },
    "api::customs::ListQ": {
      "type": "object",
      "properties": {
        "year": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "CustomsDeclaration": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/CustomsDeclarationId"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "number": {
          "type": "integer",
          "format": "i32"
        },
        "declaration_no": {
          "type": "string"
        },
        "decl_date": {
          "type": "string",
          "format": "date"
        },
        "posting_date": {
          "type": "string",
          "format": "date"
        },
        "supplier_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "supplier_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "forwarder_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "forwarder_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "currency": {
          "type": "string"
        },
        "customs_value_cur": {
          "$ref": "#/$defs/Money"
        },
        "rate": {
          "type": "string"
        },
        "customs_value": {
          "$ref": "#/$defs/Money"
        },
        "duty": {
          "$ref": "#/$defs/Money"
        },
        "excise": {
          "$ref": "#/$defs/Money"
        },
        "other_duties": {
          "$ref": "#/$defs/Money"
        },
        "vat_base": {
          "$ref": "#/$defs/Money"
        },
        "vat_rate": {
          "type": "integer",
          "format": "i32"
        },
        "vat": {
          "$ref": "#/$defs/Money"
        },
        "vat_deductible": {
          "type": "boolean"
        },
        "forwarding": {
          "$ref": "#/$defs/Money"
        },
        "forwarding_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "method": {
          "$ref": "#/$defs/CustomsAllocation"
        },
        "costs_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "allocated": {
          "$ref": "#/$defs/Money"
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "receipts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StockDocId"
          }
        },
        "status": {
          "$ref": "#/$defs/CustomsDeclarationStatus"
        },
        "entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "storno_entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "cancel_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "year",
        "number",
        "declaration_no",
        "decl_date",
        "posting_date",
        "currency",
        "customs_value_cur",
        "rate",
        "customs_value",
        "duty",
        "excise",
        "other_duties",
        "vat_base",
        "vat_rate",
        "vat",
        "vat_deductible",
        "forwarding",
        "method",
        "allocated",
        "receipts",
        "status",
        "created_at",
        "created_by"
      ]
    },
    "CustomsDeclarationId": {
      "type": "integer",
      "format": "i64"
    },
    "CustomsAllocation": {
      "type": "string",
      "enum": [
        "value",
        "weight",
        "quantity"
      ]
    },
    "CustomsDeclarationStatus": {
      "type": "string",
      "enum": [
        "posted",
        "cancelled"
      ]
    },
    "NewCustomsDeclaration": {
      "type": "object",
      "properties": {
        "declaration_no": {
          "type": "string"
        },
        "decl_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "posting_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "supplier_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "forwarder_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "currency": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "customs_value_cur": {
          "$ref": "#/$defs/Money"
        },
        "rate": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "duty": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true
        },
        "excise": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true
        },
        "other_duties": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true
        },
        "vat_base": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "vat_rate": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "vat": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "vat_deductible": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "forwarding": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true
        },
        "forwarding_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "method": {
          "$ref": "#/$defs/CustomsAllocation",
          "x-serde-default": true
        },
        "costs_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "receipts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StockDocId"
          }
        },
        "weights": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CustomsWeight"
          },
          "x-serde-default": true,
          "default": [],
          "x-omitted-when": "Vec::is_empty"
        }
      },
      "required": [
        "declaration_no",
        "customs_value_cur",
        "receipts"
      ]
    },
    "CustomsWeight": {
      "type": "object",
      "properties": {
        "doc_id": {
          "$ref": "#/$defs/StockDocId"
        },
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "weight": {
          "$ref": "#/$defs/Qty"
        }
      },
      "required": [
        "doc_id",
        "line_no",
        "weight"
      ]
    },
    "CustomsDeclarationDetail": {
      "type": "object",
      "properties": {
        "declaration": {
          "$ref": "#/$defs/CustomsDeclaration"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CustomsAllocationLine"
          }
        },
        "cost_docs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CustomsCostDoc"
          }
        },
        "corrections": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CustomsCostCorrection"
          },
          "x-serde-default": true,
          "default": []
        }
      },
      "required": [
        "declaration",
        "lines",
        "cost_docs"
      ]
    },
    "CustomsAllocationLine": {
      "type": "object",
      "properties": {
        "doc_id": {
          "$ref": "#/$defs/StockDocId"
        },
        "receipt_number": {
          "type": "string"
        },
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "item_id": {
          "$ref": "#/$defs/ItemId"
        },
        "item_code": {
          "type": "string"
        },
        "item_name": {
          "type": "string"
        },
        "quantity": {
          "$ref": "#/$defs/Qty"
        },
        "basis": {
          "type": "string"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "doc_id",
        "receipt_number",
        "line_no",
        "item_id",
        "item_code",
        "item_name",
        "quantity",
        "basis",
        "amount"
      ]
    },
    "CustomsCostDoc": {
      "type": "object",
      "properties": {
        "doc_id": {
          "$ref": "#/$defs/StockDocId"
        },
        "receipt_id": {
          "$ref": "#/$defs/StockDocId"
        },
        "role": {
          "type": "string"
        },
        "doc_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "corrected": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true,
          "x-omitted-when": "is_zero"
        },
        "correction_entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "doc_id",
        "receipt_id",
        "role",
        "doc_date",
        "amount"
      ]
    },
    "CustomsCostCorrection": {
      "type": "object",
      "properties": {
        "storno_doc_id": {
          "$ref": "#/$defs/StockDocId"
        },
        "out_doc_id": {
          "$ref": "#/$defs/StockDocId"
        },
        "out_doc_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "out_doc_date": {
          "type": "string",
          "format": "date"
        },
        "item_code": {
          "type": "string"
        },
        "item_name": {
          "type": "string"
        },
        "account": {
          "type": "string"
        },
        "partner_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "storno_doc_id",
        "out_doc_id",
        "out_doc_date",
        "item_code",
        "item_name",
        "account",
        "amount"
      ]
    },
    "CancelCustomsDeclaration": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        },
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "reason"
      ]
    },
    "api::daily_turnover::ListQ": {
      "type": "object",
      "properties": {
        "year": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "DailyTurnover": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/DailyTurnoverId"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "number": {
          "type": "integer",
          "format": "i32"
        },
        "turnover_date": {
          "type": "string",
          "format": "date"
        },
        "warehouse_id": {
          "$ref": "#/$defs/WarehouseId"
        },
        "warehouse_code": {
          "type": "string"
        },
        "warehouse_name": {
          "type": "string"
        },
        "fiscal_report": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "cash": {
          "$ref": "#/$defs/Money"
        },
        "card": {
          "$ref": "#/$defs/Money"
        },
        "base": {
          "$ref": "#/$defs/Money"
        },
        "vat": {
          "$ref": "#/$defs/Money"
        },
        "cost": {
          "$ref": "#/$defs/Money"
        },
        "stock_sale_value": {
          "$ref": "#/$defs/Money"
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "status": {
          "$ref": "#/$defs/DailyTurnoverStatus"
        },
        "entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "storno_entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "issue_doc_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/StockDocId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "cancel_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "year",
        "number",
        "turnover_date",
        "warehouse_id",
        "warehouse_code",
        "warehouse_name",
        "gross",
        "cash",
        "card",
        "base",
        "vat",
        "cost",
        "stock_sale_value",
        "status",
        "created_at",
        "created_by"
      ]
    },
    "DailyTurnoverId": {
      "type": "integer",
      "format": "i64"
    },
    "DailyTurnoverStatus": {
      "type": "string",
      "enum": [
        "posted",
        "cancelled"
      ]
    },
    "NewDailyTurnover": {
      "type": "object",
      "properties": {
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "warehouse_id": {
          "$ref": "#/$defs/WarehouseId"
        },
        "fiscal_report": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "cash": {
          "$ref": "#/$defs/Money"
        },
        "card": {
          "$ref": "#/$defs/Money"
        },
        "rates": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NewDailyTurnoverRate"
          }
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NewDailyTurnoverItem"
          }
        },
        "domestic": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "$ref": "#/$defs/NewDailyTurnoverRate"
              }
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "warehouse_id",
        "gross",
        "cash",
        "card",
        "rates",
        "items"
      ]
    },
    "NewDailyTurnoverRate": {
      "type": "object",
      "properties": {
        "rate": {
          "type": "integer",
          "format": "i32"
        },
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "vat": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "rate",
        "gross"
      ]
    },
    "NewDailyTurnoverItem": {
      "type": "object",
      "properties": {
        "item_id": {
          "$ref": "#/$defs/ItemId"
        },
        "quantity": {
          "$ref": "#/$defs/Qty"
        }
      },
      "required": [
        "item_id",
        "quantity"
      ]
    },
    "DailyTurnoverDetail": {
      "type": "object",
      "properties": {
        "turnover": {
          "$ref": "#/$defs/DailyTurnover"
        },
        "rates": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DailyTurnoverRate"
          }
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DailyTurnoverItem"
          }
        },
        "domestic": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DailyTurnoverRate"
          },
          "x-serde-default": true,
          "default": []
        }
      },
      "required": [
        "turnover",
        "rates",
        "items"
      ]
    },
    "DailyTurnoverRate": {
      "type": "object",
      "properties": {
        "rate": {
          "type": "integer",
          "format": "i32"
        },
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "base": {
          "$ref": "#/$defs/Money"
        },
        "vat": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "rate",
        "gross",
        "base",
        "vat"
      ]
    },
    "DailyTurnoverItem": {
      "type": "object",
      "properties": {
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "item_id": {
          "$ref": "#/$defs/ItemId"
        },
        "item_code": {
          "type": "string"
        },
        "item_name": {
          "type": "string"
        },
        "unit": {
          "type": "string"
        },
        "quantity": {
          "$ref": "#/$defs/Qty"
        },
        "cost": {
          "$ref": "#/$defs/Money"
        },
        "sale_value": {
          "$ref": "#/$defs/Money"
        },
        "domestic": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": [
        "line_no",
        "item_id",
        "item_code",
        "item_name",
        "unit",
        "quantity",
        "cost",
        "sale_value"
      ]
    },
    "CancelDailyTurnover": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        },
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "reason"
      ]
    },
    "DeadlineRule": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "period_kind": {
          "type": "string"
        },
        "applies_to": {
          "type": "string"
        },
        "days_after": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "months_after": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "day_of_month": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "source": {
          "type": "string"
        },
        "verified": {
          "type": "boolean"
        },
        "note": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        },
        "version_from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "code",
        "name",
        "period_kind",
        "applies_to",
        "source",
        "verified",
        "note",
        "enabled"
      ]
    },
    "SetDeadlineRule": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "enabled",
        "reason"
      ]
    },
    "api::control::DeadlinesQ": {
      "type": "object",
      "properties": {
        "from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "to": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "GenerateDeadlines": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string",
          "format": "date"
        },
        "to": {
          "type": "string",
          "format": "date"
        }
      },
      "required": [
        "from",
        "to"
      ]
    },
    "GeneratedDeadlines": {
      "type": "object",
      "properties": {
        "created": {
          "type": "integer",
          "format": "i32"
        }
      },
      "required": [
        "created"
      ]
    },
    "MarkDeadline": {
      "type": "object",
      "properties": {
        "done": {
          "type": "boolean"
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "done"
      ]
    },
    "DepreciationRun": {
      "type": "object",
      "properties": {
        "through": {
          "type": "string",
          "format": "date"
        },
        "posting_date": {
          "type": "string",
          "format": "date"
        }
      },
      "required": [
        "through",
        "posting_date"
      ]
    },
    "DepreciationGroup": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "section": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "rate_bp": {
          "type": "integer",
          "format": "i32"
        },
        "max_rate_bp": {
          "type": "integer",
          "format": "i32"
        },
        "basis": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "valid_from",
        "section",
        "name",
        "rate_bp",
        "max_rate_bp",
        "basis"
      ]
    },
    "api::fixed_assets::TaxYearQ": {
      "type": "object",
      "properties": {
        "year": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "TaxDepreciationReport": {
      "type": "object",
      "properties": {
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "rows": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TaxDepreciationRow"
          }
        },
        "accounting": {
          "$ref": "#/$defs/Money"
        },
        "aop29": {
          "$ref": "#/$defs/Money"
        },
        "aop30": {
          "$ref": "#/$defs/Money"
        },
        "recognized": {
          "$ref": "#/$defs/Money"
        },
        "without_group": {
          "type": "integer",
          "format": "i64"
        }
      },
      "required": [
        "year",
        "rows",
        "accounting",
        "aop29",
        "aop30",
        "recognized",
        "without_group"
      ]
    },
    "TaxDepreciationRow": {
      "type": "object",
      "properties": {
        "asset_id": {
          "$ref": "#/$defs/AssetId"
        },
        "inventory_no": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "depr_group": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "rate_bp": {
          "type": "integer",
          "format": "i32"
        },
        "group_rate_bp": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "max_rate_bp": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "base": {
          "$ref": "#/$defs/Money"
        },
        "accounting": {
          "$ref": "#/$defs/Money"
        },
        "revalued": {
          "$ref": "#/$defs/Money"
        },
        "tax_max": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        },
        "excess": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        },
        "recognized": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "asset_id",
        "inventory_no",
        "name",
        "rate_bp",
        "base",
        "accounting",
        "revalued",
        "recognized"
      ]
    },
    "api::inbox::Filter": {
      "type": "object",
      "properties": {
        "done": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "key": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "InboxDocument": {
      "type": "object",
      "properties": {
        "classification": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "item_key": {
          "type": "string"
        },
        "reading_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ]
        },
        "draft_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/DraftId"
            },
            {
              "type": "null"
            }
          ]
        },
        "title": {
          "type": "string"
        },
        "source": {
          "$ref": "#/$defs/InboxSource"
        },
        "attachment_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/AttachmentId"
            },
            {
              "type": "null"
            }
          ]
        },
        "einvoice_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EinvoiceId"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "finished": {
          "type": "boolean"
        },
        "status": {
          "$ref": "#/$defs/InboxStatus"
        },
        "note": {
          "type": "string"
        },
        "assignee": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "version": {
          "type": "integer",
          "format": "i64"
        }
      },
      "required": [
        "item_key",
        "title",
        "source",
        "created_at",
        "finished",
        "status",
        "note",
        "version"
      ]
    },
    "InboxSource": {
      "type": "string",
      "enum": [
        "upload",
        "reading",
        "ujp"
      ]
    },
    "InboxUpdate": {
      "type": "object",
      "properties": {
        "version": {
          "type": "integer",
          "format": "i64"
        },
        "status": {
          "$ref": "#/$defs/InboxStatus"
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "version",
        "status",
        "note"
      ]
    },
    "api::readings::ReadingListQuery": {
      "type": "object",
      "properties": {
        "summary_only": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": []
    },
    "DocumentReadings": {
      "type": "object",
      "properties": {
        "configured": {
          "type": "boolean"
        },
        "paid": {
          "type": "boolean"
        },
        "quota": {
          "$ref": "#/$defs/QuotaItem"
        },
        "readings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DocumentReading"
          }
        }
      },
      "required": [
        "configured",
        "paid",
        "quota",
        "readings"
      ]
    },
    "QuotaItem": {
      "type": "object",
      "properties": {
        "used": {
          "type": "integer",
          "format": "i64"
        },
        "limit": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "per_user": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "members": {
          "type": "integer",
          "format": "i32"
        },
        "custom": {
          "type": "boolean"
        }
      },
      "required": [
        "used",
        "members",
        "custom"
      ]
    },
    "DocumentReading": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "attachment_id": {
          "$ref": "#/$defs/AttachmentId"
        },
        "filename": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "provider": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "model": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "invoice": {
          "anyOf": [
            {
              "$ref": "#/$defs/InvoiceDraft"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "version": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "direction": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "missing": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MissingField"
          },
          "x-serde-default": true,
          "default": []
        },
        "partner_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "draft_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "einvoice_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "id",
        "attachment_id",
        "filename",
        "created_at",
        "created_by"
      ]
    },
    "InvoiceDraft": {
      "type": "object",
      "properties": {
        "seller_name": {
          "type": "string"
        },
        "seller_edb": {
          "type": "string"
        },
        "buyer_name": {
          "type": "string"
        },
        "buyer_edb": {
          "type": "string"
        },
        "doc_number": {
          "type": "string"
        },
        "doc_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "supply_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "due_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "currency": {
          "type": "string"
        },
        "payment_type": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DraftItem"
          },
          "x-serde-default": true,
          "default": []
        },
        "total": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "seller_name",
        "seller_edb",
        "buyer_name",
        "buyer_edb",
        "doc_number",
        "currency"
      ]
    },
    "DraftItem": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string"
        },
        "unit": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "quantity": {
          "type": "string"
        },
        "price": {
          "$ref": "#/$defs/Money"
        },
        "discount": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true
        },
        "rate": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "description",
        "quantity",
        "price"
      ]
    },
    "MissingField": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "item": {
          "anyOf": [
            {
              "type": "integer",
              "format": "u32",
              "minimum": 0
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "code"
      ]
    },
    "AiDocumentEstimate": {
      "type": "object",
      "properties": {
        "pages": {
          "type": "integer",
          "format": "i32"
        },
        "credits": {
          "type": "integer",
          "format": "i32"
        }
      },
      "required": [
        "pages",
        "credits"
      ]
    },
    "SaveInvoiceDraft": {
      "type": "object",
      "properties": {
        "invoice": {
          "$ref": "#/$defs/InvoiceDraft"
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "invoice",
        "reason"
      ]
    },
    "EinvoiceDetail": {
      "type": "object",
      "properties": {
        "invoice": {
          "$ref": "#/$defs/Einvoice"
        },
        "events": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EinvoiceEvent"
          }
        },
        "document": {}
      },
      "required": [
        "invoice",
        "events",
        "document"
      ]
    },
    "EinvoiceEvent": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "status": {
          "type": "string"
        },
        "euid": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "status_code": {
          "type": "string"
        },
        "status_name": {
          "type": "string"
        },
        "error_code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "automatic": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "retryable": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": [
        "id",
        "status",
        "status_code",
        "status_name",
        "error_code",
        "message",
        "created_at",
        "created_by"
      ]
    },
    "api::control::DraftsQ": {
      "type": "object",
      "properties": {
        "status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "limit": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ]
        },
        "before_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/DraftId"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "DraftSelection": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/DraftId"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        }
      },
      "required": [
        "id",
        "version"
      ]
    },
    "OfflineDraft": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "format": "uuid"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "based_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "device": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "post": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "entry": {
          "$ref": "#/$defs/NewEntry"
        }
      },
      "required": [
        "key",
        "created_at",
        "entry"
      ]
    },
    "OfflineDraftSynced": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "format": "uuid"
        },
        "created": {
          "type": "boolean"
        },
        "outcome": {
          "$ref": "#/$defs/OfflineOutcome"
        },
        "draft": {
          "$ref": "#/$defs/Draft"
        },
        "entry": {
          "anyOf": [
            {
              "$ref": "#/$defs/Entry"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "conflict": {
          "anyOf": [
            {
              "$ref": "#/$defs/OfflineConflict"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "key",
        "created",
        "outcome",
        "draft"
      ]
    },
    "OfflineConflict": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "duplicate_entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "duplicate_draft_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/DraftId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "code",
        "message"
      ]
    },
    "DraftChange": {
      "type": "object",
      "properties": {
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "reason": {
          "type": "string"
        },
        "entry": {
          "$ref": "#/$defs/NewEntry"
        }
      },
      "required": [
        "version",
        "reason",
        "entry"
      ]
    },
    "CancelDraft": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "reason"
      ]
    },
    "PostDraft": {
      "type": "object",
      "properties": {
        "version": {
          "type": "integer",
          "format": "i32"
        }
      },
      "required": [
        "version"
      ]
    },
    "ReviewRequest": {
      "type": "object",
      "properties": {
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "decision": {
          "$ref": "#/$defs/ReviewDecision"
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "version",
        "decision"
      ]
    },
    "DunningLetter": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/DunningLetterId"
        },
        "number": {
          "type": "string"
        },
        "partner_id": {
          "$ref": "#/$defs/PartnerId"
        },
        "partner_name": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "level": {
          "type": "integer",
          "format": "i32"
        },
        "pay_by": {
          "type": "string",
          "format": "date"
        },
        "title": {
          "type": "string"
        },
        "body": {
          "type": "string"
        },
        "note": {
          "type": "string"
        },
        "total": {
          "$ref": "#/$defs/Money"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DunningLine"
          }
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "number",
        "partner_id",
        "partner_name",
        "date",
        "level",
        "pay_by",
        "title",
        "body",
        "note",
        "total",
        "lines",
        "created_at",
        "created_by"
      ]
    },
    "DunningLetterId": {
      "type": "integer",
      "format": "i64"
    },
    "DunningLine": {
      "type": "object",
      "properties": {
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "item_entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "item_line_no": {
          "type": "integer",
          "format": "i32"
        },
        "doc_number": {
          "type": "string"
        },
        "due_date": {
          "type": "string",
          "format": "date"
        },
        "days_overdue": {
          "type": "integer",
          "format": "i64"
        },
        "open_amount": {
          "$ref": "#/$defs/Money"
        },
        "level": {
          "type": "integer",
          "format": "i32"
        }
      },
      "required": [
        "line_no",
        "item_entry_id",
        "item_line_no",
        "doc_number",
        "due_date",
        "days_overdue",
        "open_amount",
        "level"
      ]
    },
    "NewDunningLetter": {
      "type": "object",
      "properties": {
        "partner_id": {
          "$ref": "#/$defs/PartnerId"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "partner_id",
        "date"
      ]
    },
    "api::dunning::ItemsQ": {
      "type": "object",
      "properties": {
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "partner": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "DunningPartner": {
      "type": "object",
      "properties": {
        "partner_id": {
          "$ref": "#/$defs/PartnerId"
        },
        "partner_name": {
          "type": "string"
        },
        "open_total": {
          "$ref": "#/$defs/Money"
        },
        "ready": {
          "type": "integer",
          "format": "usize",
          "minimum": 0
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DunningItem"
          }
        }
      },
      "required": [
        "partner_id",
        "partner_name",
        "open_total",
        "ready",
        "items"
      ]
    },
    "DunningItem": {
      "type": "object",
      "properties": {
        "item_entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "item_line_no": {
          "type": "integer",
          "format": "i32"
        },
        "doc_number": {
          "type": "string"
        },
        "due_date": {
          "type": "string",
          "format": "date"
        },
        "days_overdue": {
          "type": "integer",
          "format": "i64"
        },
        "open_amount": {
          "$ref": "#/$defs/Money"
        },
        "level": {
          "type": "integer",
          "format": "i32"
        },
        "last_letter": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "pay_by": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "next_level": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "item_entry_id",
        "item_line_no",
        "doc_number",
        "due_date",
        "days_overdue",
        "open_amount",
        "level"
      ]
    },
    "DunningStage": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "level": {
          "type": "integer",
          "format": "i32"
        },
        "min_days": {
          "type": "integer",
          "format": "i32"
        },
        "pay_within": {
          "type": "integer",
          "format": "i32"
        },
        "title": {
          "type": "string"
        },
        "body": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "level",
        "min_days",
        "pay_within",
        "title",
        "body",
        "reason",
        "created_at",
        "created_by"
      ]
    },
    "NewDunningStage": {
      "type": "object",
      "properties": {
        "level": {
          "type": "integer",
          "format": "i32"
        },
        "min_days": {
          "type": "integer",
          "format": "i32"
        },
        "pay_within": {
          "type": "integer",
          "format": "i32"
        },
        "title": {
          "type": "string"
        },
        "body": {
          "type": "string"
        },
        "reason": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "level",
        "min_days",
        "pay_within",
        "title",
        "body"
      ]
    },
    "CancelDunning": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "reason"
      ]
    },
    "api::efaktura::ListQ": {
      "type": "object",
      "properties": {
        "direction": {
          "anyOf": [
            {
              "$ref": "#/$defs/EinvoiceDirection"
            },
            {
              "type": "null"
            }
          ]
        },
        "from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "to": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "NewEinvoice": {
      "type": "object",
      "properties": {
        "doc_number": {
          "type": "string"
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "due_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "buyer_edb": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "payment_type": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NewEinvoiceItem"
          },
          "x-serde-default": true,
          "default": []
        },
        "document": {
          "anyOf": [
            {},
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "doc_number",
        "doc_date"
      ]
    },
    "NewEinvoiceItem": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string"
        },
        "unit": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "quantity": {
          "type": "string"
        },
        "price": {
          "$ref": "#/$defs/Money"
        },
        "discount": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true
        },
        "vat_group": {
          "type": "string"
        },
        "tax_indicator": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "description",
        "quantity",
        "price",
        "vat_group"
      ]
    },
    "api::efaktura::ReasonBody": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": []
    },
    "EinvoiceCodebooks": {
      "type": "object",
      "properties": {
        "tax_groups": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UjpCode"
          }
        },
        "tax_indicators": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UjpCode"
          }
        },
        "payment_types": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UjpCode"
          }
        },
        "void_reasons": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UjpCode"
          }
        },
        "correction_reasons": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UjpCode"
          }
        },
        "reject_reasons": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UjpCode"
          }
        }
      },
      "required": [
        "tax_groups",
        "tax_indicators",
        "payment_types",
        "void_reasons",
        "correction_reasons",
        "reject_reasons"
      ]
    },
    "UjpCode": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "percent": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "group": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "code",
        "name"
      ]
    },
    "api::efaktura::InboxQ": {
      "type": "object",
      "properties": {
        "from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "to": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "InboxFetch": {
      "type": "object",
      "properties": {
        "found": {
          "type": "integer",
          "format": "usize",
          "minimum": 0
        },
        "added": {
          "type": "integer",
          "format": "usize",
          "minimum": 0
        }
      },
      "required": [
        "found",
        "added"
      ]
    },
    "SetCertificateInheritance": {
      "type": "object",
      "properties": {
        "inherit": {
          "type": "boolean"
        }
      },
      "required": [
        "inherit"
      ]
    },
    "OfflineEinvoice": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "format": "uuid"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "device": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "invoice": {
          "$ref": "#/$defs/NewEinvoice"
        }
      },
      "required": [
        "key",
        "created_at",
        "invoice"
      ]
    },
    "OfflineSynced": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "format": "uuid"
        },
        "created": {
          "type": "boolean"
        },
        "einvoice": {
          "$ref": "#/$defs/EinvoiceDetail"
        }
      },
      "required": [
        "key",
        "created",
        "einvoice"
      ]
    },
    "EinvoicePreview": {
      "type": "object",
      "properties": {
        "document": {},
        "net": {
          "$ref": "#/$defs/Money"
        },
        "vat": {
          "$ref": "#/$defs/Money"
        },
        "gross": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "document",
        "net",
        "vat",
        "gross"
      ]
    },
    "EinvoiceSendBatch": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/EinvoiceSendBatchId"
        },
        "item_count": {
          "type": "integer",
          "format": "i32"
        },
        "attempts": {
          "type": "integer",
          "format": "i32"
        },
        "queued": {
          "type": "integer",
          "format": "i32"
        },
        "sent": {
          "type": "integer",
          "format": "i32"
        },
        "failed": {
          "type": "integer",
          "format": "i32"
        },
        "skipped": {
          "type": "integer",
          "format": "i32"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "item_count",
        "attempts",
        "queued",
        "sent",
        "failed",
        "skipped",
        "created_at",
        "created_by"
      ]
    },
    "EinvoiceSendBatchId": {
      "type": "integer",
      "format": "i64"
    },
    "NewEinvoiceSendBatch": {
      "type": "object",
      "properties": {
        "invoice_ids": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InvoiceId"
          },
          "x-serde-default": true,
          "default": []
        },
        "all_ready": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": []
    },
    "EinvoiceSendBatchDetail": {
      "type": "object",
      "properties": {
        "batch": {
          "$ref": "#/$defs/EinvoiceSendBatch"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EinvoiceSendBatchItem"
          }
        }
      },
      "required": [
        "batch",
        "items"
      ]
    },
    "EinvoiceSendBatchItem": {
      "type": "object",
      "properties": {
        "position": {
          "type": "integer",
          "format": "i32"
        },
        "invoice_id": {
          "$ref": "#/$defs/InvoiceId"
        },
        "invoice_number": {
          "type": "string"
        },
        "issue_date": {
          "type": "string",
          "format": "date"
        },
        "partner": {
          "type": "string"
        },
        "total": {
          "$ref": "#/$defs/Money"
        },
        "status": {
          "$ref": "#/$defs/EinvoiceBatchItemStatus"
        },
        "attempt": {
          "type": "integer",
          "format": "i32"
        },
        "einvoice_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EinvoiceId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "error_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "message": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "position",
        "invoice_id",
        "invoice_number",
        "issue_date",
        "partner",
        "total",
        "status",
        "attempt"
      ]
    },
    "EinvoiceBatchItemStatus": {
      "type": "string",
      "enum": [
        "queued",
        "sent",
        "failed",
        "skipped"
      ]
    },
    "EinvoiceCorrection": {
      "type": "object",
      "properties": {
        "doc_number": {
          "type": "string"
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "reason_code": {
          "type": "string"
        },
        "comment": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NewEinvoiceItem"
          }
        }
      },
      "required": [
        "doc_number",
        "doc_date",
        "reason_code",
        "items"
      ]
    },
    "EinvoiceDecision": {
      "type": "object",
      "properties": {
        "accept": {
          "type": "boolean"
        },
        "reason_code": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "comment": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "accept"
      ]
    },
    "EinvoiceStatusChange": {
      "type": "object",
      "properties": {
        "old_code": {
          "type": "string"
        },
        "old_name": {
          "type": "string"
        },
        "new_code": {
          "type": "string"
        },
        "new_name": {
          "type": "string"
        },
        "timestamp": {
          "type": "string"
        },
        "comment": {
          "type": "string"
        }
      },
      "required": [
        "old_code",
        "old_name",
        "new_code",
        "new_name",
        "timestamp",
        "comment"
      ]
    },
    "EinvoiceReceiptPreview": {
      "type": "object",
      "properties": {
        "einvoice_id": {
          "$ref": "#/$defs/EinvoiceId"
        },
        "doc_number": {
          "type": "string"
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "seller_edb": {
          "type": "string"
        },
        "seller_name": {
          "type": "string"
        },
        "partner_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "partner": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "receipt_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/StockDocId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "receipt_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "blocked": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EinvoiceReceiptLine"
          }
        }
      },
      "required": [
        "einvoice_id",
        "doc_number",
        "doc_date",
        "seller_edb",
        "seller_name",
        "lines"
      ]
    },
    "EinvoiceReceiptLine": {
      "type": "object",
      "properties": {
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "supplier_key": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "unit": {
          "type": "string"
        },
        "quantity": {
          "type": "string"
        },
        "net": {
          "$ref": "#/$defs/Money"
        },
        "vat_rate": {
          "type": "string"
        },
        "map_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/StockItemMapId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "item_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/ItemId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "item_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "factor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "line_no",
        "supplier_key",
        "description",
        "unit",
        "quantity",
        "net",
        "vat_rate"
      ]
    },
    "StockItemMapId": {
      "type": "integer",
      "format": "i64"
    },
    "ImportEinvoiceReceipt": {
      "type": "object",
      "properties": {
        "warehouse": {
          "$ref": "#/$defs/WarehouseId"
        },
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "description": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EinvoiceReceiptLineMap"
          },
          "x-serde-default": true,
          "default": []
        }
      },
      "required": [
        "warehouse"
      ]
    },
    "EinvoiceReceiptLineMap": {
      "type": "object",
      "properties": {
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "item": {
          "anyOf": [
            {
              "$ref": "#/$defs/ItemId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "factor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "skip": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "save": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": [
        "line_no"
      ]
    },
    "StockDoc": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/StockDocId"
        },
        "kind": {
          "$ref": "#/$defs/StockDocKind"
        },
        "state": {
          "$ref": "#/$defs/StockDocState"
        },
        "warehouse_id": {
          "$ref": "#/$defs/WarehouseId"
        },
        "warehouse": {
          "type": "string"
        },
        "to_warehouse_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/WarehouseId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "to_warehouse": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "partner_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "partner": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "counter_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "costs_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "reference": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "storno_of": {
          "anyOf": [
            {
              "$ref": "#/$defs/StockDocId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "storno_by": {
          "anyOf": [
            {
              "$ref": "#/$defs/StockDocId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "stocktake_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/StocktakeId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "entry_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "draft_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "einvoice_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "einvoice_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StockDocLine"
          }
        },
        "moves": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StockMove"
          }
        },
        "plan_error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "entry_lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StockEntryLine"
          }
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "id",
        "kind",
        "state",
        "warehouse_id",
        "warehouse",
        "doc_date",
        "reference",
        "description",
        "created_at",
        "created_by",
        "lines",
        "moves",
        "entry_lines"
      ]
    },
    "StockDocSummary": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/StockDocId"
        },
        "kind": {
          "$ref": "#/$defs/StockDocKind"
        },
        "state": {
          "$ref": "#/$defs/StockDocState"
        },
        "warehouse_id": {
          "$ref": "#/$defs/WarehouseId"
        },
        "warehouse": {
          "type": "string"
        },
        "to_warehouse_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/WarehouseId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "to_warehouse": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "partner_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "partner": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "counter_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "costs_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "reference": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "storno_of": {
          "anyOf": [
            {
              "$ref": "#/$defs/StockDocId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "storno_by": {
          "anyOf": [
            {
              "$ref": "#/$defs/StockDocId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "stocktake_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/StocktakeId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "entry_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "draft_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "einvoice_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "einvoice_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "kind",
        "state",
        "warehouse_id",
        "warehouse",
        "doc_date",
        "reference",
        "description",
        "created_at",
        "created_by"
      ]
    },
    "StockDocKind": {
      "type": "string",
      "enum": [
        "receipt",
        "issue",
        "transfer",
        "return_supplier",
        "return_customer",
        "stocktake",
        "storno",
        "cost",
        "price_leveling"
      ]
    },
    "StockDocState": {
      "type": "string",
      "enum": [
        "draft",
        "pending",
        "posted",
        "reversed",
        "cancelled"
      ]
    },
    "StocktakeId": {
      "type": "integer",
      "format": "i64"
    },
    "StockDocLine": {
      "type": "object",
      "properties": {
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "item_id": {
          "$ref": "#/$defs/ItemId"
        },
        "item_code": {
          "type": "string"
        },
        "item_name": {
          "type": "string"
        },
        "unit": {
          "type": "string"
        },
        "vat_rate": {
          "type": "string"
        },
        "quantity": {
          "$ref": "#/$defs/Qty"
        },
        "value": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "costs": {
          "$ref": "#/$defs/Money"
        },
        "sale_price": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "line_no",
        "item_id",
        "item_code",
        "item_name",
        "unit",
        "vat_rate",
        "quantity",
        "costs"
      ]
    },
    "StockMove": {
      "type": "object",
      "properties": {
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "warehouse": {
          "type": "string"
        },
        "item_id": {
          "$ref": "#/$defs/ItemId"
        },
        "quantity": {
          "$ref": "#/$defs/Qty"
        },
        "value": {
          "$ref": "#/$defs/Money"
        },
        "sale_value": {
          "$ref": "#/$defs/Money"
        },
        "vat_value": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "line_no",
        "warehouse",
        "item_id",
        "quantity",
        "value",
        "sale_value",
        "vat_value"
      ]
    },
    "StockEntryLine": {
      "type": "object",
      "properties": {
        "account": {
          "type": "string"
        },
        "partner_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "amount": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "account",
        "amount"
      ]
    },
    "EinvoiceStorno": {
      "type": "object",
      "properties": {
        "doc_number": {
          "type": "string"
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "reason_code": {
          "type": "string"
        },
        "comment": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "doc_number",
        "doc_date",
        "reason_code"
      ]
    },
    "PurchaseVatReport": {
      "type": "object",
      "properties": {
        "rows": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PurchaseVatRow"
          }
        }
      },
      "required": [
        "rows"
      ]
    },
    "PurchaseVatRow": {
      "type": "object",
      "properties": {
        "tax_indicator": {
          "type": "string"
        },
        "vat_group": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "vat_percent": {
          "type": "integer",
          "format": "i32"
        },
        "taxable": {
          "$ref": "#/$defs/Money"
        },
        "vat": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "tax_indicator",
        "vat_percent",
        "taxable",
        "vat"
      ]
    },
    "EmployeeSummary": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "embg": {
          "type": "string"
        },
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "active": {
          "type": "boolean"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "contracts": {
          "type": "integer",
          "format": "i64"
        }
      },
      "required": [
        "id",
        "embg",
        "first_name",
        "last_name",
        "active",
        "version",
        "contracts"
      ]
    },
    "NewEmployee": {
      "type": "object",
      "properties": {
        "embg": {
          "type": "string"
        },
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "address": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "bank_account": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "active": {
          "type": "boolean",
          "x-serde-default": "yes",
          "default": true
        }
      },
      "required": [
        "embg",
        "first_name",
        "last_name"
      ]
    },
    "EmployeeData": {
      "type": "object",
      "properties": {
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "address": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "bank_account": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "active": {
          "type": "boolean",
          "x-serde-default": "yes",
          "default": true
        }
      },
      "required": [
        "first_name",
        "last_name"
      ]
    },
    "Employee": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "embg": {
          "type": "string"
        },
        "embg_checksum_ok": {
          "type": "boolean"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "current": {
          "$ref": "#/$defs/EmployeeData"
        },
        "versions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EmployeeVersion"
          }
        },
        "contracts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Contract"
          }
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "embg",
        "embg_checksum_ok",
        "version",
        "current",
        "versions",
        "contracts",
        "created_at",
        "created_by"
      ]
    },
    "EmployeeVersion": {
      "type": "object",
      "properties": {
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "address": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "bank_account": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "active": {
          "type": "boolean",
          "x-serde-default": "yes",
          "default": true
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "version",
        "first_name",
        "last_name",
        "created_at",
        "created_by"
      ]
    },
    "EmployeeChange": {
      "type": "object",
      "properties": {
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "address": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "bank_account": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "active": {
          "type": "boolean",
          "x-serde-default": "yes",
          "default": true
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "first_name",
        "last_name",
        "reason"
      ]
    },
    "NewContract": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/ContractKind"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "valid_to": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "hours_per_week": {
          "type": "integer",
          "format": "i32"
        },
        "salary_basis": {
          "$ref": "#/$defs/SalaryBasis"
        },
        "salary_amount": {
          "$ref": "#/$defs/Money"
        },
        "cost_account": {
          "type": "string"
        },
        "personal_exemption": {
          "type": "boolean",
          "x-serde-default": "yes",
          "default": true
        },
        "prior_service": {
          "$ref": "#/$defs/PriorService",
          "x-serde-default": true,
          "x-omitted-when": "PriorService::is_empty"
        }
      },
      "required": [
        "kind",
        "valid_from",
        "hours_per_week",
        "salary_basis",
        "salary_amount",
        "cost_account"
      ]
    },
    "SetMunicipality": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ]
    },
    "MpinCode": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "name"
      ]
    },
    "api::EntryQuery": {
      "type": "object",
      "properties": {
        "summary_only": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": []
    },
    "api::AttachmentOptions": {
      "type": "object",
      "properties": {
        "export_proof": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": []
    },
    "LinkAttachment": {
      "type": "object",
      "properties": {
        "attachment_id": {
          "$ref": "#/$defs/AttachmentId"
        }
      },
      "required": [
        "attachment_id"
      ]
    },
    "StornoRequest": {
      "type": "object",
      "properties": {
        "posting_date": {
          "type": "string",
          "format": "date"
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "posting_date",
        "reason"
      ]
    },
    "api::filings::ListQ": {
      "type": "object",
      "properties": {
        "kind": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "Filing": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/FilingId"
        },
        "kind": {
          "$ref": "#/$defs/FilingKind"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "period_start": {
          "type": "string",
          "format": "date"
        },
        "period_end": {
          "type": "string",
          "format": "date"
        },
        "status": {
          "$ref": "#/$defs/FilingStatus"
        },
        "annual_report_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ]
        },
        "vat_return_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ]
        },
        "corrects_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/FilingId"
            },
            {
              "type": "null"
            }
          ]
        },
        "corrected_by": {
          "anyOf": [
            {
              "$ref": "#/$defs/FilingId"
            },
            {
              "type": "null"
            }
          ]
        },
        "correction_rule": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "basis_attachment_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/AttachmentId"
            },
            {
              "type": "null"
            }
          ]
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "attachment_id": {
          "$ref": "#/$defs/AttachmentId"
        },
        "sha256": {
          "type": "string"
        },
        "format": {
          "type": "string"
        },
        "filename": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "events": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FilingEvent"
          }
        }
      },
      "required": [
        "id",
        "kind",
        "year",
        "period_start",
        "period_end",
        "status",
        "attachment_id",
        "sha256",
        "format",
        "filename",
        "created_at",
        "created_by",
        "events"
      ]
    },
    "FilingId": {
      "type": "integer",
      "format": "i64"
    },
    "FilingEvent": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "status": {
          "$ref": "#/$defs/FilingStatus"
        },
        "event_date": {
          "type": "string",
          "format": "date"
        },
        "signer_role": {
          "anyOf": [
            {
              "$ref": "#/$defs/SignerRole"
            },
            {
              "type": "null"
            }
          ]
        },
        "signer_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "signer_license": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "cert_fingerprint": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "signed_attachment_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/AttachmentId"
            },
            {
              "type": "null"
            }
          ]
        },
        "channel": {
          "anyOf": [
            {
              "$ref": "#/$defs/FilingChannel"
            },
            {
              "type": "null"
            }
          ]
        },
        "reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "notified_on": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "note": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "status",
        "event_date",
        "note",
        "created_at",
        "created_by"
      ]
    },
    "SignerRole": {
      "type": "string",
      "enum": [
        "manager",
        "accountant"
      ]
    },
    "FilingChannel": {
      "type": "string",
      "enum": [
        "electronic",
        "paper"
      ]
    },
    "NewFiling": {
      "type": "object",
      "properties": {
        "kind": {
          "anyOf": [
            {
              "$ref": "#/$defs/FilingKind"
            },
            {
              "type": "null"
            }
          ]
        },
        "year": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "period": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "api::filings::ChecksQ": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string"
        },
        "year": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "period": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "kind"
      ]
    },
    "FilingChecks": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/FilingKind"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "period_start": {
          "type": "string",
          "format": "date"
        },
        "period_end": {
          "type": "string",
          "format": "date"
        },
        "checks": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FilingCheck"
          }
        }
      },
      "required": [
        "kind",
        "year",
        "period_start",
        "period_end",
        "checks"
      ]
    },
    "FilingCheck": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "ok": {
          "type": "boolean"
        },
        "detail": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "ok",
        "detail"
      ]
    },
    "FilingStep": {
      "type": "object",
      "properties": {
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "signer_role": {
          "anyOf": [
            {
              "$ref": "#/$defs/SignerRole"
            },
            {
              "type": "null"
            }
          ]
        },
        "cert_fingerprint": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "signed_attachment_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/AttachmentId"
            },
            {
              "type": "null"
            }
          ]
        },
        "channel": {
          "anyOf": [
            {
              "$ref": "#/$defs/FilingChannel"
            },
            {
              "type": "null"
            }
          ]
        },
        "reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "notified_on": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": []
    },
    "FilingCorrection": {
      "type": "object",
      "properties": {
        "rule": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "basis_attachment_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/AttachmentId"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "rule",
        "reason"
      ]
    },
    "api::retail_book::BookQ": {
      "type": "object",
      "properties": {
        "warehouse": {
          "type": "string",
          "format": "uuid"
        },
        "year": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "warehouse"
      ]
    },
    "FiscalBook": {
      "type": "object",
      "properties": {
        "head": {
          "$ref": "#/$defs/RetailBookHead"
        },
        "rates": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "i32"
          }
        },
        "tax_rates": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "i32"
          }
        },
        "days": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FiscalBookDay"
          }
        }
      },
      "required": [
        "head",
        "rates",
        "tax_rates",
        "days"
      ]
    },
    "RetailBookHead": {
      "type": "object",
      "properties": {
        "trader": {
          "type": "string"
        },
        "edb": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "trader_address": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "vat_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "warehouse_id": {
          "$ref": "#/$defs/WarehouseId"
        },
        "warehouse_code": {
          "type": "string"
        },
        "warehouse_name": {
          "type": "string"
        },
        "warehouse_address": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        }
      },
      "required": [
        "trader",
        "warehouse_id",
        "warehouse_code",
        "warehouse_name",
        "year"
      ]
    },
    "FiscalBookDay": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "format": "date"
        },
        "gross": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Money"
          }
        },
        "total_gross": {
          "$ref": "#/$defs/Money"
        },
        "vat": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Money"
          }
        },
        "total_vat": {
          "$ref": "#/$defs/Money"
        },
        "domestic_gross": {
          "$ref": "#/$defs/Money"
        },
        "domestic_vat": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Money"
          }
        },
        "domestic_total_vat": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "date",
        "gross",
        "total_gross",
        "vat",
        "total_vat",
        "domestic_gross",
        "domestic_vat",
        "domestic_total_vat"
      ]
    },
    "FiscalYear": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string",
          "format": "date"
        },
        "end": {
          "type": "string",
          "format": "date"
        },
        "closed": {
          "type": "boolean"
        }
      },
      "required": [
        "start",
        "end",
        "closed"
      ]
    },
    "FiscalYearSetting": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "start_month": {
          "type": "integer",
          "format": "u32",
          "minimum": 0
        },
        "reason": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "valid_from",
        "start_month",
        "reason",
        "created_at",
        "created_by"
      ]
    },
    "NewFiscalYearSetting": {
      "type": "object",
      "properties": {
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "start_month": {
          "type": "integer",
          "format": "u32",
          "minimum": 0
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "valid_from",
        "start_month",
        "reason"
      ]
    },
    "api::bank::FxQ": {
      "type": "object",
      "properties": {
        "currency": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "FxRate": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "currency": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "rate_micro": {
          "type": "integer",
          "format": "i64"
        },
        "source": {
          "$ref": "#/$defs/FxSource"
        },
        "note": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "currency",
        "date",
        "rate_micro",
        "source",
        "note",
        "created_at",
        "created_by"
      ]
    },
    "FxSource": {
      "type": "string",
      "enum": [
        "manual",
        "import",
        "nbrm"
      ]
    },
    "NewFxRates": {
      "type": "object",
      "properties": {
        "source": {
          "$ref": "#/$defs/FxSource"
        },
        "rates": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NewFxRate"
          }
        }
      },
      "required": [
        "source",
        "rates"
      ]
    },
    "NewFxRate": {
      "type": "object",
      "properties": {
        "currency": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "rate_micro": {
          "type": "integer",
          "format": "i64"
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "currency",
        "date",
        "rate_micro"
      ]
    },
    "NbrmImport": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string",
          "format": "date"
        },
        "to": {
          "type": "string",
          "format": "date"
        }
      },
      "required": [
        "from",
        "to"
      ]
    },
    "NbrmImported": {
      "type": "object",
      "properties": {
        "fetched": {
          "type": "integer",
          "format": "usize",
          "minimum": 0
        },
        "added": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FxRate"
          }
        },
        "unchanged": {
          "type": "integer",
          "format": "usize",
          "minimum": 0
        }
      },
      "required": [
        "fetched",
        "added",
        "unchanged"
      ]
    },
    "FxRevaluationPolicy": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "reverse_next_month": {
          "type": "boolean"
        },
        "gain_account": {
          "type": "string"
        },
        "loss_account": {
          "type": "string"
        },
        "related_gain_account": {
          "type": "string"
        },
        "related_loss_account": {
          "type": "string"
        },
        "related_partners": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PartnerId"
          }
        },
        "reason": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "valid_from",
        "reverse_next_month",
        "gain_account",
        "loss_account",
        "related_gain_account",
        "related_loss_account",
        "related_partners",
        "reason",
        "created_at",
        "created_by"
      ]
    },
    "NewFxRevaluationPolicy": {
      "type": "object",
      "properties": {
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "reverse_next_month": {
          "type": "boolean"
        },
        "gain_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "loss_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "related_gain_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "related_loss_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "related_partners": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PartnerId"
          },
          "x-serde-default": true,
          "default": []
        },
        "reason": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "valid_from",
        "reverse_next_month"
      ]
    },
    "FxRevaluation": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/FxRevaluationId"
        },
        "number": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "reversal_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "reversal_entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ]
        },
        "gain_account": {
          "type": "string"
        },
        "loss_account": {
          "type": "string"
        },
        "related_gain_account": {
          "type": "string"
        },
        "related_loss_account": {
          "type": "string"
        },
        "gain": {
          "$ref": "#/$defs/Money"
        },
        "loss": {
          "$ref": "#/$defs/Money"
        },
        "note": {
          "type": "string"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FxRevaluationLine"
          }
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "storno_entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ]
        },
        "reversal_storno_entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "number",
        "date",
        "entry_id",
        "gain_account",
        "loss_account",
        "related_gain_account",
        "related_loss_account",
        "gain",
        "loss",
        "note",
        "lines",
        "created_at",
        "created_by"
      ]
    },
    "FxRevaluationId": {
      "type": "integer",
      "format": "i64"
    },
    "FxRevaluationLine": {
      "type": "object",
      "properties": {
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "kind": {
          "$ref": "#/$defs/FxRevaluationKind"
        },
        "item_entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ]
        },
        "item_line_no": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "account": {
          "type": "string"
        },
        "partner_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ]
        },
        "partner_name": {
          "type": "string"
        },
        "doc_number": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "fx_amount": {
          "$ref": "#/$defs/Money"
        },
        "book_amount": {
          "$ref": "#/$defs/Money"
        },
        "rate_micro": {
          "type": "integer",
          "format": "i64"
        },
        "new_amount": {
          "$ref": "#/$defs/Money"
        },
        "diff": {
          "$ref": "#/$defs/Money"
        },
        "related": {
          "type": "boolean"
        }
      },
      "required": [
        "line_no",
        "kind",
        "account",
        "partner_name",
        "doc_number",
        "currency",
        "fx_amount",
        "book_amount",
        "rate_micro",
        "new_amount",
        "diff",
        "related"
      ]
    },
    "FxRevaluationKind": {
      "type": "string",
      "enum": [
        "item",
        "account"
      ]
    },
    "NewFxRevaluation": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "format": "date"
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "date"
      ]
    },
    "api::fx_revaluation::PreviewQ": {
      "type": "object",
      "properties": {
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "FxRevaluationPreview": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "format": "date"
        },
        "gain": {
          "$ref": "#/$defs/Money"
        },
        "loss": {
          "$ref": "#/$defs/Money"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FxRevaluationLine"
          }
        }
      },
      "required": [
        "date",
        "gain",
        "loss",
        "lines"
      ]
    },
    "CancelFxRevaluation": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "reason"
      ]
    },
    "InterestCalc": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/InterestCalcId"
        },
        "number": {
          "type": "string"
        },
        "partner_id": {
          "$ref": "#/$defs/PartnerId"
        },
        "partner_name": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "debit_account": {
          "type": "string"
        },
        "credit_account": {
          "type": "string"
        },
        "total": {
          "$ref": "#/$defs/Money"
        },
        "note": {
          "type": "string"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InterestLine"
          }
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "storno_entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "number",
        "partner_id",
        "partner_name",
        "date",
        "entry_id",
        "debit_account",
        "credit_account",
        "total",
        "note",
        "lines",
        "created_at",
        "created_by"
      ]
    },
    "InterestCalcId": {
      "type": "integer",
      "format": "i64"
    },
    "InterestLine": {
      "type": "object",
      "properties": {
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "item_entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "item_line_no": {
          "type": "integer",
          "format": "i32"
        },
        "doc_number": {
          "type": "string"
        },
        "due_date": {
          "type": "string",
          "format": "date"
        },
        "from": {
          "type": "string",
          "format": "date"
        },
        "to": {
          "type": "string",
          "format": "date"
        },
        "days": {
          "type": "integer",
          "format": "i64"
        },
        "principal": {
          "$ref": "#/$defs/Money"
        },
        "rate": {
          "$ref": "#/$defs/RateE4"
        },
        "interest": {
          "$ref": "#/$defs/Money"
        },
        "capped": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": [
        "line_no",
        "item_entry_id",
        "item_line_no",
        "doc_number",
        "due_date",
        "from",
        "to",
        "days",
        "principal",
        "rate",
        "interest"
      ]
    },
    "RateE4": {
      "type": "integer",
      "format": "i64"
    },
    "NewInterestCalc": {
      "type": "object",
      "properties": {
        "partner_id": {
          "$ref": "#/$defs/PartnerId"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "debit_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "credit_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "partner_id",
        "date"
      ]
    },
    "api::interest::PreviewQ": {
      "type": "object",
      "properties": {
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "partner": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "InterestPreview": {
      "type": "object",
      "properties": {
        "partner_id": {
          "$ref": "#/$defs/PartnerId"
        },
        "partner_name": {
          "type": "string"
        },
        "total": {
          "$ref": "#/$defs/Money"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InterestLine"
          }
        }
      },
      "required": [
        "partner_id",
        "partner_name",
        "total",
        "lines"
      ]
    },
    "InterestRate": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "rate": {
          "$ref": "#/$defs/RateE4"
        },
        "source": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "valid_from",
        "rate",
        "source",
        "reason",
        "created_at",
        "created_by"
      ]
    },
    "NewInterestRate": {
      "type": "object",
      "properties": {
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "rate": {
          "$ref": "#/$defs/RateE4"
        },
        "source": {
          "type": "string"
        },
        "reason": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "valid_from",
        "rate",
        "source"
      ]
    },
    "CancelInterest": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        },
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "reason"
      ]
    },
    "Invitation": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "email": {
          "type": "string"
        },
        "role": {
          "$ref": "#/$defs/Role"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "expires_at": {
          "type": "string",
          "format": "date-time"
        },
        "status": {
          "$ref": "#/$defs/InvitationStatus"
        }
      },
      "required": [
        "id",
        "email",
        "role",
        "created_at",
        "created_by",
        "expires_at",
        "status"
      ]
    },
    "InvitationStatus": {
      "type": "string",
      "enum": [
        "open",
        "accepted",
        "cancelled",
        "expired"
      ]
    },
    "NewInvitation": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "role": {
          "$ref": "#/$defs/Role"
        }
      },
      "required": [
        "email",
        "role"
      ]
    },
    "InvitationCode": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "code": {
          "type": "string"
        },
        "expires_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "code",
        "expires_at"
      ]
    },
    "api::vat::InvoiceBookQ": {
      "type": "object",
      "properties": {
        "book": {
          "type": "string"
        },
        "from": {
          "type": "string",
          "format": "date"
        },
        "to": {
          "type": "string",
          "format": "date"
        },
        "status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "book",
        "from",
        "to"
      ]
    },
    "InvoiceBookRow": {
      "type": "object",
      "properties": {
        "book": {
          "$ref": "#/$defs/InvoiceBook"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "number": {
          "type": "integer",
          "format": "i32"
        },
        "entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "entry_year": {
          "type": "integer",
          "format": "i32"
        },
        "entry_number": {
          "type": "integer",
          "format": "i32"
        },
        "posting_date": {
          "type": "string",
          "format": "date"
        },
        "storno": {
          "type": "boolean"
        },
        "reversed": {
          "type": "boolean"
        },
        "doc_kind": {
          "type": "string"
        },
        "doc_number": {
          "type": "string"
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "counterparty": {
          "type": "string"
        },
        "counterparty_vat": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "advance": {
          "type": "boolean"
        },
        "base_18": {
          "$ref": "#/$defs/Money"
        },
        "vat_18": {
          "$ref": "#/$defs/Money"
        },
        "base_10": {
          "$ref": "#/$defs/Money"
        },
        "vat_10": {
          "$ref": "#/$defs/Money"
        },
        "base_5": {
          "$ref": "#/$defs/Money"
        },
        "vat_5": {
          "$ref": "#/$defs/Money"
        },
        "base_other": {
          "$ref": "#/$defs/Money"
        },
        "vat_total": {
          "$ref": "#/$defs/Money"
        },
        "vat_deductible": {
          "$ref": "#/$defs/Money"
        },
        "total": {
          "$ref": "#/$defs/Money"
        },
        "payable": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        },
        "paid": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "$ref": "#/$defs/InvoicePayStatus"
        }
      },
      "required": [
        "book",
        "year",
        "number",
        "entry_id",
        "entry_year",
        "entry_number",
        "posting_date",
        "storno",
        "reversed",
        "doc_kind",
        "doc_number",
        "doc_date",
        "counterparty",
        "advance",
        "base_18",
        "vat_18",
        "base_10",
        "vat_10",
        "base_5",
        "vat_5",
        "base_other",
        "vat_total",
        "vat_deductible",
        "total",
        "status"
      ]
    },
    "InvoiceBook": {
      "type": "string",
      "enum": [
        "kif",
        "kuf"
      ]
    },
    "InvoicePayStatus": {
      "type": "string",
      "enum": [
        "paid",
        "partial",
        "unpaid",
        "none"
      ]
    },
    "api::invoices::ListQ": {
      "type": "object",
      "properties": {
        "direction": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "Invoice": {
      "type": "object",
      "properties": {
        "export_prices": {
          "anyOf": [
            {
              "$ref": "#/$defs/ExportPrices"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "id": {
          "$ref": "#/$defs/InvoiceId"
        },
        "direction": {
          "$ref": "#/$defs/InvoiceDirection"
        },
        "kind": {
          "$ref": "#/$defs/InvoiceKind"
        },
        "seq": {
          "type": "integer",
          "format": "i32"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "number": {
          "type": "string"
        },
        "issue_date": {
          "type": "string",
          "format": "date"
        },
        "supply_date": {
          "type": "string",
          "format": "date"
        },
        "due_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "place": {
          "type": "string"
        },
        "partner_id": {
          "$ref": "#/$defs/PartnerId"
        },
        "partner_name": {
          "type": "string"
        },
        "account": {
          "type": "string"
        },
        "ref_invoice_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/InvoiceId"
            },
            {
              "type": "null"
            }
          ]
        },
        "ref_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "net": {
          "$ref": "#/$defs/Money"
        },
        "vat": {
          "$ref": "#/$defs/Money"
        },
        "total": {
          "$ref": "#/$defs/Money"
        },
        "entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "note": {
          "type": "string"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InvoiceLine"
          },
          "x-serde-default": true,
          "default": []
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "storno_entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "einvoice_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "einvoice_state": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "series_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "sales_document_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/SalesDocumentId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "id",
        "direction",
        "kind",
        "seq",
        "year",
        "number",
        "issue_date",
        "supply_date",
        "place",
        "partner_id",
        "partner_name",
        "account",
        "net",
        "vat",
        "total",
        "entry_id",
        "note",
        "created_at",
        "created_by"
      ]
    },
    "ExportPrices": {
      "type": "object",
      "properties": {
        "fx": {
          "$ref": "#/$defs/Fx"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ExportPrice"
          }
        }
      },
      "required": [
        "fx",
        "lines"
      ]
    },
    "ExportPrice": {
      "type": "object",
      "properties": {
        "price": {
          "$ref": "#/$defs/Money"
        },
        "discount": {
          "$ref": "#/$defs/Money"
        },
        "net": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "price",
        "discount",
        "net"
      ]
    },
    "InvoiceDirection": {
      "type": "string",
      "enum": [
        "out",
        "in"
      ]
    },
    "InvoiceKind": {
      "type": "string",
      "enum": [
        "invoice",
        "export",
        "advance",
        "credit_note"
      ]
    },
    "InvoiceLine": {
      "type": "object",
      "properties": {
        "dispatch": {
          "anyOf": [
            {
              "$ref": "#/$defs/DispatchLineRef"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "description": {
          "type": "string"
        },
        "unit": {
          "type": "string"
        },
        "quantity": {
          "$ref": "#/$defs/Qty"
        },
        "price": {
          "$ref": "#/$defs/Money"
        },
        "discount": {
          "$ref": "#/$defs/Money"
        },
        "net": {
          "$ref": "#/$defs/Money"
        },
        "treatment": {
          "$ref": "#/$defs/VatTreatment"
        },
        "rate": {
          "type": "integer",
          "format": "i32"
        },
        "vat": {
          "$ref": "#/$defs/Money"
        },
        "account": {
          "type": "string"
        },
        "cost_center": {
          "anyOf": [
            {
              "$ref": "#/$defs/CostCenterId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "line_no",
        "description",
        "unit",
        "quantity",
        "price",
        "discount",
        "net",
        "treatment",
        "rate",
        "vat",
        "account"
      ]
    },
    "DispatchLineRef": {
      "type": "object",
      "properties": {
        "doc_id": {
          "$ref": "#/$defs/StockDocId"
        },
        "line_no": {
          "type": "integer",
          "format": "i32"
        }
      },
      "required": [
        "doc_id",
        "line_no"
      ]
    },
    "SalesDocumentId": {
      "type": "integer",
      "format": "i64"
    },
    "NewInvoice": {
      "type": "object",
      "properties": {
        "currency": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "direction": {
          "$ref": "#/$defs/InvoiceDirection"
        },
        "kind": {
          "$ref": "#/$defs/InvoiceKind"
        },
        "partner_id": {
          "$ref": "#/$defs/PartnerId"
        },
        "issue_date": {
          "type": "string",
          "format": "date"
        },
        "supply_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "due_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "posting_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "doc_number": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "place": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "account": {
          "type": "string"
        },
        "ref_invoice_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/InvoiceId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NewInvoiceLine"
          }
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "series_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/SeriesId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "sales_document_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/SalesDocumentId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "direction",
        "kind",
        "partner_id",
        "issue_date",
        "account",
        "lines"
      ]
    },
    "NewInvoiceLine": {
      "type": "object",
      "properties": {
        "dispatch": {
          "anyOf": [
            {
              "$ref": "#/$defs/DispatchLineRef"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "description": {
          "type": "string"
        },
        "unit": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "quantity": {
          "$ref": "#/$defs/Qty"
        },
        "price": {
          "$ref": "#/$defs/Money"
        },
        "discount": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true
        },
        "treatment": {
          "$ref": "#/$defs/VatTreatment"
        },
        "rate": {
          "type": "integer",
          "format": "i32"
        },
        "account": {
          "type": "string"
        },
        "cost_center": {
          "anyOf": [
            {
              "$ref": "#/$defs/CostCenterId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "description",
        "quantity",
        "price",
        "treatment",
        "rate",
        "account"
      ]
    },
    "SeriesId": {
      "type": "integer",
      "format": "i64"
    },
    "IssueInvoiceRequest": {
      "type": "object",
      "properties": {
        "offline": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "key": {
          "type": "string",
          "format": "uuid"
        },
        "invoice": {
          "$ref": "#/$defs/NewInvoice"
        },
        "ujp": {
          "$ref": "#/$defs/InvoiceEinvoice"
        },
        "recipient_edb": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "key",
        "invoice",
        "ujp"
      ]
    },
    "IssueInvoice": {
      "type": "object",
      "properties": {
        "offline": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "key": {
          "type": "string",
          "format": "uuid"
        },
        "invoice": {
          "$ref": "#/$defs/NewInvoice"
        },
        "ujp": {
          "$ref": "#/$defs/InvoiceEinvoice"
        }
      },
      "required": [
        "key",
        "invoice",
        "ujp"
      ]
    },
    "InvoiceEinvoice": {
      "type": "object",
      "properties": {
        "payment_type": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "exempt_vat_group": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "exempt_tax_indicator": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "exempt_lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InvoiceExemptLine"
          },
          "x-serde-default": true,
          "default": [],
          "x-omitted-when": "Vec::is_empty"
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": []
    },
    "InvoiceExemptLine": {
      "type": "object",
      "properties": {
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "vat_group": {
          "type": "string"
        },
        "tax_indicator": {
          "type": "string"
        }
      },
      "required": [
        "line_no",
        "vat_group",
        "tax_indicator"
      ]
    },
    "CancelInvoice": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        },
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "reason"
      ]
    },
    "InvoiceDossier": {
      "type": "object",
      "properties": {
        "invoice": {
          "$ref": "#/$defs/Invoice"
        },
        "entry": {
          "$ref": "#/$defs/Entry"
        },
        "matches": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OpenItemMatch"
          }
        },
        "payment_orders": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PaymentOrder"
          }
        },
        "attachments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AttachmentMeta"
          }
        },
        "related_invoices": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InvoiceReference"
          }
        },
        "einvoices": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "i64"
          }
        },
        "receipts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StockDocSummary"
          }
        },
        "ambiguous_reference": {
          "type": "boolean"
        },
        "quantities": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InvoiceReceiptQuantity"
          }
        }
      },
      "required": [
        "invoice",
        "entry",
        "matches",
        "payment_orders",
        "attachments",
        "related_invoices",
        "einvoices",
        "receipts",
        "ambiguous_reference",
        "quantities"
      ]
    },
    "OpenItemMatch": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "partner_id": {
          "$ref": "#/$defs/PartnerId"
        },
        "account": {
          "type": "string"
        },
        "debit": {
          "$ref": "#/$defs/LineRef"
        },
        "credit": {
          "$ref": "#/$defs/LineRef"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "match_date": {
          "type": "string",
          "format": "date"
        },
        "note": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "cancelled": {
          "anyOf": [
            {
              "$ref": "#/$defs/MatchCancellation"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "fx": {
          "anyOf": [
            {
              "$ref": "#/$defs/MatchFx"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "id",
        "partner_id",
        "account",
        "debit",
        "credit",
        "amount",
        "match_date",
        "note",
        "created_at",
        "created_by"
      ]
    },
    "MatchFx": {
      "type": "object",
      "properties": {
        "settlement_id": {
          "type": "integer",
          "format": "i64"
        },
        "role": {
          "$ref": "#/$defs/FxMatchRole"
        },
        "currency": {
          "type": "string"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "diff": {
          "$ref": "#/$defs/Money"
        },
        "entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "settlement_id",
        "role",
        "currency",
        "amount",
        "diff"
      ]
    },
    "FxMatchRole": {
      "type": "string",
      "enum": [
        "settle",
        "diff",
        "storno"
      ]
    },
    "PaymentOrder": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/PaymentOrderId"
        },
        "bank_account_id": {
          "$ref": "#/$defs/BankAccountId"
        },
        "payer_account": {
          "type": "string"
        },
        "form": {
          "$ref": "#/$defs/PaymentForm"
        },
        "payee_name": {
          "type": "string"
        },
        "payee_account": {
          "type": "string"
        },
        "payee_bank": {
          "type": "string"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "purpose": {
          "type": "string"
        },
        "payment_code": {
          "type": "string"
        },
        "payer_ref": {
          "type": "string"
        },
        "payee_ref": {
          "type": "string"
        },
        "revenue_code": {
          "type": "string"
        },
        "program_code": {
          "type": "string"
        },
        "budget_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "urgent": {
          "type": "boolean"
        },
        "value_date": {
          "type": "string",
          "format": "date"
        },
        "partner_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ]
        },
        "entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ]
        },
        "line_no": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "payroll_run_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/PayrollRunId"
            },
            {
              "type": "null"
            }
          ]
        },
        "payroll_line_no": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "note": {
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/PaymentStatus"
        },
        "batch_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/PaymentBatchId"
            },
            {
              "type": "null"
            }
          ]
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "bank_account_id",
        "payer_account",
        "form",
        "payee_name",
        "payee_account",
        "payee_bank",
        "amount",
        "purpose",
        "payment_code",
        "payer_ref",
        "payee_ref",
        "revenue_code",
        "program_code",
        "urgent",
        "value_date",
        "note",
        "status",
        "created_at",
        "created_by"
      ]
    },
    "PaymentOrderId": {
      "type": "integer",
      "format": "i64"
    },
    "PaymentForm": {
      "type": "string",
      "enum": [
        "pp30",
        "pp50"
      ]
    },
    "PayrollRunId": {
      "type": "integer",
      "format": "i64"
    },
    "PaymentStatus": {
      "type": "string",
      "enum": [
        "open",
        "exported",
        "cancelled"
      ]
    },
    "InvoiceReference": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/InvoiceId"
        },
        "number": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "number"
      ]
    },
    "InvoiceReceiptQuantity": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string"
        },
        "unit": {
          "type": "string"
        },
        "billed": {
          "anyOf": [
            {
              "$ref": "#/$defs/Qty"
            },
            {
              "type": "null"
            }
          ]
        },
        "received": {
          "anyOf": [
            {
              "$ref": "#/$defs/Qty"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "description",
        "unit"
      ]
    },
    "api::JournalQ": {
      "type": "object",
      "properties": {
        "year": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "limit": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ]
        },
        "order": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "JournalRow": {
      "type": "object",
      "properties": {
        "entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "number": {
          "type": "integer",
          "format": "i32"
        },
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "posting_date": {
          "type": "string",
          "format": "date"
        },
        "doc_number": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/EntryKind"
        },
        "account": {
          "type": "string"
        },
        "debit": {
          "$ref": "#/$defs/Money"
        },
        "credit": {
          "$ref": "#/$defs/Money"
        },
        "event_date": {
          "type": "string",
          "format": "date"
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "doc_issuer": {
          "type": "string"
        },
        "fx": {
          "anyOf": [
            {
              "$ref": "#/$defs/Fx"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "entry_id",
        "year",
        "number",
        "line_no",
        "posting_date",
        "doc_number",
        "description",
        "kind",
        "account",
        "debit",
        "credit",
        "event_date",
        "doc_date",
        "doc_issuer"
      ]
    },
    "api::leave::YearQ": {
      "type": "object",
      "properties": {
        "year": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "LeaveOverviewRow": {
      "type": "object",
      "properties": {
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "active": {
          "type": "boolean"
        },
        "balance": {
          "anyOf": [
            {
              "$ref": "#/$defs/LeaveBalance"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "employee_id",
        "first_name",
        "last_name",
        "active"
      ]
    },
    "LeaveBalance": {
      "type": "object",
      "properties": {
        "entitlement_id": {
          "type": "integer",
          "format": "i64"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "total_days": {
          "type": "integer",
          "format": "i32"
        },
        "carried_days": {
          "type": "integer",
          "format": "i32"
        },
        "carried_until": {
          "type": "string",
          "format": "date"
        },
        "approved": {
          "type": "integer",
          "format": "i32"
        },
        "used": {
          "type": "integer",
          "format": "i32"
        },
        "used_carried": {
          "type": "integer",
          "format": "i32"
        },
        "current_used": {
          "type": "integer",
          "format": "i32"
        },
        "expired": {
          "type": "integer",
          "format": "i32"
        },
        "remaining": {
          "type": "integer",
          "format": "i32"
        },
        "unverified": {
          "type": "boolean"
        }
      },
      "required": [
        "entitlement_id",
        "version",
        "total_days",
        "carried_days",
        "carried_until",
        "approved",
        "used",
        "used_carried",
        "current_used",
        "expired",
        "remaining",
        "unverified"
      ]
    },
    "api::leave::BalanceQ": {
      "type": "object",
      "properties": {
        "employee_id": {
          "type": "string",
          "format": "uuid"
        },
        "year": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "on": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "employee_id"
      ]
    },
    "api::leave::ListQ": {
      "type": "object",
      "properties": {
        "year": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "employee_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "LeaveDecision": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/LeaveDecisionId"
        },
        "number": {
          "type": "string"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "person": {
          "$ref": "#/$defs/LeavePerson"
        },
        "decision_date": {
          "type": "string",
          "format": "date"
        },
        "date_from": {
          "type": "string",
          "format": "date"
        },
        "date_to": {
          "type": "string",
          "format": "date"
        },
        "days": {
          "type": "integer",
          "format": "i32"
        },
        "used": {
          "type": "integer",
          "format": "i32"
        },
        "entitlement_days": {
          "type": "integer",
          "format": "i32"
        },
        "carried_days": {
          "type": "integer",
          "format": "i32"
        },
        "carried_until": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "approved_before": {
          "type": "integer",
          "format": "i32"
        },
        "unverified": {
          "type": "boolean"
        },
        "note": {
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/LeaveStatus"
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "cancelled_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "usages": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LeaveUsage"
          }
        }
      },
      "required": [
        "id",
        "number",
        "year",
        "employee_id",
        "person",
        "decision_date",
        "date_from",
        "date_to",
        "days",
        "used",
        "entitlement_days",
        "carried_days",
        "approved_before",
        "unverified",
        "note",
        "status",
        "created_at",
        "created_by",
        "usages"
      ]
    },
    "LeaveDecisionId": {
      "type": "integer",
      "format": "i64"
    },
    "LeavePerson": {
      "type": "object",
      "properties": {
        "embg": {
          "type": "string"
        },
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        }
      },
      "required": [
        "embg",
        "first_name",
        "last_name"
      ]
    },
    "LeaveUsage": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/LeaveUsageId"
        },
        "decision_id": {
          "$ref": "#/$defs/LeaveDecisionId"
        },
        "date_from": {
          "type": "string",
          "format": "date"
        },
        "date_to": {
          "type": "string",
          "format": "date"
        },
        "days": {
          "type": "integer",
          "format": "i32"
        },
        "note": {
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/LeaveStatus"
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "cancelled_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "decision_id",
        "date_from",
        "date_to",
        "days",
        "note",
        "status",
        "created_at",
        "created_by"
      ]
    },
    "LeaveUsageId": {
      "type": "integer",
      "format": "i64"
    },
    "NewLeaveDecision": {
      "type": "object",
      "properties": {
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "decision_date": {
          "type": "string",
          "format": "date"
        },
        "date_from": {
          "type": "string",
          "format": "date"
        },
        "date_to": {
          "type": "string",
          "format": "date"
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "employee_id",
        "year",
        "decision_date",
        "date_from",
        "date_to"
      ]
    },
    "CancelLeave": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "reason"
      ]
    },
    "NewLeaveUsage": {
      "type": "object",
      "properties": {
        "date_from": {
          "type": "string",
          "format": "date"
        },
        "date_to": {
          "type": "string",
          "format": "date"
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "date_from",
        "date_to"
      ]
    },
    "LeaveEntitlement": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "base_days": {
          "type": "integer",
          "format": "i32"
        },
        "criteria": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LeaveCriterionDays"
          }
        },
        "criteria_days": {
          "type": "integer",
          "format": "i32"
        },
        "total_days": {
          "type": "integer",
          "format": "i32"
        },
        "carried_days": {
          "type": "integer",
          "format": "i32"
        },
        "carried_until": {
          "type": "string",
          "format": "date"
        },
        "unverified": {
          "type": "boolean"
        },
        "prorata_note": {
          "type": "string"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "employee_id",
        "year",
        "version",
        "base_days",
        "criteria",
        "criteria_days",
        "total_days",
        "carried_days",
        "carried_until",
        "unverified",
        "prorata_note",
        "created_at",
        "created_by"
      ]
    },
    "LeaveCriterionDays": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "days": {
          "type": "integer",
          "format": "i32"
        }
      },
      "required": [
        "code",
        "days"
      ]
    },
    "NewLeaveEntitlement": {
      "type": "object",
      "properties": {
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "base_days": {
          "type": "integer",
          "format": "i32"
        },
        "criteria": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LeaveCriterionDays"
          },
          "x-serde-default": true,
          "default": []
        },
        "carried_days": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": true,
          "default": 0
        },
        "prorata_note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "reason": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "employee_id",
        "year",
        "base_days"
      ]
    },
    "LeaveRules": {
      "type": "object",
      "properties": {
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "min_days": {
          "type": "integer",
          "format": "i32"
        },
        "max_days": {
          "type": "integer",
          "format": "i32"
        },
        "carried_until": {
          "type": "string",
          "format": "date"
        },
        "unverified": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "criteria": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LeaveCriterion"
          }
        }
      },
      "required": [
        "year",
        "min_days",
        "max_days",
        "carried_until",
        "unverified",
        "criteria"
      ]
    },
    "LeaveCriterion": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "max_days": {
          "type": "integer",
          "format": "i32"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "source": {
          "type": "string"
        },
        "verified": {
          "type": "boolean"
        }
      },
      "required": [
        "code",
        "name",
        "max_days",
        "valid_from",
        "source",
        "verified"
      ]
    },
    "api::leave::DaysQ": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string",
          "format": "date"
        },
        "to": {
          "type": "string",
          "format": "date"
        }
      },
      "required": [
        "from",
        "to"
      ]
    },
    "LeaveWorkingDays": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string",
          "format": "date"
        },
        "to": {
          "type": "string",
          "format": "date"
        },
        "days": {
          "type": "integer",
          "format": "i32"
        }
      },
      "required": [
        "from",
        "to",
        "days"
      ]
    },
    "ManageTenant": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "reason": {
              "type": "string"
            },
            "action": {
              "const": "edit",
              "type": "string"
            }
          },
          "required": [
            "name",
            "reason",
            "action"
          ]
        },
        {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "reason": {
              "type": "string"
            },
            "details": {
              "$ref": "#/$defs/TenantDetails"
            },
            "action": {
              "const": "edit_details",
              "type": "string"
            }
          },
          "required": [
            "name",
            "reason",
            "details",
            "action"
          ]
        },
        {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string"
            },
            "action": {
              "const": "archive",
              "type": "string"
            }
          },
          "required": [
            "reason",
            "action"
          ]
        },
        {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string"
            },
            "action": {
              "const": "restore",
              "type": "string"
            }
          },
          "required": [
            "reason",
            "action"
          ]
        },
        {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string"
            },
            "action": {
              "const": "delete",
              "type": "string"
            }
          },
          "required": [
            "reason",
            "action"
          ]
        }
      ]
    },
    "TenantLogo": {
      "type": "object",
      "properties": {
        "version": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": true,
          "default": 0
        },
        "sha256": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "width": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "size": {
          "type": "integer",
          "format": "i64",
          "x-serde-default": true,
          "default": 0
        },
        "public_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "updated_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "updated_by": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": []
    },
    "api::partners::MatchesQ": {
      "type": "object",
      "properties": {
        "partner": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "NewMatch": {
      "type": "object",
      "properties": {
        "debit": {
          "$ref": "#/$defs/LineRef"
        },
        "credit": {
          "$ref": "#/$defs/LineRef"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "debit",
        "credit",
        "amount"
      ]
    },
    "NewFxMatch": {
      "type": "object",
      "properties": {
        "debit": {
          "$ref": "#/$defs/LineRef"
        },
        "credit": {
          "$ref": "#/$defs/LineRef"
        },
        "fx_amount": {
          "$ref": "#/$defs/Money"
        },
        "amount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "debit",
        "credit",
        "fx_amount"
      ]
    },
    "Member": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "role": {
          "$ref": "#/$defs/Role"
        },
        "granted_at": {
          "type": "string",
          "format": "date-time"
        },
        "granted_by": {
          "type": "string"
        }
      },
      "required": [
        "email",
        "name",
        "role",
        "granted_at",
        "granted_by"
      ]
    },
    "SetMember": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "role": {
          "anyOf": [
            {
              "$ref": "#/$defs/Role"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "email"
      ]
    },
    "api::messages::ListQ": {
      "type": "object",
      "properties": {
        "box": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "InternalMessage": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/InternalMessageId"
        },
        "thread_id": {
          "$ref": "#/$defs/InternalMessageId"
        },
        "reply_to": {
          "anyOf": [
            {
              "$ref": "#/$defs/InternalMessageId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "sender": {
          "type": "string"
        },
        "recipients": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "subject": {
          "type": "string"
        },
        "body": {
          "type": "string"
        },
        "link": {
          "anyOf": [
            {
              "$ref": "#/$defs/MessageLink"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "link_label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "to_me": {
          "type": "boolean"
        },
        "read": {
          "type": "boolean"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "thread_id",
        "sender",
        "recipients",
        "subject",
        "body",
        "to_me",
        "read",
        "created_at"
      ]
    },
    "InternalMessageId": {
      "type": "integer",
      "format": "i64"
    },
    "MessageLink": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/$defs/EntryId"
            },
            "kind": {
              "const": "journal_entry",
              "type": "string"
            }
          },
          "required": [
            "id",
            "kind"
          ]
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/$defs/InvoiceId"
            },
            "kind": {
              "const": "invoice",
              "type": "string"
            }
          },
          "required": [
            "id",
            "kind"
          ]
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/$defs/PartnerId"
            },
            "kind": {
              "const": "partner",
              "type": "string"
            }
          },
          "required": [
            "id",
            "kind"
          ]
        }
      ]
    },
    "NewInternalMessage": {
      "type": "object",
      "properties": {
        "to": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "x-serde-default": true,
          "default": []
        },
        "subject": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "body": {
          "type": "string"
        },
        "reply_to": {
          "anyOf": [
            {
              "$ref": "#/$defs/InternalMessageId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "link": {
          "anyOf": [
            {
              "$ref": "#/$defs/MessageLink"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "body"
      ]
    },
    "UnreadMessages": {
      "type": "object",
      "properties": {
        "unread": {
          "type": "integer",
          "format": "i64"
        }
      },
      "required": [
        "unread"
      ]
    },
    "MarkMessageRead": {
      "type": "object",
      "properties": {
        "read": {
          "type": "boolean"
        }
      },
      "required": [
        "read"
      ]
    },
    "TenantMfaPolicy": {
      "type": "object",
      "properties": {
        "required": {
          "type": "boolean"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "changed_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "changed_by": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "required"
      ]
    },
    "SetTenantMfaPolicy": {
      "type": "object",
      "properties": {
        "required": {
          "type": "boolean"
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "required",
        "reason"
      ]
    },
    "Series": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/SeriesId"
        },
        "doc_type": {
          "$ref": "#/$defs/SeriesDocType"
        },
        "code": {
          "type": "string"
        },
        "warehouse_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/WarehouseId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "warehouse": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "versions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SeriesVersion"
          }
        },
        "used": {
          "type": "integer",
          "format": "i64",
          "x-serde-default": true,
          "default": 0
        }
      },
      "required": [
        "id",
        "doc_type",
        "code",
        "versions"
      ]
    },
    "SeriesVersion": {
      "type": "object",
      "properties": {
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "name": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "template": {
          "type": "string"
        },
        "reset": {
          "$ref": "#/$defs/SeriesReset",
          "x-serde-default": true
        },
        "start_number": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": "one",
          "default": 1
        },
        "is_default": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "active": {
          "type": "boolean",
          "x-serde-default": "yes",
          "default": true
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "version",
        "valid_from",
        "template",
        "created_at",
        "created_by"
      ]
    },
    "SeriesData": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "template": {
          "type": "string"
        },
        "reset": {
          "$ref": "#/$defs/SeriesReset",
          "x-serde-default": true
        },
        "start_number": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": "one",
          "default": 1
        },
        "is_default": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "active": {
          "type": "boolean",
          "x-serde-default": "yes",
          "default": true
        }
      },
      "required": [
        "valid_from",
        "template"
      ]
    },
    "NewSeries": {
      "type": "object",
      "properties": {
        "doc_type": {
          "$ref": "#/$defs/SeriesDocType"
        },
        "code": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "warehouse": {
          "anyOf": [
            {
              "$ref": "#/$defs/WarehouseId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "name": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "template": {
          "type": "string"
        },
        "reset": {
          "$ref": "#/$defs/SeriesReset",
          "x-serde-default": true
        },
        "start_number": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": "one",
          "default": 1
        },
        "is_default": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "active": {
          "type": "boolean",
          "x-serde-default": "yes",
          "default": true
        }
      },
      "required": [
        "doc_type",
        "valid_from",
        "template"
      ]
    },
    "api::series::PreviewQ": {
      "type": "object",
      "properties": {
        "doc_type": {
          "$ref": "#/$defs/SeriesDocType"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "warehouse": {
          "anyOf": [
            {
              "$ref": "#/$defs/WarehouseId"
            },
            {
              "type": "null"
            }
          ]
        },
        "series": {
          "anyOf": [
            {
              "$ref": "#/$defs/SeriesId"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "doc_type",
        "date"
      ]
    },
    "SeriesPreview": {
      "type": "object",
      "properties": {
        "doc_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "SeriesChange": {
      "type": "object",
      "properties": {
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "name": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "template": {
          "type": "string"
        },
        "reset": {
          "$ref": "#/$defs/SeriesReset",
          "x-serde-default": true
        },
        "start_number": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": "one",
          "default": 1
        },
        "is_default": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "active": {
          "type": "boolean",
          "x-serde-default": "yes",
          "default": true
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "version",
        "valid_from",
        "template",
        "reason"
      ]
    },
    "NumberingYear": {
      "type": "object",
      "properties": {
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "entries": {
          "type": "integer",
          "format": "i32"
        },
        "first_number": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "last_number": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "counter": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "missing": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "i32"
          }
        },
        "duplicates": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "i32"
          }
        }
      },
      "required": [
        "year",
        "entries",
        "missing",
        "duplicates"
      ]
    },
    "api::partners::OpenItemsQ": {
      "type": "object",
      "properties": {
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "partner": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ]
        },
        "all": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": []
    },
    "OpenItem": {
      "type": "object",
      "properties": {
        "line": {
          "$ref": "#/$defs/LineRef"
        },
        "partner_id": {
          "$ref": "#/$defs/PartnerId"
        },
        "partner_code": {
          "type": "integer",
          "format": "i32"
        },
        "partner_name": {
          "type": "string"
        },
        "account": {
          "type": "string"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "number": {
          "type": "integer",
          "format": "i32"
        },
        "posting_date": {
          "type": "string",
          "format": "date"
        },
        "due_date": {
          "type": "string",
          "format": "date"
        },
        "doc_number": {
          "type": "string"
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "description": {
          "type": "string"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "matched": {
          "$ref": "#/$defs/Money"
        },
        "open": {
          "$ref": "#/$defs/Money"
        },
        "fx": {
          "anyOf": [
            {
              "$ref": "#/$defs/OpenItemFx"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "line",
        "partner_id",
        "partner_code",
        "partner_name",
        "account",
        "year",
        "number",
        "posting_date",
        "due_date",
        "doc_number",
        "doc_date",
        "description",
        "amount",
        "matched",
        "open"
      ]
    },
    "OpenItemFx": {
      "type": "object",
      "properties": {
        "currency": {
          "type": "string"
        },
        "open": {
          "$ref": "#/$defs/Money"
        },
        "rate_micro": {
          "type": "integer",
          "format": "i64"
        }
      },
      "required": [
        "currency",
        "open",
        "rate_micro"
      ]
    },
    "OpeningBalanceImport": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "as_of": {
          "type": "string",
          "format": "date"
        },
        "source": {
          "type": "string"
        },
        "file_sha256": {
          "type": "string"
        },
        "rows": {
          "type": "integer",
          "format": "i32"
        },
        "total_debit": {
          "$ref": "#/$defs/Money"
        },
        "total_credit": {
          "$ref": "#/$defs/Money"
        },
        "entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "entry_number": {
          "type": "integer",
          "format": "i32"
        },
        "entry_year": {
          "type": "integer",
          "format": "i32"
        },
        "reversed": {
          "type": "boolean"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "as_of",
        "source",
        "file_sha256",
        "rows",
        "total_debit",
        "total_credit",
        "entry_id",
        "entry_number",
        "entry_year",
        "reversed",
        "created_at",
        "created_by"
      ]
    },
    "OpeningBalanceRequest": {
      "type": "object",
      "properties": {
        "as_of": {
          "type": "string",
          "format": "date"
        },
        "source": {
          "type": "string"
        },
        "csv": {
          "type": "string"
        },
        "preview": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": [
        "as_of",
        "source",
        "csv"
      ]
    },
    "OpeningBalanceResult": {
      "type": "object",
      "properties": {
        "rows": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OpeningBalanceRow"
          }
        },
        "total_debit": {
          "$ref": "#/$defs/Money"
        },
        "total_credit": {
          "$ref": "#/$defs/Money"
        },
        "zero_rows": {
          "type": "integer",
          "format": "u32",
          "minimum": 0
        },
        "errors": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OpeningBalanceError"
          }
        },
        "import": {
          "anyOf": [
            {
              "$ref": "#/$defs/OpeningBalanceImport"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "rows",
        "total_debit",
        "total_credit",
        "zero_rows",
        "errors"
      ]
    },
    "OpeningBalanceRow": {
      "type": "object",
      "properties": {
        "line": {
          "type": "integer",
          "format": "u32",
          "minimum": 0
        },
        "account": {
          "type": "string"
        },
        "account_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "partner": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "partner_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "due_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "debit": {
          "$ref": "#/$defs/Money"
        },
        "credit": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "line",
        "account",
        "debit",
        "credit"
      ]
    },
    "OpeningBalanceError": {
      "type": "object",
      "properties": {
        "line": {
          "type": "integer",
          "format": "u32",
          "minimum": 0
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "line",
        "message"
      ]
    },
    "api::other_income::ListQ": {
      "type": "object",
      "properties": {
        "year": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "OtherIncome": {
      "type": "object",
      "properties": {
        "agreed_net": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "id": {
          "$ref": "#/$defs/OtherIncomeId"
        },
        "number": {
          "type": "string"
        },
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "person": {
          "$ref": "#/$defs/OtherIncomePerson"
        },
        "kind": {
          "$ref": "#/$defs/IncomeKind"
        },
        "subtype": {
          "anyOf": [
            {
              "$ref": "#/$defs/IncomeSubtype"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "paid_cost": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "payment_date": {
          "type": "string",
          "format": "date"
        },
        "description": {
          "type": "string"
        },
        "cost_account": {
          "type": "string"
        },
        "calc": {
          "$ref": "#/$defs/OtherIncomeCalc"
        },
        "unverified": {
          "type": "boolean"
        },
        "entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "storno_entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ]
        },
        "filing_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "buyout_note_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/BuyoutNoteId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "number",
        "employee_id",
        "person",
        "kind",
        "payment_date",
        "description",
        "cost_account",
        "calc",
        "unverified",
        "entry_id",
        "created_at",
        "created_by"
      ]
    },
    "OtherIncomePerson": {
      "type": "object",
      "properties": {
        "embg": {
          "type": "string"
        },
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "address": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "bank_account": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "embg",
        "first_name",
        "last_name"
      ]
    },
    "IncomeKind": {
      "type": "string",
      "enum": [
        "service",
        "author",
        "rent",
        "other",
        "agricultural"
      ]
    },
    "IncomeSubtype": {
      "type": "string",
      "enum": [
        "other_general",
        "recyclable_waste",
        "S6.1",
        "S6.2",
        "sublease",
        "author_sculpture",
        "author_art",
        "author_science",
        "author_other",
        "author_transferred"
      ]
    },
    "OtherIncomeCalc": {
      "type": "object",
      "properties": {
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "norm_cost": {
          "$ref": "#/$defs/Money"
        },
        "base": {
          "$ref": "#/$defs/Money"
        },
        "pio": {
          "$ref": "#/$defs/Money"
        },
        "health": {
          "$ref": "#/$defs/Money"
        },
        "contributions": {
          "$ref": "#/$defs/Money"
        },
        "tax_base": {
          "$ref": "#/$defs/Money"
        },
        "pit": {
          "$ref": "#/$defs/Money"
        },
        "net": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "gross",
        "norm_cost",
        "base",
        "pio",
        "health",
        "contributions",
        "tax_base",
        "pit",
        "net"
      ]
    },
    "api::other_income::CreateQ": {
      "type": "object",
      "properties": {
        "agreed_net": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "NewOtherIncome": {
      "type": "object",
      "properties": {
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "kind": {
          "$ref": "#/$defs/IncomeKind"
        },
        "subtype": {
          "anyOf": [
            {
              "$ref": "#/$defs/IncomeSubtype"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "paid_cost": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "description": {
          "type": "string"
        },
        "cost_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "employee_id",
        "kind",
        "date",
        "gross",
        "description"
      ]
    },
    "api::other_income::AgriculturalQ": {
      "type": "object",
      "properties": {
        "year": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "AgriculturalBuyoutTotal": {
      "type": "object",
      "properties": {
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "embg": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "payments": {
          "type": "integer",
          "format": "i32"
        },
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "pit": {
          "$ref": "#/$defs/Money"
        },
        "net": {
          "$ref": "#/$defs/Money"
        },
        "threshold": {
          "$ref": "#/$defs/Money"
        },
        "exceeded": {
          "type": "boolean"
        }
      },
      "required": [
        "year",
        "embg",
        "name",
        "payments",
        "gross",
        "pit",
        "net",
        "threshold",
        "exceeded"
      ]
    },
    "api::other_income::PreviewQ": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/IncomeKind"
        },
        "gross": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        },
        "net": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        },
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "subtype": {
          "anyOf": [
            {
              "$ref": "#/$defs/IncomeSubtype"
            },
            {
              "type": "null"
            }
          ]
        },
        "paid_cost": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        },
        "employee_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "kind"
      ]
    },
    "OtherIncomePreview": {
      "type": "object",
      "properties": {
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "norm_cost": {
          "$ref": "#/$defs/Money"
        },
        "base": {
          "$ref": "#/$defs/Money"
        },
        "pio": {
          "$ref": "#/$defs/Money"
        },
        "health": {
          "$ref": "#/$defs/Money"
        },
        "contributions": {
          "$ref": "#/$defs/Money"
        },
        "tax_base": {
          "$ref": "#/$defs/Money"
        },
        "pit": {
          "$ref": "#/$defs/Money"
        },
        "net": {
          "$ref": "#/$defs/Money"
        },
        "unverified": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "agricultural": {
          "anyOf": [
            {
              "$ref": "#/$defs/AgriculturalCheck"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "gross",
        "norm_cost",
        "base",
        "pio",
        "health",
        "contributions",
        "tax_base",
        "pit",
        "net",
        "unverified"
      ]
    },
    "CancelOtherIncome": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        },
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "reason"
      ]
    },
    "OtherIncomeEpddStatus": {
      "type": "object",
      "properties": {
        "filing_id": {
          "type": "integer",
          "format": "i64"
        },
        "reference": {
          "type": "string"
        },
        "approved": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "decision_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "folio": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "pp53_sha256": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "valid_until": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "can_pay": {
          "type": "boolean"
        }
      },
      "required": [
        "filing_id",
        "reference",
        "can_pay"
      ]
    },
    "RecordEpddResponse": {
      "type": "object",
      "properties": {
        "filing_id": {
          "type": "integer",
          "format": "i64"
        },
        "decision_date": {
          "type": "string",
          "format": "date"
        },
        "approved": {
          "type": "boolean"
        },
        "folio": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "reason": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "pp53_base64": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "filing_id",
        "decision_date",
        "approved"
      ]
    },
    "OtherIncomeFiled": {
      "type": "object",
      "properties": {
        "reference": {
          "type": "string"
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "reference"
      ]
    },
    "PartnerMerge": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/PartnerMergeId"
        },
        "duplicate": {
          "$ref": "#/$defs/PartnerId"
        },
        "duplicate_code": {
          "type": "integer",
          "format": "i32"
        },
        "duplicate_name": {
          "type": "string"
        },
        "target": {
          "$ref": "#/$defs/PartnerId"
        },
        "target_code": {
          "type": "integer",
          "format": "i32"
        },
        "target_name": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "reason": {
          "type": "string"
        },
        "entry_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PartnerMergeLine"
          },
          "x-serde-default": true,
          "default": []
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "duplicate",
        "duplicate_code",
        "duplicate_name",
        "target",
        "target_code",
        "target_name",
        "date",
        "reason",
        "created_at",
        "created_by"
      ]
    },
    "PartnerMergeId": {
      "type": "integer",
      "format": "i64"
    },
    "PartnerMergeLine": {
      "type": "object",
      "properties": {
        "item_entry_id": {
          "type": "integer",
          "format": "i64"
        },
        "item_line_no": {
          "type": "integer",
          "format": "i32"
        },
        "doc_number": {
          "type": "string"
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "account": {
          "type": "string"
        },
        "due_date": {
          "type": "string",
          "format": "date"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "close_line_no": {
          "type": "integer",
          "format": "i32"
        },
        "open_line_no": {
          "type": "integer",
          "format": "i32"
        }
      },
      "required": [
        "item_entry_id",
        "item_line_no",
        "doc_number",
        "doc_date",
        "account",
        "due_date",
        "amount",
        "close_line_no",
        "open_line_no"
      ]
    },
    "Partner": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/PartnerId"
        },
        "code": {
          "type": "integer",
          "format": "i32"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "name": {
          "type": "string"
        },
        "edb": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "embs": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "address": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "country": {
          "type": "string",
          "x-serde-default": "default_country",
          "default": "MK"
        },
        "kind": {
          "$ref": "#/$defs/PartnerKind",
          "x-serde-default": true
        },
        "vat_payer": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "active": {
          "type": "boolean",
          "x-serde-default": "default_true",
          "default": true
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "changed_at": {
          "type": "string",
          "format": "date-time"
        },
        "changed_by": {
          "type": "string"
        },
        "merged_into": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "id",
        "code",
        "version",
        "name",
        "created_at",
        "created_by",
        "changed_at",
        "changed_by"
      ]
    },
    "PartnerData": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "edb": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "embs": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "address": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "country": {
          "type": "string",
          "x-serde-default": "default_country",
          "default": "MK"
        },
        "kind": {
          "$ref": "#/$defs/PartnerKind",
          "x-serde-default": true
        },
        "vat_payer": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "active": {
          "type": "boolean",
          "x-serde-default": "default_true",
          "default": true
        }
      },
      "required": [
        "name"
      ]
    },
    "PartnerKind": {
      "type": "string",
      "enum": [
        "customer",
        "supplier",
        "both"
      ]
    },
    "NewPartnerVersion": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "edb": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "embs": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "address": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "country": {
          "type": "string",
          "x-serde-default": "default_country",
          "default": "MK"
        },
        "kind": {
          "$ref": "#/$defs/PartnerKind",
          "x-serde-default": true
        },
        "vat_payer": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "active": {
          "type": "boolean",
          "x-serde-default": "default_true",
          "default": true
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "reason"
      ]
    },
    "PartnerCard": {
      "type": "object",
      "properties": {
        "partner": {
          "$ref": "#/$defs/Partner"
        },
        "from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "to": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "opening": {
          "$ref": "#/$defs/Money"
        },
        "rows": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PartnerCardRow"
          }
        },
        "closing": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "partner",
        "opening",
        "rows",
        "closing"
      ]
    },
    "PartnerCardRow": {
      "type": "object",
      "properties": {
        "line": {
          "$ref": "#/$defs/LineRef"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "number": {
          "type": "integer",
          "format": "i32"
        },
        "posting_date": {
          "type": "string",
          "format": "date"
        },
        "due_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "doc_number": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "account": {
          "type": "string"
        },
        "debit": {
          "$ref": "#/$defs/Money"
        },
        "credit": {
          "$ref": "#/$defs/Money"
        },
        "balance": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "line",
        "year",
        "number",
        "posting_date",
        "doc_number",
        "description",
        "account",
        "debit",
        "credit",
        "balance"
      ]
    },
    "Ios": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "format": "date"
        },
        "tenant_name": {
          "type": "string"
        },
        "tenant_edb": {
          "type": "string"
        },
        "partner": {
          "$ref": "#/$defs/Partner"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OpenItem"
          }
        },
        "balance": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "date",
        "tenant_name",
        "tenant_edb",
        "partner",
        "items",
        "balance"
      ]
    },
    "NewPartnerMerge": {
      "type": "object",
      "properties": {
        "target": {
          "$ref": "#/$defs/PartnerId"
        },
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "target",
        "reason"
      ]
    },
    "PartnerVersion": {
      "type": "object",
      "properties": {
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "name": {
          "type": "string"
        },
        "edb": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "embs": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "address": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "country": {
          "type": "string",
          "x-serde-default": "default_country",
          "default": "MK"
        },
        "kind": {
          "$ref": "#/$defs/PartnerKind",
          "x-serde-default": true
        },
        "vat_payer": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "active": {
          "type": "boolean",
          "x-serde-default": "default_true",
          "default": true
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "version",
        "name",
        "created_at",
        "created_by"
      ]
    },
    "api::payments::ListQ": {
      "type": "object",
      "properties": {
        "status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "NewPaymentOrder": {
      "type": "object",
      "properties": {
        "bank_account_id": {
          "$ref": "#/$defs/BankAccountId"
        },
        "form": {
          "$ref": "#/$defs/PaymentForm"
        },
        "payee_name": {
          "type": "string"
        },
        "payee_account": {
          "type": "string"
        },
        "payee_bank": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "purpose": {
          "type": "string"
        },
        "payment_code": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "payer_ref": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "payee_ref": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "revenue_code": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "program_code": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "budget_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "urgent": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "value_date": {
          "type": "string",
          "format": "date"
        },
        "partner_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "line_no": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "bank_account_id",
        "form",
        "payee_name",
        "payee_account",
        "amount",
        "purpose",
        "value_date"
      ]
    },
    "NewPaymentBatch": {
      "type": "object",
      "properties": {
        "bank_account_id": {
          "$ref": "#/$defs/BankAccountId"
        },
        "order_ids": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PaymentOrderId"
          }
        },
        "nlb": {
          "anyOf": [
            {
              "$ref": "#/$defs/NlbClearing"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "bank_account_id",
        "order_ids"
      ]
    },
    "NlbClearing": {
      "type": "string",
      "enum": [
        "internal",
        "mips",
        "kibs"
      ]
    },
    "PayrollPaymentOrders": {
      "type": "object",
      "properties": {
        "run_id": {
          "$ref": "#/$defs/PayrollRunId"
        },
        "bank_account_id": {
          "$ref": "#/$defs/BankAccountId"
        },
        "value_date": {
          "type": "string",
          "format": "date"
        }
      },
      "required": [
        "run_id",
        "bank_account_id",
        "value_date"
      ]
    },
    "PayrollPaymentResult": {
      "type": "object",
      "properties": {
        "created": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PaymentOrder"
          }
        },
        "without_account": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "created",
        "without_account"
      ]
    },
    "api::payments::PlanQ": {
      "type": "object",
      "properties": {
        "due": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "CancelPaymentOrder": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "reason"
      ]
    },
    "api::payroll_advances::LimitQ": {
      "type": "object",
      "properties": {
        "employee_id": {
          "type": "string",
          "format": "uuid"
        },
        "period": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "employee_id"
      ]
    },
    "PayrollAdvanceLimit": {
      "type": "object",
      "properties": {
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "period": {
          "type": "string",
          "format": "date"
        },
        "expected_net": {
          "$ref": "#/$defs/Money"
        },
        "deductions": {
          "$ref": "#/$defs/Money"
        },
        "max_pct": {
          "type": "string"
        },
        "limit": {
          "$ref": "#/$defs/Money"
        },
        "advanced": {
          "$ref": "#/$defs/Money"
        },
        "available": {
          "$ref": "#/$defs/Money"
        },
        "unverified": {
          "type": "boolean"
        }
      },
      "required": [
        "employee_id",
        "period",
        "expected_net",
        "deductions",
        "max_pct",
        "limit",
        "advanced",
        "available",
        "unverified"
      ]
    },
    "api::payroll_advances::ListQ": {
      "type": "object",
      "properties": {
        "period": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "employee_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "PayrollAdvance": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/PayrollAdvanceId"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "number": {
          "type": "integer",
          "format": "i32"
        },
        "advance_date": {
          "type": "string",
          "format": "date"
        },
        "period": {
          "type": "string",
          "format": "date"
        },
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "employee_name": {
          "type": "string"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "expected_net": {
          "$ref": "#/$defs/Money"
        },
        "deductions": {
          "$ref": "#/$defs/Money"
        },
        "max_pct": {
          "type": "string"
        },
        "limit_amount": {
          "$ref": "#/$defs/Money"
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "status": {
          "$ref": "#/$defs/PayrollAdvanceStatus"
        },
        "paid": {
          "$ref": "#/$defs/Money"
        },
        "entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "storno_entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "year",
        "number",
        "advance_date",
        "period",
        "employee_id",
        "employee_name",
        "amount",
        "expected_net",
        "deductions",
        "max_pct",
        "limit_amount",
        "status",
        "paid",
        "created_at",
        "created_by"
      ]
    },
    "PayrollAdvanceId": {
      "type": "integer",
      "format": "i64"
    },
    "PayrollAdvanceStatus": {
      "type": "string",
      "enum": [
        "active",
        "settled",
        "cancelled"
      ]
    },
    "NewPayrollAdvance": {
      "type": "object",
      "properties": {
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "advance_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "period": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "employee_id",
        "amount"
      ]
    },
    "PayrollAdvanceDetail": {
      "type": "object",
      "properties": {
        "advance": {
          "$ref": "#/$defs/PayrollAdvance"
        },
        "payment_orders": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PaymentOrder"
          }
        }
      },
      "required": [
        "advance",
        "payment_orders"
      ]
    },
    "NewPayrollAdvanceGroup": {
      "type": "object",
      "properties": {
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "employee_ids": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EmployeeId"
          },
          "x-serde-default": true,
          "default": [],
          "x-omitted-when": "Vec::is_empty"
        },
        "advance_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "period": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "amount"
      ]
    },
    "CancelPayrollAdvance": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "reason"
      ]
    },
    "NewPayrollAdvancePayment": {
      "type": "object",
      "properties": {
        "bank_account_id": {
          "$ref": "#/$defs/BankAccountId"
        },
        "value_date": {
          "type": "string",
          "format": "date"
        },
        "amount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "bank_account_id",
        "value_date"
      ]
    },
    "api::payroll_deduction_plans::ListQ": {
      "type": "object",
      "properties": {
        "employee_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "PayrollDeductionPlan": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/PayrollDeductionPlanId"
        },
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "employee_name": {
          "type": "string"
        },
        "type_code": {
          "type": "string"
        },
        "type_name": {
          "type": "string"
        },
        "total": {
          "$ref": "#/$defs/Money"
        },
        "installment": {
          "$ref": "#/$defs/Money"
        },
        "start_period": {
          "type": "string",
          "format": "date"
        },
        "creditor": {
          "type": "string"
        },
        "reference": {
          "type": "string"
        },
        "note": {
          "type": "string"
        },
        "legal_kind": {
          "anyOf": [
            {
              "$ref": "#/$defs/DeductionLegalKind"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "order_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "received_on": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "order_avg_salary": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "claim_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "consent_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "deducted": {
          "$ref": "#/$defs/Money"
        },
        "requested": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true
        },
        "remaining": {
          "$ref": "#/$defs/Money"
        },
        "installments": {
          "type": "integer",
          "format": "i32"
        },
        "last_period": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "status": {
          "$ref": "#/$defs/PayrollDeductionPlanStatus"
        },
        "close_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "closed_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "closed_by": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "employee_id",
        "employee_name",
        "type_code",
        "type_name",
        "total",
        "installment",
        "start_period",
        "creditor",
        "reference",
        "note",
        "deducted",
        "remaining",
        "installments",
        "status",
        "created_at",
        "created_by"
      ]
    },
    "PayrollDeductionPlanId": {
      "type": "integer",
      "format": "i64"
    },
    "DeductionLegalKind": {
      "type": "string",
      "enum": [
        "support",
        "other",
        "employer"
      ]
    },
    "PayrollDeductionPlanStatus": {
      "type": "string",
      "enum": [
        "active",
        "paid",
        "closed"
      ]
    },
    "NewPayrollDeductionPlan": {
      "type": "object",
      "properties": {
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "type_code": {
          "type": "string"
        },
        "total": {
          "$ref": "#/$defs/Money"
        },
        "installment": {
          "$ref": "#/$defs/Money"
        },
        "start_period": {
          "type": "string",
          "format": "date"
        },
        "creditor": {
          "type": "string"
        },
        "reference": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "legal_kind": {
          "anyOf": [
            {
              "$ref": "#/$defs/DeductionLegalKind"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "order_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "received_on": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "claim_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "consent_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "employee_id",
        "type_code",
        "total",
        "installment",
        "start_period",
        "creditor"
      ]
    },
    "PayrollDeductionPlanDetail": {
      "type": "object",
      "properties": {
        "plan": {
          "$ref": "#/$defs/PayrollDeductionPlan"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PayrollItem"
          }
        }
      },
      "required": [
        "plan",
        "items"
      ]
    },
    "PayrollItem": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "employee_name": {
          "type": "string"
        },
        "period": {
          "type": "string",
          "format": "date"
        },
        "type_code": {
          "type": "string"
        },
        "type_name": {
          "type": "string"
        },
        "category": {
          "type": "string"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "note": {
          "type": "string"
        },
        "cancelled": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "plan_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "employee_id",
        "employee_name",
        "period",
        "type_code",
        "type_name",
        "category",
        "amount",
        "note",
        "created_at",
        "created_by"
      ]
    },
    "ApplyPayrollDeductionPlans": {
      "type": "object",
      "properties": {
        "period": {
          "type": "string",
          "format": "date"
        }
      },
      "required": [
        "period"
      ]
    },
    "PayrollDeductionPlansApplied": {
      "type": "object",
      "properties": {
        "period": {
          "type": "string",
          "format": "date"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AppliedDeduction"
          }
        }
      },
      "required": [
        "period",
        "items"
      ]
    },
    "AppliedDeduction": {
      "type": "object",
      "properties": {
        "plan_id": {
          "$ref": "#/$defs/PayrollDeductionPlanId"
        },
        "item_id": {
          "type": "integer",
          "format": "i64"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "plan_id",
        "item_id",
        "amount"
      ]
    },
    "ClosePayrollDeductionPlan": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "reason"
      ]
    },
    "api::payroll_deduction_plans::LimitQ": {
      "type": "object",
      "properties": {
        "employee_id": {
          "type": "string",
          "format": "uuid"
        },
        "period": {
          "type": "string",
          "format": "date"
        },
        "order_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "employee_id",
        "period"
      ]
    },
    "GarnishmentLimit": {
      "type": "object",
      "properties": {
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "period": {
          "type": "string",
          "format": "date"
        },
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "net": {
          "$ref": "#/$defs/Money"
        },
        "order_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "avg_salary": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "fifth": {
          "type": "boolean"
        },
        "support_max": {
          "$ref": "#/$defs/Money"
        },
        "other_max": {
          "$ref": "#/$defs/Money"
        },
        "requested": {
          "$ref": "#/$defs/Money"
        },
        "withheld": {
          "$ref": "#/$defs/Money"
        },
        "garnishments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/GarnishmentLine"
          },
          "x-serde-default": true,
          "default": []
        }
      },
      "required": [
        "employee_id",
        "period",
        "gross",
        "net",
        "fifth",
        "support_max",
        "other_max",
        "requested",
        "withheld"
      ]
    },
    "GarnishmentLine": {
      "type": "object",
      "properties": {
        "item": {
          "type": "integer",
          "format": "i64"
        },
        "plan": {
          "$ref": "#/$defs/PayrollDeductionPlanId"
        },
        "kind": {
          "$ref": "#/$defs/DeductionLegalKind"
        },
        "order_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "received_on": {
          "type": "string",
          "format": "date"
        },
        "avg_salary": {
          "$ref": "#/$defs/Money"
        },
        "divisor": {
          "type": "integer",
          "format": "i32"
        },
        "cap": {
          "$ref": "#/$defs/Money"
        },
        "requested": {
          "$ref": "#/$defs/Money"
        },
        "withheld": {
          "$ref": "#/$defs/Money"
        },
        "carried": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "item",
        "plan",
        "kind",
        "received_on",
        "avg_salary",
        "divisor",
        "cap",
        "requested",
        "withheld",
        "carried"
      ]
    },
    "PayrollItemType": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "category": {
          "type": "string"
        },
        "threshold_param": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "code",
        "name",
        "category"
      ]
    },
    "api::payroll::PeriodQ": {
      "type": "object",
      "properties": {
        "period": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "NewPayrollItem": {
      "type": "object",
      "properties": {
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "period": {
          "type": "string",
          "format": "date"
        },
        "type_code": {
          "type": "string"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "employee_id",
        "period",
        "type_code",
        "amount"
      ]
    },
    "CancelPayrollItem": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "reason"
      ]
    },
    "MpinEpddSubmission": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "run_id": {
          "$ref": "#/$defs/PayrollRunId"
        },
        "run_version": {
          "type": "integer",
          "format": "i32"
        },
        "period": {
          "type": "string",
          "format": "date"
        },
        "xml_sha256": {
          "type": "string"
        },
        "status": {
          "type": "integer",
          "format": "i32"
        },
        "error_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "error_messages": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "x-serde-default": true,
          "default": []
        },
        "transaction_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "checks": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MpinEpddCheck"
          },
          "x-serde-default": true,
          "default": []
        },
        "accepted": {
          "type": "boolean"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "run_id",
        "run_version",
        "period",
        "xml_sha256",
        "status",
        "accepted",
        "created_at",
        "created_by"
      ]
    },
    "MpinEpddCheck": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "status": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "status",
        "created_at",
        "created_by"
      ]
    },
    "MpinSettings": {
      "type": "object",
      "properties": {
        "epdd_username": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "payer_kind": {
          "type": "string",
          "x-serde-default": "payer_kind",
          "default": "110"
        },
        "obligation_kind": {
          "type": "string",
          "x-serde-default": "obligation_kind",
          "default": "101"
        },
        "version": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": true,
          "default": 0
        }
      },
      "required": []
    },
    "api::payroll::DateQ": {
      "type": "object",
      "properties": {
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "PayrollParam": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "unit": {
          "type": "string"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "value": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "verified": {
          "type": "boolean"
        },
        "note": {
          "type": "string"
        },
        "own": {
          "type": "boolean"
        },
        "in_effect": {
          "type": "boolean"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "code",
        "name",
        "unit",
        "valid_from",
        "value",
        "source",
        "verified",
        "note",
        "own",
        "in_effect",
        "created_at",
        "created_by"
      ]
    },
    "NewPayrollParam": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "value": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "verified": {
          "type": "boolean"
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "valid_from",
        "value",
        "source",
        "verified",
        "reason"
      ]
    },
    "PayrollRun": {
      "type": "object",
      "properties": {
        "id": {
          "anyOf": [
            {
              "$ref": "#/$defs/PayrollRunId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "period": {
          "type": "string",
          "format": "date"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "calc_kind": {
          "$ref": "#/$defs/PayrollCalcKind",
          "x-serde-default": true
        },
        "seq": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": "one",
          "default": 1,
          "x-omitted-when": "is_one"
        },
        "options": {
          "x-serde-default": true,
          "x-omitted-when": "serde_json::Value::is_null"
        },
        "params": {},
        "unverified": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PayrollLine"
          }
        },
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "contributions": {
          "$ref": "#/$defs/Money"
        },
        "pit": {
          "$ref": "#/$defs/Money"
        },
        "net": {
          "$ref": "#/$defs/Money"
        },
        "advances": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true
        },
        "payout": {
          "$ref": "#/$defs/Money"
        },
        "entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "draft_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/DraftId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "mpin_filed": {
          "type": "boolean"
        },
        "latest": {
          "type": "boolean"
        },
        "created_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_by": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "period",
        "version",
        "params",
        "unverified",
        "lines",
        "gross",
        "contributions",
        "pit",
        "net",
        "payout",
        "mpin_filed",
        "latest"
      ]
    },
    "PayrollCalcKind": {
      "type": "string",
      "enum": [
        "regular",
        "additional",
        "advance",
        "final",
        "correction"
      ]
    },
    "PayrollLine": {
      "type": "object",
      "properties": {
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "kind": {
          "$ref": "#/$defs/PayrollKind"
        },
        "contract_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/ContractId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "cost_account": {
          "type": "string"
        },
        "person": {
          "$ref": "#/$defs/PayrollPerson"
        },
        "inputs": {},
        "base_gross": {
          "$ref": "#/$defs/Money"
        },
        "additions": {
          "$ref": "#/$defs/Money"
        },
        "reimb_taxable": {
          "$ref": "#/$defs/Money"
        },
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "base": {
          "$ref": "#/$defs/Money"
        },
        "pio": {
          "$ref": "#/$defs/Money"
        },
        "health": {
          "$ref": "#/$defs/Money"
        },
        "unemployment": {
          "$ref": "#/$defs/Money"
        },
        "injury": {
          "$ref": "#/$defs/Money"
        },
        "contributions": {
          "$ref": "#/$defs/Money"
        },
        "exemption": {
          "$ref": "#/$defs/Money"
        },
        "tax_base": {
          "$ref": "#/$defs/Money"
        },
        "pit": {
          "$ref": "#/$defs/Money"
        },
        "net": {
          "$ref": "#/$defs/Money"
        },
        "reimb": {
          "$ref": "#/$defs/Money"
        },
        "deductions": {
          "$ref": "#/$defs/Money"
        },
        "advances": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true
        },
        "payout": {
          "$ref": "#/$defs/Money"
        },
        "norm_cost": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true
        },
        "leave_days": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": true,
          "default": 0,
          "x-omitted-when": "is_zero_i32"
        },
        "work_days": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": true,
          "default": 0,
          "x-omitted-when": "is_zero_i32"
        },
        "leave_avg": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true,
          "x-omitted-when": "is_zero_money"
        },
        "leave_avg_months": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": true,
          "default": 0,
          "x-omitted-when": "is_zero_i32"
        },
        "leave_cut": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true,
          "x-omitted-when": "is_zero_money"
        },
        "leave_comp": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true,
          "x-omitted-when": "is_zero_money"
        },
        "sick_days": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": true,
          "default": 0,
          "x-omitted-when": "is_zero_i32"
        },
        "sick_fund_days": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": true,
          "default": 0,
          "x-omitted-when": "is_zero_i32"
        },
        "sick_cut": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true,
          "x-omitted-when": "is_zero_money"
        },
        "sick_comp": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true,
          "x-omitted-when": "is_zero_money"
        },
        "sick_parts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SickPart"
          },
          "x-serde-default": true,
          "default": [],
          "x-omitted-when": "Vec::is_empty"
        },
        "sick_fund_parts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SickFundPart"
          },
          "x-serde-default": true,
          "default": [],
          "x-omitted-when": "Vec::is_empty"
        },
        "seniority_years": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "seniority_pct": {
          "type": "string",
          "x-serde-default": true,
          "default": "",
          "x-omitted-when": "String::is_empty"
        },
        "seniority": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true,
          "x-omitted-when": "is_zero_money"
        },
        "seniority_from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "prior": {
          "anyOf": [
            {
              "$ref": "#/$defs/PayrollPrior"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "month_gross": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "calc_amount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "month": {
          "anyOf": [
            {
              "$ref": "#/$defs/PayrollMonth"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "garnishments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/GarnishmentLine"
          },
          "x-serde-default": true,
          "default": [],
          "x-omitted-when": "Vec::is_empty"
        }
      },
      "required": [
        "line_no",
        "employee_id",
        "kind",
        "cost_account",
        "person",
        "inputs",
        "base_gross",
        "additions",
        "reimb_taxable",
        "gross",
        "base",
        "pio",
        "health",
        "unemployment",
        "injury",
        "contributions",
        "exemption",
        "tax_base",
        "pit",
        "net",
        "reimb",
        "deductions",
        "payout"
      ]
    },
    "PayrollKind": {
      "type": "string",
      "enum": [
        "employment",
        "service",
        "author"
      ]
    },
    "PayrollPerson": {
      "type": "object",
      "properties": {
        "embg": {
          "type": "string"
        },
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "address": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "bank_account": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "embg",
        "first_name",
        "last_name"
      ]
    },
    "SickPart": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/AbsenceKind"
        },
        "case_from": {
          "type": "string",
          "format": "date"
        },
        "days": {
          "type": "integer",
          "format": "i32"
        },
        "base": {
          "$ref": "#/$defs/Money"
        },
        "base_months": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": true,
          "default": 0
        },
        "base_rule": {
          "anyOf": [
            {
              "$ref": "#/$defs/SickBaseRule"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "base_worked_days": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": true,
          "default": 0
        },
        "pct": {
          "type": "string"
        },
        "capped": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "comp": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "kind",
        "case_from",
        "days",
        "base",
        "pct",
        "comp"
      ]
    },
    "SickBaseRule": {
      "type": "string",
      "enum": [
        "months",
        "worked_days",
        "contract"
      ]
    },
    "SickFundPart": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/AbsenceKind"
        },
        "days": {
          "type": "integer",
          "format": "i32"
        },
        "employed_from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "approval": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "kind",
        "days"
      ]
    },
    "PayrollPrior": {
      "type": "object",
      "properties": {
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "base": {
          "$ref": "#/$defs/Money"
        },
        "contributions": {
          "$ref": "#/$defs/Money"
        },
        "exemption": {
          "$ref": "#/$defs/Money"
        },
        "tax_base": {
          "$ref": "#/$defs/Money"
        },
        "pit": {
          "$ref": "#/$defs/Money"
        },
        "net": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "gross",
        "base",
        "contributions",
        "exemption",
        "tax_base",
        "pit",
        "net"
      ]
    },
    "PayrollMonth": {
      "type": "object",
      "properties": {
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "base": {
          "$ref": "#/$defs/Money"
        },
        "pio": {
          "$ref": "#/$defs/Money"
        },
        "health": {
          "$ref": "#/$defs/Money"
        },
        "unemployment": {
          "$ref": "#/$defs/Money"
        },
        "injury": {
          "$ref": "#/$defs/Money"
        },
        "contributions": {
          "$ref": "#/$defs/Money"
        },
        "exemption": {
          "$ref": "#/$defs/Money"
        },
        "tax_base": {
          "$ref": "#/$defs/Money"
        },
        "pit": {
          "$ref": "#/$defs/Money"
        },
        "net": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "gross",
        "base",
        "pio",
        "health",
        "unemployment",
        "injury",
        "contributions",
        "exemption",
        "tax_base",
        "pit",
        "net"
      ]
    },
    "LockPayroll": {
      "type": "object",
      "properties": {
        "period": {
          "type": "string",
          "format": "date"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "kind": {
          "$ref": "#/$defs/PayrollCalcKind",
          "x-serde-default": true,
          "x-omitted-when": "PayrollCalcKind::is_regular"
        },
        "seq": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "share_pct": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "amounts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PayrollCalcAmount"
          },
          "x-serde-default": true,
          "default": [],
          "x-omitted-when": "Vec::is_empty"
        },
        "employees": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EmployeeId"
          },
          "x-serde-default": true,
          "default": [],
          "x-omitted-when": "Vec::is_empty"
        }
      },
      "required": [
        "period"
      ]
    },
    "PayrollCalcAmount": {
      "type": "object",
      "properties": {
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "employee_id",
        "amount"
      ]
    },
    "PayrollRunSummary": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/PayrollRunId"
        },
        "period": {
          "type": "string",
          "format": "date"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "calc_kind": {
          "$ref": "#/$defs/PayrollCalcKind",
          "x-serde-default": true
        },
        "seq": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": "one",
          "default": 1,
          "x-omitted-when": "is_one"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "unverified": {
          "type": "boolean"
        },
        "lines": {
          "type": "integer",
          "format": "i64"
        },
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "contributions": {
          "$ref": "#/$defs/Money"
        },
        "pit": {
          "$ref": "#/$defs/Money"
        },
        "net": {
          "$ref": "#/$defs/Money"
        },
        "advances": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true
        },
        "payout": {
          "$ref": "#/$defs/Money"
        },
        "entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "draft_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/DraftId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "mpin_filed": {
          "type": "boolean"
        },
        "latest": {
          "type": "boolean"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "period",
        "version",
        "unverified",
        "lines",
        "gross",
        "contributions",
        "pit",
        "net",
        "payout",
        "mpin_filed",
        "latest",
        "created_at",
        "created_by"
      ]
    },
    "api::payroll::SlipQuery": {
      "type": "object",
      "properties": {
        "line": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "MpinExport": {
      "type": "object",
      "properties": {
        "note": {
          "type": "string"
        },
        "tenant_name": {
          "type": "string"
        },
        "tenant_edb": {
          "type": "string"
        },
        "period": {
          "type": "string",
          "format": "date"
        },
        "run_id": {
          "$ref": "#/$defs/PayrollRunId"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "calc_kind": {
          "$ref": "#/$defs/PayrollCalcKind",
          "x-serde-default": true
        },
        "unverified": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "rows": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MpinRow"
          }
        },
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "contributions": {
          "$ref": "#/$defs/Money"
        },
        "pit": {
          "$ref": "#/$defs/Money"
        },
        "net": {
          "$ref": "#/$defs/Money"
        },
        "submissions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MpinSubmission"
          },
          "x-serde-default": true,
          "default": [],
          "x-omitted-when": "Vec::is_empty"
        }
      },
      "required": [
        "note",
        "tenant_name",
        "tenant_edb",
        "period",
        "run_id",
        "version",
        "unverified",
        "rows",
        "gross",
        "contributions",
        "pit",
        "net"
      ]
    },
    "MpinRow": {
      "type": "object",
      "properties": {
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "embg": {
          "type": "string"
        },
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/PayrollKind"
        },
        "hours_per_week": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "base": {
          "$ref": "#/$defs/Money"
        },
        "pio": {
          "$ref": "#/$defs/Money"
        },
        "health": {
          "$ref": "#/$defs/Money"
        },
        "unemployment": {
          "$ref": "#/$defs/Money"
        },
        "injury": {
          "$ref": "#/$defs/Money"
        },
        "contributions": {
          "$ref": "#/$defs/Money"
        },
        "exemption": {
          "$ref": "#/$defs/Money"
        },
        "tax_base": {
          "$ref": "#/$defs/Money"
        },
        "pit": {
          "$ref": "#/$defs/Money"
        },
        "net": {
          "$ref": "#/$defs/Money"
        },
        "leave_days": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": true,
          "default": 0,
          "x-omitted-when": "is_zero_i32"
        },
        "leave_comp": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true,
          "x-omitted-when": "is_zero_money"
        },
        "sick_days": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": true,
          "default": 0,
          "x-omitted-when": "is_zero_i32"
        },
        "sick_fund_days": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": true,
          "default": 0,
          "x-omitted-when": "is_zero_i32"
        },
        "sick_comp": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true,
          "x-omitted-when": "is_zero_money"
        }
      },
      "required": [
        "line_no",
        "embg",
        "first_name",
        "last_name",
        "kind",
        "gross",
        "base",
        "pio",
        "health",
        "unemployment",
        "injury",
        "contributions",
        "exemption",
        "tax_base",
        "pit",
        "net"
      ]
    },
    "MpinSubmission": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "run_id": {
          "$ref": "#/$defs/PayrollRunId"
        },
        "period": {
          "type": "string",
          "format": "date"
        },
        "reference": {
          "type": "string"
        },
        "note": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "run_id",
        "period",
        "reference",
        "note",
        "created_at",
        "created_by"
      ]
    },
    "MpinFiled": {
      "type": "object",
      "properties": {
        "reference": {
          "type": "string"
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "reference"
      ]
    },
    "MpinEpddPreview": {
      "type": "object",
      "properties": {
        "run_id": {
          "$ref": "#/$defs/PayrollRunId"
        },
        "period": {
          "type": "string",
          "format": "date"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "latest": {
          "type": "boolean"
        },
        "settings": {
          "$ref": "#/$defs/MpinSettings"
        },
        "employees": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MpinEpddEmployee"
          }
        },
        "skipped": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "x-serde-default": true,
          "default": []
        },
        "issues": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MpinEpddIssue"
          },
          "x-serde-default": true,
          "default": []
        },
        "xml": {
          "type": "string"
        },
        "submissions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MpinEpddSubmission"
          },
          "x-serde-default": true,
          "default": []
        },
        "municipalities": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MpinCode"
          },
          "x-serde-default": true,
          "default": []
        }
      },
      "required": [
        "run_id",
        "period",
        "version",
        "latest",
        "settings",
        "employees",
        "xml"
      ]
    },
    "MpinEpddEmployee": {
      "type": "object",
      "properties": {
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "embg": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "municipality": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "bank_account": {
          "type": "string"
        },
        "relation": {
          "type": "string"
        },
        "movement": {
          "type": "string"
        },
        "days": {
          "type": "integer",
          "format": "i32"
        },
        "hours": {
          "type": "integer",
          "format": "i32"
        },
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "leave_hours": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": true,
          "default": 0,
          "x-omitted-when": "is_zero_i32"
        },
        "leave_gross": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true,
          "x-omitted-when": "is_zero_money"
        },
        "sick_hours": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": true,
          "default": 0,
          "x-omitted-when": "is_zero_i32"
        },
        "sick_gross": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true,
          "x-omitted-when": "is_zero_money"
        }
      },
      "required": [
        "line_no",
        "employee_id",
        "embg",
        "name",
        "bank_account",
        "relation",
        "movement",
        "days",
        "hours",
        "gross"
      ]
    },
    "MpinEpddIssue": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "path",
        "message"
      ]
    },
    "MpinSignedXml": {
      "type": "object",
      "properties": {
        "file_name": {
          "type": "string"
        },
        "xml": {
          "type": "string"
        },
        "sha256": {
          "type": "string"
        }
      },
      "required": [
        "file_name",
        "xml",
        "sha256"
      ]
    },
    "PostPayroll": {
      "type": "object",
      "properties": {
        "posting_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": []
    },
    "PayrollPostResult": {
      "type": "object",
      "properties": {
        "entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "draft_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/DraftId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": []
    },
    "Performance": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string",
          "format": "date"
        },
        "to": {
          "type": "string",
          "format": "date"
        },
        "months": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PerformanceMonth"
          }
        },
        "total": {
          "$ref": "#/$defs/PerformanceAmounts"
        },
        "previous": {
          "$ref": "#/$defs/PerformanceAmounts"
        }
      },
      "required": [
        "from",
        "to",
        "months",
        "total",
        "previous"
      ]
    },
    "PerformanceMonth": {
      "type": "object",
      "properties": {
        "month": {
          "type": "string",
          "format": "date"
        },
        "current": {
          "$ref": "#/$defs/PerformanceAmounts"
        },
        "previous": {
          "$ref": "#/$defs/PerformanceAmounts"
        }
      },
      "required": [
        "month",
        "current",
        "previous"
      ]
    },
    "PerformanceAmounts": {
      "type": "object",
      "properties": {
        "revenue": {
          "$ref": "#/$defs/Money"
        },
        "sales": {
          "$ref": "#/$defs/Money"
        },
        "expenses": {
          "$ref": "#/$defs/Money"
        },
        "profit": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "revenue",
        "sales",
        "expenses",
        "profit"
      ]
    },
    "PeriodLock": {
      "type": "object",
      "properties": {
        "locked_until": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "changed_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "changed_by": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "api::LockConfirmation": {
      "type": "object",
      "properties": {
        "confirmed_pending_sales": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "SetPeriodLock": {
      "type": "object",
      "properties": {
        "locked_until": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "reason"
      ]
    },
    "MemberPermissions": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "role": {
          "$ref": "#/$defs/Role"
        },
        "modules": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/AccessLevel"
          }
        },
        "warehouse_ids": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "$ref": "#/$defs/WarehouseId"
              }
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "email",
        "role",
        "modules"
      ]
    },
    "AccessLevel": {
      "type": "string",
      "enum": [
        "none",
        "read",
        "write"
      ]
    },
    "SetMemberPermissions": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "modules": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/AccessLevel"
          },
          "x-serde-default": true,
          "default": {}
        },
        "warehouses": {
          "anyOf": [
            {
              "$ref": "#/$defs/WarehouseAccess"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "email"
      ]
    },
    "WarehouseAccess": {
      "type": "object",
      "properties": {
        "warehouse_ids": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "$ref": "#/$defs/WarehouseId"
              }
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "api::pit_annual::YearQ": {
      "type": "object",
      "properties": {
        "year": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "PitAnnualReturn": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/PitAnnualReturnId"
        },
        "number": {
          "type": "string"
        },
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "person": {
          "$ref": "#/$defs/OtherIncomePerson"
        },
        "calc": {
          "$ref": "#/$defs/PitAnnualCalc"
        },
        "note": {
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/PitAnnualStatus"
        },
        "stale": {
          "type": "boolean"
        },
        "filing_reference": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "filed_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "cancelled_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "number",
        "employee_id",
        "person",
        "calc",
        "note",
        "status",
        "stale",
        "created_at",
        "created_by"
      ]
    },
    "PitAnnualReturnId": {
      "type": "integer",
      "format": "i64"
    },
    "PitAnnualCalc": {
      "type": "object",
      "properties": {
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "rate": {
          "$ref": "#/$defs/RateE4"
        },
        "unverified": {
          "type": "boolean"
        },
        "months": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PitAnnualMonth"
          }
        },
        "kinds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PitAnnualKind"
          }
        },
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "norm_cost": {
          "$ref": "#/$defs/Money"
        },
        "contributions": {
          "$ref": "#/$defs/Money"
        },
        "exemption": {
          "$ref": "#/$defs/Money"
        },
        "tax_base": {
          "$ref": "#/$defs/Money"
        },
        "withheld": {
          "$ref": "#/$defs/Money"
        },
        "calculated": {
          "$ref": "#/$defs/Money"
        },
        "difference": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "year",
        "rate",
        "unverified",
        "months",
        "kinds",
        "gross",
        "norm_cost",
        "contributions",
        "exemption",
        "tax_base",
        "withheld",
        "calculated",
        "difference"
      ]
    },
    "PitAnnualMonth": {
      "type": "object",
      "properties": {
        "month": {
          "type": "integer",
          "format": "u32",
          "minimum": 0
        },
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "contributions": {
          "$ref": "#/$defs/Money"
        },
        "tax_base": {
          "$ref": "#/$defs/Money"
        },
        "pit": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "month",
        "gross",
        "contributions",
        "tax_base",
        "pit"
      ]
    },
    "PitAnnualKind": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/PitIncomeKind"
        },
        "count": {
          "type": "integer",
          "format": "i32"
        },
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "norm_cost": {
          "$ref": "#/$defs/Money"
        },
        "contributions": {
          "$ref": "#/$defs/Money"
        },
        "exemption": {
          "$ref": "#/$defs/Money"
        },
        "tax_base": {
          "$ref": "#/$defs/Money"
        },
        "pit": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "kind",
        "count",
        "gross",
        "norm_cost",
        "contributions",
        "exemption",
        "tax_base",
        "pit"
      ]
    },
    "PitIncomeKind": {
      "type": "string",
      "enum": [
        "employment",
        "service",
        "author",
        "rent",
        "other",
        "agricultural"
      ]
    },
    "PitAnnualStatus": {
      "type": "string",
      "enum": [
        "prepared",
        "filed",
        "cancelled"
      ]
    },
    "NewPitAnnualReturn": {
      "type": "object",
      "properties": {
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "year",
        "employee_id"
      ]
    },
    "PitAnnualPerson": {
      "type": "object",
      "properties": {
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "person": {
          "$ref": "#/$defs/OtherIncomePerson"
        },
        "lines": {
          "type": "integer",
          "format": "i32"
        },
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "tax_base": {
          "$ref": "#/$defs/Money"
        },
        "withheld": {
          "$ref": "#/$defs/Money"
        },
        "return_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/PitAnnualReturnId"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "employee_id",
        "person",
        "lines",
        "gross",
        "tax_base",
        "withheld"
      ]
    },
    "api::pit_annual::PreviewQ": {
      "type": "object",
      "properties": {
        "year": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "employee_id": {
          "type": "string",
          "format": "uuid"
        }
      },
      "required": [
        "employee_id"
      ]
    },
    "PitAnnualPreview": {
      "type": "object",
      "properties": {
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "person": {
          "$ref": "#/$defs/OtherIncomePerson"
        },
        "calc": {
          "$ref": "#/$defs/PitAnnualCalc"
        },
        "existing": {
          "anyOf": [
            {
              "$ref": "#/$defs/PitAnnualReturnId"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "employee_id",
        "person",
        "calc"
      ]
    },
    "CancelPitAnnual": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "reason"
      ]
    },
    "PitAnnualFiled": {
      "type": "object",
      "properties": {
        "reference": {
          "type": "string"
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "reference"
      ]
    },
    "ProfitTaxReturn": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/ProfitTaxReturnId"
        },
        "number": {
          "type": "string"
        },
        "fy_start": {
          "type": "string",
          "format": "date"
        },
        "fy_end": {
          "type": "string",
          "format": "date"
        },
        "result": {
          "$ref": "#/$defs/Money"
        },
        "rate": {
          "$ref": "#/$defs/RateE4"
        },
        "advances": {
          "$ref": "#/$defs/Money"
        },
        "income_positions": {
          "anyOf": [
            {
              "$ref": "#/$defs/DbVpIncomePositions"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "adjustments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ProfitTaxAdjustment"
          }
        },
        "totals": {
          "$ref": "#/$defs/ProfitTaxTotals"
        },
        "advance": {
          "$ref": "#/$defs/ProfitTaxAdvance",
          "x-serde-default": true
        },
        "entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ]
        },
        "note": {
          "type": "string"
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "storno_entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "number",
        "fy_start",
        "fy_end",
        "result",
        "rate",
        "advances",
        "adjustments",
        "totals",
        "note",
        "created_at",
        "created_by"
      ]
    },
    "ProfitTaxReturnId": {
      "type": "integer",
      "format": "i64"
    },
    "DbVpIncomePositions": {
      "type": "object",
      "properties": {
        "operating": {
          "$ref": "#/$defs/Money"
        },
        "financial": {
          "$ref": "#/$defs/Money"
        },
        "associates": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "operating",
        "financial",
        "associates"
      ]
    },
    "ProfitTaxAdjustment": {
      "type": "object",
      "properties": {
        "aop": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i16"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "kind": {
          "$ref": "#/$defs/AdjustmentKind"
        },
        "description": {
          "type": "string"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "kind",
        "description",
        "amount"
      ]
    },
    "AdjustmentKind": {
      "type": "string",
      "enum": [
        "add",
        "deduct",
        "credit"
      ]
    },
    "ProfitTaxTotals": {
      "type": "object",
      "properties": {
        "add_total": {
          "$ref": "#/$defs/Money"
        },
        "deduct_total": {
          "$ref": "#/$defs/Money"
        },
        "credit_total": {
          "$ref": "#/$defs/Money"
        },
        "base": {
          "$ref": "#/$defs/Money"
        },
        "tax": {
          "$ref": "#/$defs/Money"
        },
        "tax_due": {
          "$ref": "#/$defs/Money"
        },
        "balance": {
          "$ref": "#/$defs/Money"
        },
        "monthly_advance": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "add_total",
        "deduct_total",
        "credit_total",
        "base",
        "tax",
        "tax_due",
        "balance",
        "monthly_advance"
      ]
    },
    "ProfitTaxAdvance": {
      "type": "object",
      "properties": {
        "base": {
          "$ref": "#/$defs/Money"
        },
        "growth": {
          "anyOf": [
            {
              "$ref": "#/$defs/RateE4"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "growth_from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "growth_source": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "growth_verified": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "monthly": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "base",
        "monthly"
      ]
    },
    "NewProfitTaxReturn": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "format": "date"
        },
        "advances": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true
        },
        "adjustments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ProfitTaxAdjustment"
          },
          "x-serde-default": true,
          "default": []
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "date"
      ]
    },
    "ProfitTaxAccountMap": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "account_prefix": {
          "type": "string"
        },
        "limit_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "note": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "account_prefix",
        "note",
        "created_at",
        "created_by"
      ]
    },
    "NewProfitTaxAccountMap": {
      "type": "object",
      "properties": {
        "account_prefix": {
          "type": "string"
        },
        "limit_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "account_prefix"
      ]
    },
    "api::profit_tax::PreviewQ": {
      "type": "object",
      "properties": {
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "ProfitTaxPreview": {
      "type": "object",
      "properties": {
        "fy_start": {
          "type": "string",
          "format": "date"
        },
        "fy_end": {
          "type": "string",
          "format": "date"
        },
        "result": {
          "$ref": "#/$defs/Money"
        },
        "rate": {
          "anyOf": [
            {
              "$ref": "#/$defs/RateE4"
            },
            {
              "type": "null"
            }
          ]
        },
        "existing": {
          "anyOf": [
            {
              "$ref": "#/$defs/ProfitTaxReturnId"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "fy_start",
        "fy_end",
        "result"
      ]
    },
    "ProfitTaxProposal": {
      "type": "object",
      "properties": {
        "fy_start": {
          "type": "string",
          "format": "date"
        },
        "fy_end": {
          "type": "string",
          "format": "date"
        },
        "avg_salary": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        },
        "total_income": {
          "$ref": "#/$defs/Money"
        },
        "aops": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ProfitTaxAopLine"
          }
        },
        "limits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ProfitTaxLimitLine"
          }
        },
        "corrections": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ProfitTaxAopCorrection"
          }
        }
      },
      "required": [
        "fy_start",
        "fy_end",
        "total_income",
        "aops",
        "limits",
        "corrections"
      ]
    },
    "ProfitTaxAopLine": {
      "type": "object",
      "properties": {
        "aop": {
          "type": "integer",
          "format": "i16"
        },
        "proposal": {
          "$ref": "#/$defs/Money"
        },
        "correction": {
          "$ref": "#/$defs/Money"
        },
        "final_amount": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "aop",
        "proposal",
        "correction",
        "final_amount"
      ]
    },
    "ProfitTaxLimitLine": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "aop": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i16"
            },
            {
              "type": "null"
            }
          ]
        },
        "name": {
          "type": "string"
        },
        "method": {
          "$ref": "#/$defs/ProfitTaxLimitMethod"
        },
        "bp": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "limit_amount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        },
        "unit": {
          "anyOf": [
            {
              "$ref": "#/$defs/ProfitTaxLimitUnit"
            },
            {
              "type": "null"
            }
          ]
        },
        "units": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "booked": {
          "$ref": "#/$defs/Money"
        },
        "allowed": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        },
        "proposal": {
          "$ref": "#/$defs/Money"
        },
        "source": {
          "type": "string"
        },
        "accounts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ProfitTaxProposalAccount"
          }
        }
      },
      "required": [
        "code",
        "name",
        "method",
        "booked",
        "proposal",
        "source",
        "accounts"
      ]
    },
    "ProfitTaxLimitMethod": {
      "type": "string",
      "enum": [
        "full",
        "share",
        "income_share",
        "avg_salary",
        "amount",
        "share_capped",
        "fixed_assets"
      ]
    },
    "ProfitTaxLimitUnit": {
      "type": "string",
      "enum": [
        "employee",
        "member_month",
        "student_month"
      ]
    },
    "ProfitTaxProposalAccount": {
      "type": "object",
      "properties": {
        "account_code": {
          "type": "string"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "account_code",
        "amount"
      ]
    },
    "ProfitTaxAopCorrection": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "fy_end": {
          "type": "string",
          "format": "date"
        },
        "aop": {
          "type": "integer",
          "format": "i16"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "reason": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "fy_end",
        "aop",
        "amount",
        "reason",
        "created_at",
        "created_by"
      ]
    },
    "NewProfitTaxAopCorrection": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "format": "date"
        },
        "aop": {
          "type": "integer",
          "format": "i16"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "date",
        "aop",
        "amount",
        "reason"
      ]
    },
    "NewProfitTaxLimitUnits": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "format": "date"
        },
        "limit_code": {
          "type": "string"
        },
        "units": {
          "type": "integer",
          "format": "i32"
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "date",
        "limit_code",
        "units"
      ]
    },
    "ProfitTaxRate": {
      "$ref": "#/$defs/InterestRate"
    },
    "NewProfitTaxRate": {
      "$ref": "#/$defs/NewInterestRate"
    },
    "CancelProfitTax": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        },
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "reason"
      ]
    },
    "api::tax_pdf::Options": {
      "type": "object",
      "properties": {
        "format": {
          "$ref": "#/$defs/api::tax_pdf::Format",
          "x-serde-default": true
        }
      },
      "required": []
    },
    "api::tax_pdf::Format": {
      "type": "string",
      "enum": [
        "html",
        "pdf"
      ]
    },
    "ProfitTaxSettlement": {
      "type": "object",
      "properties": {
        "carried_credit": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "request_refund": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "positions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ProfitTaxFormPosition"
          },
          "x-serde-default": true,
          "default": [],
          "x-omitted-when": "Vec::is_empty"
        }
      },
      "required": []
    },
    "ProfitTaxFormPosition": {
      "type": "object",
      "properties": {
        "aop": {
          "type": "integer",
          "format": "i16"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "aop",
        "amount"
      ]
    },
    "ReconciliationRow": {
      "type": "object",
      "properties": {
        "account": {
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/AccountKind"
        },
        "ledger": {
          "$ref": "#/$defs/Money"
        },
        "analytics": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "account",
        "kind",
        "ledger",
        "analytics"
      ]
    },
    "api::registry::ListQ": {
      "type": "object",
      "properties": {
        "year": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "RegistryEntry": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/RegistryEntryId"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "number": {
          "type": "integer",
          "format": "i32"
        },
        "sub_number": {
          "type": "integer",
          "format": "i32"
        },
        "reg_date": {
          "type": "string",
          "format": "date"
        },
        "parent": {
          "anyOf": [
            {
              "$ref": "#/$defs/RegistryEntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "direction": {
          "$ref": "#/$defs/RegistryDirection"
        },
        "correspondent": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "subject": {
          "type": "string"
        },
        "org_unit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "journal_entry": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "attachment": {
          "anyOf": [
            {
              "$ref": "#/$defs/AttachmentId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "invoice": {
          "anyOf": [
            {
              "$ref": "#/$defs/InvoiceId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "agreement": {
          "anyOf": [
            {
              "$ref": "#/$defs/AgreementId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "journal_label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "attachment_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "invoice_label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "agreement_label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "cancelled_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "changed_at": {
          "type": "string",
          "format": "date-time"
        },
        "changed_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "year",
        "number",
        "sub_number",
        "reg_date",
        "version",
        "direction",
        "subject",
        "created_at",
        "created_by",
        "changed_at",
        "changed_by"
      ]
    },
    "RegistryEntryId": {
      "type": "integer",
      "format": "i64"
    },
    "RegistryData": {
      "type": "object",
      "properties": {
        "direction": {
          "$ref": "#/$defs/RegistryDirection"
        },
        "correspondent": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "subject": {
          "type": "string"
        },
        "org_unit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "journal_entry": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "attachment": {
          "anyOf": [
            {
              "$ref": "#/$defs/AttachmentId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "invoice": {
          "anyOf": [
            {
              "$ref": "#/$defs/InvoiceId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "agreement": {
          "anyOf": [
            {
              "$ref": "#/$defs/AgreementId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "direction",
        "subject"
      ]
    },
    "RegistryDirection": {
      "type": "string",
      "enum": [
        "in",
        "out",
        "internal"
      ]
    },
    "NewRegistryEntry": {
      "type": "object",
      "properties": {
        "reg_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "parent": {
          "anyOf": [
            {
              "$ref": "#/$defs/RegistryEntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "direction": {
          "$ref": "#/$defs/RegistryDirection"
        },
        "correspondent": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "subject": {
          "type": "string"
        },
        "org_unit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "journal_entry": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "attachment": {
          "anyOf": [
            {
              "$ref": "#/$defs/AttachmentId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "invoice": {
          "anyOf": [
            {
              "$ref": "#/$defs/InvoiceId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "agreement": {
          "anyOf": [
            {
              "$ref": "#/$defs/AgreementId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "direction",
        "subject"
      ]
    },
    "RegistryCorrection": {
      "type": "object",
      "properties": {
        "direction": {
          "$ref": "#/$defs/RegistryDirection"
        },
        "correspondent": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "subject": {
          "type": "string"
        },
        "org_unit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "journal_entry": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "attachment": {
          "anyOf": [
            {
              "$ref": "#/$defs/AttachmentId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "invoice": {
          "anyOf": [
            {
              "$ref": "#/$defs/InvoiceId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "agreement": {
          "anyOf": [
            {
              "$ref": "#/$defs/AgreementId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "direction",
        "subject",
        "reason"
      ]
    },
    "RegistryCancel": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "reason"
      ]
    },
    "RegistryVersion": {
      "type": "object",
      "properties": {
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "direction": {
          "$ref": "#/$defs/RegistryDirection"
        },
        "correspondent": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "subject": {
          "type": "string"
        },
        "org_unit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "journal_entry": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "attachment": {
          "anyOf": [
            {
              "$ref": "#/$defs/AttachmentId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "invoice": {
          "anyOf": [
            {
              "$ref": "#/$defs/InvoiceId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "agreement": {
          "anyOf": [
            {
              "$ref": "#/$defs/AgreementId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "version",
        "direction",
        "subject",
        "created_at",
        "created_by"
      ]
    },
    "ReportCheckRule": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/ReportCheckRuleId"
        },
        "code": {
          "type": "string"
        },
        "valid_from": {
          "type": "integer",
          "format": "i32"
        },
        "active": {
          "type": "boolean"
        },
        "chart_plan": {
          "type": "string"
        },
        "scope": {
          "$ref": "#/$defs/CheckScope"
        },
        "title": {
          "type": "string"
        },
        "severity": {
          "$ref": "#/$defs/CheckSeverity"
        },
        "lhs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CheckTerm"
          }
        },
        "op": {
          "$ref": "#/$defs/CheckOperator"
        },
        "rhs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CheckTerm"
          }
        },
        "sizes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EntitySize"
          }
        },
        "standards": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReportingStandard"
          }
        },
        "source": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "code",
        "valid_from",
        "active",
        "chart_plan",
        "scope",
        "title",
        "severity",
        "lhs",
        "op",
        "rhs",
        "sizes",
        "standards",
        "source",
        "reason",
        "created_at"
      ]
    },
    "ReportCheckRuleId": {
      "type": "integer",
      "format": "i64"
    },
    "CheckScope": {
      "type": "string",
      "enum": [
        "balance_sheet",
        "income_statement",
        "cross"
      ]
    },
    "CheckSeverity": {
      "type": "string",
      "enum": [
        "error",
        "warning"
      ]
    },
    "CheckTerm": {
      "type": "object",
      "properties": {
        "form_id": {
          "type": "string"
        },
        "statement": {
          "$ref": "#/$defs/Statement"
        },
        "aop": {
          "type": "string"
        },
        "sign": {
          "type": "integer",
          "format": "i8"
        }
      },
      "required": [
        "form_id",
        "statement",
        "aop",
        "sign"
      ]
    },
    "Statement": {
      "type": "string",
      "enum": [
        "balance_sheet",
        "income_statement",
        "equity_changes",
        "cash_flows",
        "notes"
      ]
    },
    "CheckOperator": {
      "type": "string",
      "enum": [
        "=",
        ">=",
        "<="
      ]
    },
    "EntitySize": {
      "type": "string",
      "enum": [
        "micro",
        "small",
        "medium",
        "large"
      ]
    },
    "ReportingStandard": {
      "type": "string",
      "enum": [
        "ifrs",
        "ifrs_sme"
      ]
    },
    "AnnualReportSummary": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "size": {
          "$ref": "#/$defs/EntitySize"
        },
        "standard": {
          "$ref": "#/$defs/ReportingStandard"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "year",
        "version",
        "size",
        "standard",
        "created_at",
        "created_by"
      ]
    },
    "ReportAllocation": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "account": {
          "type": "string"
        },
        "form_id": {
          "type": "string"
        },
        "aop": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "account",
        "form_id",
        "aop",
        "created_at",
        "created_by"
      ]
    },
    "NewReportAllocation": {
      "type": "object",
      "properties": {
        "account": {
          "type": "string"
        },
        "form_id": {
          "type": "string"
        },
        "aop": {
          "type": "string"
        }
      },
      "required": [
        "account",
        "form_id",
        "aop"
      ]
    },
    "AnnualReport": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "size": {
          "$ref": "#/$defs/EntitySize"
        },
        "standard": {
          "$ref": "#/$defs/ReportingStandard"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "inputs": {
          "$ref": "#/$defs/ReportInputs"
        },
        "required": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Statement"
          }
        },
        "forms": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReportFormValues"
          }
        },
        "documents": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReportDocument"
          }
        }
      },
      "required": [
        "id",
        "year",
        "version",
        "size",
        "standard",
        "created_at",
        "created_by",
        "inputs",
        "required",
        "forms",
        "documents"
      ]
    },
    "ReportInputs": {
      "type": "object",
      "additionalProperties": {
        "type": "integer",
        "format": "i64"
      }
    },
    "ReportFormValues": {
      "type": "object",
      "properties": {
        "form_id": {
          "type": "string"
        },
        "statement": {
          "$ref": "#/$defs/Statement"
        },
        "title": {
          "type": "string"
        },
        "legal_basis": {
          "type": "string"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReportLine"
          }
        }
      },
      "required": [
        "form_id",
        "statement",
        "title",
        "legal_basis",
        "lines"
      ]
    },
    "ReportLine": {
      "type": "object",
      "properties": {
        "aop": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/LineKind"
        },
        "unit": {
          "type": "string"
        },
        "current": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ]
        },
        "previous": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "aop",
        "label",
        "kind",
        "unit"
      ]
    },
    "LineKind": {
      "type": "string",
      "enum": [
        "header",
        "accounts",
        "sum",
        "input"
      ]
    },
    "ReportDocument": {
      "type": "object",
      "properties": {
        "statement": {
          "$ref": "#/$defs/Statement"
        },
        "form_id": {
          "type": "string"
        },
        "attachment_id": {
          "$ref": "#/$defs/AttachmentId"
        }
      },
      "required": [
        "statement",
        "form_id",
        "attachment_id"
      ]
    },
    "SizeYear": {
      "type": "object",
      "properties": {
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "size": {
          "$ref": "#/$defs/EntitySize"
        },
        "standard": {
          "$ref": "#/$defs/ReportingStandard"
        },
        "set_at": {
          "type": "string",
          "format": "date-time"
        },
        "set_by": {
          "type": "string"
        }
      },
      "required": [
        "year",
        "size",
        "standard",
        "set_at",
        "set_by"
      ]
    },
    "SetSizeYear": {
      "type": "object",
      "properties": {
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "size": {
          "$ref": "#/$defs/EntitySize"
        },
        "standard": {
          "$ref": "#/$defs/ReportingStandard"
        }
      },
      "required": [
        "year",
        "size",
        "standard"
      ]
    },
    "GenerateAnnualReport": {
      "type": "object",
      "properties": {
        "inputs": {
          "$ref": "#/$defs/ReportInputs",
          "x-serde-default": true
        },
        "documents": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/AttachmentId"
          },
          "x-serde-default": true,
          "default": {}
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": []
    },
    "AnnualReportCheck": {
      "type": "object",
      "properties": {
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "report_id": {
          "type": "integer",
          "format": "i64"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "results": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReportCheckResult"
          }
        },
        "errors": {
          "type": "integer",
          "format": "usize",
          "minimum": 0
        },
        "warnings": {
          "type": "integer",
          "format": "usize",
          "minimum": 0
        },
        "unconfirmed_warnings": {
          "type": "integer",
          "format": "usize",
          "minimum": 0
        }
      },
      "required": [
        "year",
        "report_id",
        "version",
        "results",
        "errors",
        "warnings",
        "unconfirmed_warnings"
      ]
    },
    "ReportCheckResult": {
      "type": "object",
      "properties": {
        "rule_id": {
          "$ref": "#/$defs/ReportCheckRuleId"
        },
        "code": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "scope": {
          "$ref": "#/$defs/CheckScope"
        },
        "severity": {
          "$ref": "#/$defs/CheckSeverity"
        },
        "op": {
          "$ref": "#/$defs/CheckOperator"
        },
        "source": {
          "type": "string"
        },
        "lhs_terms": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CheckTerm"
          }
        },
        "rhs_terms": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CheckTerm"
          }
        },
        "column": {
          "$ref": "#/$defs/CheckColumn"
        },
        "lhs": {
          "$ref": "#/$defs/Money"
        },
        "rhs": {
          "$ref": "#/$defs/Money"
        },
        "diff": {
          "$ref": "#/$defs/Money"
        },
        "ok": {
          "type": "boolean"
        },
        "confirmation": {
          "anyOf": [
            {
              "$ref": "#/$defs/CheckConfirmation"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "rule_id",
        "code",
        "title",
        "scope",
        "severity",
        "op",
        "source",
        "lhs_terms",
        "rhs_terms",
        "column",
        "lhs",
        "rhs",
        "diff",
        "ok"
      ]
    },
    "CheckColumn": {
      "type": "string",
      "enum": [
        "current",
        "previous"
      ]
    },
    "CheckConfirmation": {
      "type": "object",
      "properties": {
        "at": {
          "type": "string",
          "format": "date-time"
        },
        "by": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "at",
        "by",
        "note"
      ]
    },
    "ConfirmReportWarnings": {
      "type": "object",
      "properties": {
        "note": {
          "type": "string"
        }
      },
      "required": [
        "note"
      ]
    },
    "ReportPreviewRequest": {
      "type": "object",
      "properties": {
        "inputs": {
          "$ref": "#/$defs/ReportInputs",
          "x-serde-default": true
        }
      },
      "required": []
    },
    "AnnualReportPreview": {
      "type": "object",
      "properties": {
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "size": {
          "$ref": "#/$defs/EntitySize"
        },
        "standard": {
          "$ref": "#/$defs/ReportingStandard"
        },
        "required": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Statement"
          }
        },
        "forms": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReportFormValues"
          }
        }
      },
      "required": [
        "year",
        "size",
        "standard",
        "required",
        "forms"
      ]
    },
    "ResponsiblePerson": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "role": {
          "$ref": "#/$defs/ResponsibleRole"
        },
        "full_name": {
          "type": "string"
        },
        "license_no": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "valid_to": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "supersedes_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "superseded_by": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "reason": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "role",
        "full_name",
        "valid_from",
        "reason",
        "created_at",
        "created_by"
      ]
    },
    "ResponsibleRole": {
      "type": "string",
      "enum": [
        "manager",
        "accountant",
        "fs_responsible"
      ]
    },
    "NewResponsiblePerson": {
      "type": "object",
      "properties": {
        "role": {
          "$ref": "#/$defs/ResponsibleRole"
        },
        "full_name": {
          "type": "string"
        },
        "license_no": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "valid_to": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "supersedes_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "reason": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "role",
        "full_name",
        "valid_from"
      ]
    },
    "ReceiptSheets": {
      "type": "object",
      "properties": {
        "head": {
          "$ref": "#/$defs/RetailBookHead"
        },
        "sheets": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReceiptSheet"
          }
        }
      },
      "required": [
        "head",
        "sheets"
      ]
    },
    "ReceiptSheet": {
      "type": "object",
      "properties": {
        "doc_id": {
          "$ref": "#/$defs/StockDocId"
        },
        "doc_label": {
          "type": "string"
        },
        "doc_name": {
          "type": "string"
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "book_date": {
          "type": "string",
          "format": "date"
        },
        "supplier": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "supplier_address": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReceiptSheetLine"
          }
        }
      },
      "required": [
        "doc_id",
        "doc_label",
        "doc_name",
        "doc_date",
        "book_date",
        "lines"
      ]
    },
    "ReceiptSheetLine": {
      "type": "object",
      "properties": {
        "no": {
          "type": "integer",
          "format": "i32"
        },
        "item_code": {
          "type": "string"
        },
        "item_name": {
          "type": "string"
        },
        "unit": {
          "type": "string"
        },
        "quantity": {
          "$ref": "#/$defs/Qty"
        },
        "purchase_price": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "purchase_value": {
          "$ref": "#/$defs/Money"
        },
        "input_vat_unit": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "input_vat": {
          "$ref": "#/$defs/Money"
        },
        "vat_rate": {
          "type": "string"
        },
        "sale_price": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "sale_value": {
          "$ref": "#/$defs/Money"
        },
        "vat_unit": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "vat_value": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "no",
        "item_code",
        "item_name",
        "unit",
        "quantity",
        "purchase_value",
        "input_vat",
        "vat_rate",
        "sale_value",
        "vat_value"
      ]
    },
    "RetailRecord": {
      "type": "object",
      "properties": {
        "head": {
          "$ref": "#/$defs/RetailBookHead"
        },
        "opening": {
          "$ref": "#/$defs/Money"
        },
        "rows": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RetailRecordRow"
          }
        },
        "total_purchase": {
          "$ref": "#/$defs/Money"
        },
        "total_sale": {
          "$ref": "#/$defs/Money"
        },
        "closing": {
          "$ref": "#/$defs/Money"
        },
        "stock_sale_value": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "head",
        "opening",
        "rows",
        "total_purchase",
        "total_sale",
        "closing",
        "stock_sale_value"
      ]
    },
    "RetailRecordRow": {
      "type": "object",
      "properties": {
        "no": {
          "type": "integer",
          "format": "i32"
        },
        "book_date": {
          "type": "string",
          "format": "date"
        },
        "doc_id": {
          "$ref": "#/$defs/StockDocId"
        },
        "doc_label": {
          "type": "string"
        },
        "doc_name": {
          "type": "string"
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "counterparty": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "purchase": {
          "$ref": "#/$defs/Money"
        },
        "sale": {
          "$ref": "#/$defs/Money"
        },
        "balance": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "no",
        "book_date",
        "doc_id",
        "doc_label",
        "doc_name",
        "doc_date",
        "purchase",
        "sale",
        "balance"
      ]
    },
    "Sale": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/InvoiceId"
        },
        "number": {
          "type": "string"
        },
        "customer": {
          "type": "string"
        },
        "issue_date": {
          "type": "string",
          "format": "date"
        },
        "due_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "total": {
          "$ref": "#/$defs/Money"
        },
        "settled": {
          "$ref": "#/$defs/Money"
        },
        "posted": {
          "type": "boolean"
        },
        "cancelled": {
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "number",
        "customer",
        "issue_date",
        "total",
        "settled",
        "posted",
        "cancelled"
      ]
    },
    "IssueSale": {
      "type": "object",
      "properties": {
        "recipient_edb": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "key": {
          "type": "string",
          "format": "uuid"
        },
        "invoice": {
          "$ref": "#/$defs/NewInvoice"
        }
      },
      "required": [
        "key",
        "invoice"
      ]
    },
    "api::sales_documents::ListQ": {
      "type": "object",
      "properties": {
        "kind": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "SalesDocument": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/SalesDocumentId"
        },
        "kind": {
          "$ref": "#/$defs/SalesDocKind"
        },
        "state": {
          "$ref": "#/$defs/SalesDocState"
        },
        "source_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/SalesDocumentId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "doc_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "series_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/SeriesId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "partner_id": {
          "$ref": "#/$defs/PartnerId"
        },
        "partner_name": {
          "type": "string"
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "valid_until": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "place": {
          "type": "string"
        },
        "note": {
          "type": "string"
        },
        "net": {
          "$ref": "#/$defs/Money"
        },
        "vat": {
          "$ref": "#/$defs/Money"
        },
        "total": {
          "$ref": "#/$defs/Money"
        },
        "paid_amount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "paid_on": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "invoice_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/InvoiceId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "order_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/SalesDocumentId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "events": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SalesDocumentEvent"
          },
          "x-serde-default": true,
          "default": []
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SalesDocumentLine"
          },
          "x-serde-default": true,
          "default": []
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "kind",
        "state",
        "version",
        "partner_id",
        "partner_name",
        "doc_date",
        "place",
        "note",
        "net",
        "vat",
        "total",
        "created_at",
        "created_by"
      ]
    },
    "SalesDocKind": {
      "type": "string",
      "enum": [
        "quote",
        "order",
        "proforma"
      ]
    },
    "SalesDocState": {
      "type": "string",
      "enum": [
        "draft",
        "issued",
        "accepted",
        "rejected",
        "expired",
        "confirmed",
        "converted",
        "cancelled"
      ]
    },
    "SalesDocumentEvent": {
      "type": "object",
      "properties": {
        "event": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "event_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "reason": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "amount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "event",
        "version",
        "created_at",
        "created_by"
      ]
    },
    "SalesDocumentLine": {
      "type": "object",
      "properties": {
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "item_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/ItemId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "description": {
          "type": "string"
        },
        "unit": {
          "type": "string"
        },
        "quantity": {
          "$ref": "#/$defs/Qty"
        },
        "price": {
          "$ref": "#/$defs/Money"
        },
        "discount": {
          "$ref": "#/$defs/Money"
        },
        "net": {
          "$ref": "#/$defs/Money"
        },
        "treatment": {
          "$ref": "#/$defs/VatTreatment"
        },
        "rate": {
          "type": "integer",
          "format": "i32"
        },
        "vat": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "line_no",
        "description",
        "unit",
        "quantity",
        "price",
        "discount",
        "net",
        "treatment",
        "rate",
        "vat"
      ]
    },
    "NewSalesDocument": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/SalesDocKind"
        },
        "partner_id": {
          "$ref": "#/$defs/PartnerId"
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "valid_until": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "place": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NewSalesDocumentLine"
          }
        }
      },
      "required": [
        "kind",
        "partner_id",
        "doc_date",
        "lines"
      ]
    },
    "NewSalesDocumentLine": {
      "type": "object",
      "properties": {
        "item_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/ItemId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "description": {
          "type": "string"
        },
        "unit": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "quantity": {
          "$ref": "#/$defs/Qty"
        },
        "price": {
          "$ref": "#/$defs/Money"
        },
        "discount": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true
        },
        "treatment": {
          "$ref": "#/$defs/VatTreatment"
        },
        "rate": {
          "type": "integer",
          "format": "i32"
        }
      },
      "required": [
        "description",
        "quantity",
        "price",
        "treatment",
        "rate"
      ]
    },
    "SalesDocumentAction": {
      "type": "object",
      "properties": {
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "reason": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": []
    },
    "ConvertSalesDocument": {
      "type": "object",
      "properties": {
        "to": {
          "$ref": "#/$defs/SalesConversionTarget"
        },
        "invoice_kind": {
          "anyOf": [
            {
              "$ref": "#/$defs/InvoiceKind"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "to"
      ]
    },
    "SalesConversionTarget": {
      "type": "string",
      "enum": [
        "order",
        "invoice"
      ]
    },
    "SalesConversion": {
      "type": "object",
      "properties": {
        "order": {
          "anyOf": [
            {
              "$ref": "#/$defs/SalesDocument"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "invoice": {
          "anyOf": [
            {
              "$ref": "#/$defs/NewInvoice"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": []
    },
    "IssueSalesDocument": {
      "type": "object",
      "properties": {
        "series_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/SeriesId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": []
    },
    "SalesDocumentPayment": {
      "type": "object",
      "properties": {
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "amount"
      ]
    },
    "ReviseSalesDocument": {
      "type": "object",
      "properties": {
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "reason": {
          "type": "string"
        },
        "partner_id": {
          "$ref": "#/$defs/PartnerId"
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "valid_until": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "place": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NewSalesDocumentLine"
          }
        }
      },
      "required": [
        "version",
        "reason",
        "partner_id",
        "doc_date",
        "lines"
      ]
    },
    "SaleCustomer": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/PartnerId"
        },
        "name": {
          "type": "string"
        },
        "edb": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "name"
      ]
    },
    "api::invoices::SaleQuery": {
      "type": "object",
      "properties": {
        "summary_only": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": []
    },
    "SaleDetail": {
      "type": "object",
      "properties": {
        "export_prices": {
          "anyOf": [
            {
              "$ref": "#/$defs/ExportPrices"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "kind": {
          "$ref": "#/$defs/InvoiceKind"
        },
        "vat_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "registered": {
          "type": "boolean"
        },
        "ref_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "id": {
          "$ref": "#/$defs/InvoiceId"
        },
        "number": {
          "type": "string"
        },
        "issue_date": {
          "type": "string",
          "format": "date"
        },
        "supply_date": {
          "type": "string",
          "format": "date"
        },
        "due_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "place": {
          "type": "string"
        },
        "note": {
          "type": "string"
        },
        "issuer": {
          "type": "string"
        },
        "issuer_edb": {
          "type": "string"
        },
        "issuer_address": {
          "type": "string"
        },
        "customer": {
          "type": "string"
        },
        "customer_edb": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "customer_address": {
          "type": "string"
        },
        "net": {
          "$ref": "#/$defs/Money"
        },
        "vat": {
          "$ref": "#/$defs/Money"
        },
        "total": {
          "$ref": "#/$defs/Money"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InvoiceLine"
          }
        },
        "attachments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SaleFile"
          }
        }
      },
      "required": [
        "kind",
        "registered",
        "id",
        "number",
        "issue_date",
        "supply_date",
        "place",
        "note",
        "issuer",
        "issuer_edb",
        "issuer_address",
        "customer",
        "customer_address",
        "net",
        "vat",
        "total",
        "lines",
        "attachments"
      ]
    },
    "SaleFile": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/AttachmentId"
        },
        "filename": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "filename"
      ]
    },
    "Scheme": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/SchemeId"
        },
        "code": {
          "type": "string"
        },
        "versions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SchemeVersion"
          }
        }
      },
      "required": [
        "id",
        "code",
        "versions"
      ]
    },
    "SchemeId": {
      "type": "string",
      "format": "uuid"
    },
    "SchemeVersion": {
      "type": "object",
      "properties": {
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "amount_basis": {
          "$ref": "#/$defs/Basis"
        },
        "vat_rate": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "active": {
          "type": "boolean"
        },
        "reason": {
          "type": "string"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SchemeLine"
          }
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "version",
        "name",
        "description",
        "amount_basis",
        "valid_from",
        "active",
        "reason",
        "lines",
        "created_at",
        "created_by"
      ]
    },
    "Basis": {
      "type": "string",
      "enum": [
        "net",
        "vat",
        "gross"
      ]
    },
    "SchemeLine": {
      "type": "object",
      "properties": {
        "account": {
          "type": "string"
        },
        "side": {
          "$ref": "#/$defs/Side"
        },
        "basis": {
          "$ref": "#/$defs/Basis"
        },
        "cost_center": {
          "anyOf": [
            {
              "$ref": "#/$defs/CostCenterId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "account",
        "side",
        "basis"
      ]
    },
    "Side": {
      "type": "string",
      "enum": [
        "debit",
        "credit"
      ]
    },
    "NewScheme": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "amount_basis": {
          "$ref": "#/$defs/Basis"
        },
        "vat_rate": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SchemeLine"
          }
        },
        "reason": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "name",
        "amount_basis",
        "valid_from",
        "lines"
      ]
    },
    "DeactivateScheme": {
      "type": "object",
      "properties": {
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "valid_from",
        "reason"
      ]
    },
    "ApplyScheme": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "format": "date"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "partner": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "date",
        "amount"
      ]
    },
    "SchemePreview": {
      "type": "object",
      "properties": {
        "scheme": {
          "$ref": "#/$defs/SchemeId"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "net": {
          "$ref": "#/$defs/Money"
        },
        "vat": {
          "$ref": "#/$defs/Money"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NewLine"
          }
        }
      },
      "required": [
        "scheme",
        "version",
        "name",
        "description",
        "net",
        "vat",
        "lines"
      ]
    },
    "LocalSignature": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "certificate_id": {
          "type": "integer",
          "format": "i64"
        },
        "purpose": {
          "type": "string"
        },
        "input_sha256": {
          "type": "string"
        },
        "requested_by": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "certificate_id",
        "purpose",
        "input_sha256",
        "requested_by",
        "created_at",
        "created_by"
      ]
    },
    "SignerCompanion": {
      "type": "object",
      "properties": {
        "token": {
          "type": "string"
        },
        "expires_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "token",
        "expires_at"
      ]
    },
    "api::signing::NextQ": {
      "type": "object",
      "properties": {
        "wait": {
          "anyOf": [
            {
              "type": "integer",
              "format": "u64",
              "minimum": 0
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "SigningRequest": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "certificate_id": {
          "type": "integer",
          "format": "i64"
        },
        "certificate_sha256": {
          "type": "string"
        },
        "alg": {
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/SignKind"
        },
        "purpose": {
          "type": "string"
        },
        "signing_input": {
          "type": "string"
        },
        "requested_by": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "certificate_id",
        "certificate_sha256",
        "alg",
        "kind",
        "purpose",
        "signing_input",
        "requested_by",
        "created_at"
      ]
    },
    "SignKind": {
      "type": "string",
      "enum": [
        "send",
        "decide",
        "read",
        "contract"
      ]
    },
    "SigningReply": {
      "type": "object",
      "properties": {
        "signature_base64": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "declined": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": []
    },
    "StatActivityRule": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/StatSettingId"
        },
        "account_prefix": {
          "type": "string"
        },
        "mode": {
          "$ref": "#/$defs/StatActivityMode"
        },
        "nkd_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "name": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "account_prefix",
        "mode",
        "valid_from",
        "created_at",
        "created_by"
      ]
    },
    "StatSettingId": {
      "type": "integer",
      "format": "i64"
    },
    "StatActivityMode": {
      "type": "string",
      "enum": [
        "main",
        "activity",
        "items"
      ]
    },
    "NewStatActivityRule": {
      "type": "object",
      "properties": {
        "account_prefix": {
          "type": "string"
        },
        "mode": {
          "$ref": "#/$defs/StatActivityMode"
        },
        "nkd_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "name": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "account_prefix",
        "mode",
        "valid_from"
      ]
    },
    "api::statistics::YearQ": {
      "type": "object",
      "properties": {
        "year": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "StatAnnual": {
      "type": "object",
      "properties": {
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "main_nkd_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "main_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "revenue": {
          "$ref": "#/$defs/Money"
        },
        "unassigned": {
          "$ref": "#/$defs/Money"
        },
        "activities": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StatActivityRevenue"
          }
        },
        "payroll_months": {
          "type": "integer",
          "format": "i32"
        },
        "employees_x100": {
          "type": "integer",
          "format": "i64"
        },
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "net": {
          "$ref": "#/$defs/Money"
        },
        "contributions": {
          "$ref": "#/$defs/Money"
        },
        "pit": {
          "$ref": "#/$defs/Money"
        },
        "hours_x100": {
          "type": "integer",
          "format": "i64"
        },
        "contract_people": {
          "type": "integer",
          "format": "i32"
        },
        "contract_gross": {
          "$ref": "#/$defs/Money"
        },
        "months": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StatPayrollPeriod"
          }
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "year",
        "revenue",
        "unassigned",
        "activities",
        "payroll_months",
        "employees_x100",
        "gross",
        "net",
        "contributions",
        "pit",
        "hours_x100",
        "contract_people",
        "contract_gross",
        "months",
        "note"
      ]
    },
    "StatActivityRevenue": {
      "type": "object",
      "properties": {
        "nkd_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "name": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "main": {
          "type": "boolean"
        },
        "accounts": {
          "$ref": "#/$defs/Money"
        },
        "items": {
          "$ref": "#/$defs/Money"
        },
        "revenue": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "main",
        "accounts",
        "items",
        "revenue"
      ]
    },
    "StatPayrollPeriod": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string",
          "format": "date"
        },
        "to": {
          "type": "string",
          "format": "date"
        },
        "payroll_months": {
          "type": "integer",
          "format": "i32"
        },
        "employees_x100": {
          "type": "integer",
          "format": "i64"
        },
        "gross": {
          "$ref": "#/$defs/Money"
        },
        "net": {
          "$ref": "#/$defs/Money"
        },
        "contributions": {
          "$ref": "#/$defs/Money"
        },
        "pit": {
          "$ref": "#/$defs/Money"
        },
        "hours_x100": {
          "type": "integer",
          "format": "i64"
        },
        "contract_people": {
          "type": "integer",
          "format": "i32"
        },
        "contract_gross": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "from",
        "to",
        "payroll_months",
        "employees_x100",
        "gross",
        "net",
        "contributions",
        "pit",
        "hours_x100",
        "contract_people",
        "contract_gross"
      ]
    },
    "StatItemActivity": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/StatSettingId"
        },
        "item_id": {
          "type": "string",
          "format": "uuid"
        },
        "item_code": {
          "type": "string"
        },
        "item_name": {
          "type": "string"
        },
        "mode": {
          "$ref": "#/$defs/StatActivityMode"
        },
        "nkd_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "name": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "item_id",
        "item_code",
        "item_name",
        "mode",
        "valid_from",
        "created_at",
        "created_by"
      ]
    },
    "NewStatItemActivity": {
      "type": "object",
      "properties": {
        "item_id": {
          "type": "string",
          "format": "uuid"
        },
        "mode": {
          "$ref": "#/$defs/StatActivityMode"
        },
        "nkd_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "name": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "item_id",
        "mode",
        "valid_from"
      ]
    },
    "api::statistics::KipoQuery": {
      "type": "object",
      "properties": {
        "include_opening": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "quarter": {
          "type": "integer",
          "format": "u8",
          "minimum": 0
        }
      },
      "required": [
        "year",
        "quarter"
      ]
    },
    "KipoReport": {
      "type": "object",
      "properties": {
        "company": {
          "type": "string"
        },
        "edb": {
          "type": "string"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "quarter": {
          "type": "integer",
          "format": "u8",
          "minimum": 0
        },
        "balances": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/KipoBalance"
          }
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/KipoLine"
          }
        },
        "opening_lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/KipoLine"
          },
          "x-serde-default": true,
          "default": []
        }
      },
      "required": [
        "company",
        "edb",
        "year",
        "quarter",
        "balances",
        "lines"
      ]
    },
    "KipoBalance": {
      "type": "object",
      "properties": {
        "country": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "currency": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "receivable": {
          "type": "boolean"
        },
        "account_code": {
          "type": "string"
        },
        "opening": {
          "$ref": "#/$defs/Money"
        },
        "increase": {
          "$ref": "#/$defs/Money"
        },
        "decrease": {
          "$ref": "#/$defs/Money"
        },
        "closing": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "receivable",
        "account_code",
        "opening",
        "increase",
        "decrease",
        "closing"
      ]
    },
    "KipoLine": {
      "type": "object",
      "properties": {
        "posting_date": {
          "type": "string",
          "format": "date"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "number": {
          "type": "integer",
          "format": "i32"
        },
        "doc_number": {
          "type": "string"
        },
        "entry_id": {
          "type": "integer",
          "format": "i64"
        },
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "account_code": {
          "type": "string"
        },
        "partner": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "country": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "currency": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "receivable": {
          "type": "boolean"
        },
        "increase": {
          "$ref": "#/$defs/Money"
        },
        "decrease": {
          "$ref": "#/$defs/Money"
        },
        "debit": {
          "$ref": "#/$defs/Money"
        },
        "credit": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "posting_date",
        "year",
        "number",
        "doc_number",
        "entry_id",
        "line_no",
        "account_code",
        "receivable",
        "increase",
        "decrease",
        "debit",
        "credit"
      ]
    },
    "StatMainActivity": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/StatSettingId"
        },
        "nkd_code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "nkd_code",
        "name",
        "valid_from",
        "created_at",
        "created_by"
      ]
    },
    "NewStatMainActivity": {
      "type": "object",
      "properties": {
        "nkd_code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "nkd_code",
        "name",
        "valid_from"
      ]
    },
    "api::statistics::PayrollQ": {
      "type": "object",
      "properties": {
        "year": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        },
        "quarterly": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": []
    },
    "api::stock::CardQ": {
      "type": "object",
      "properties": {
        "summary_only": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "warehouse": {
          "$ref": "#/$defs/WarehouseId"
        },
        "item": {
          "$ref": "#/$defs/ItemId"
        },
        "from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "to": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "warehouse",
        "item"
      ]
    },
    "StockCard": {
      "type": "object",
      "properties": {
        "warehouse_id": {
          "$ref": "#/$defs/WarehouseId"
        },
        "warehouse": {
          "type": "string"
        },
        "retail": {
          "type": "boolean"
        },
        "item_id": {
          "$ref": "#/$defs/ItemId"
        },
        "item_code": {
          "type": "string"
        },
        "item_name": {
          "type": "string"
        },
        "unit": {
          "type": "string"
        },
        "from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "to": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "opening_qty": {
          "$ref": "#/$defs/Qty"
        },
        "opening_value": {
          "$ref": "#/$defs/Money"
        },
        "opening_sale": {
          "$ref": "#/$defs/Money"
        },
        "moves": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StockCardMove"
          }
        },
        "closing_qty": {
          "$ref": "#/$defs/Qty"
        },
        "closing_value": {
          "$ref": "#/$defs/Money"
        },
        "closing_sale": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "warehouse_id",
        "warehouse",
        "retail",
        "item_id",
        "item_code",
        "item_name",
        "unit",
        "opening_qty",
        "opening_value",
        "opening_sale",
        "moves",
        "closing_qty",
        "closing_value",
        "closing_sale"
      ]
    },
    "StockCardMove": {
      "type": "object",
      "properties": {
        "doc_id": {
          "$ref": "#/$defs/StockDocId"
        },
        "kind": {
          "$ref": "#/$defs/StockDocKind"
        },
        "number": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "quantity": {
          "$ref": "#/$defs/Qty"
        },
        "value": {
          "$ref": "#/$defs/Money"
        },
        "sale_value": {
          "$ref": "#/$defs/Money"
        },
        "bal_qty": {
          "$ref": "#/$defs/Qty"
        },
        "bal_value": {
          "$ref": "#/$defs/Money"
        },
        "bal_sale": {
          "$ref": "#/$defs/Money"
        },
        "avg_price": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "partner": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "description": {
          "type": "string"
        }
      },
      "required": [
        "doc_id",
        "kind",
        "number",
        "date",
        "quantity",
        "value",
        "sale_value",
        "bal_qty",
        "bal_value",
        "bal_sale",
        "description"
      ]
    },
    "api::stock::YearQ": {
      "type": "object",
      "properties": {
        "year": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "NewStockDoc": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/StockDocKind"
        },
        "warehouse": {
          "$ref": "#/$defs/WarehouseId"
        },
        "to_warehouse": {
          "anyOf": [
            {
              "$ref": "#/$defs/WarehouseId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "partner": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "counter_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "costs_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "reference": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "description": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NewStockLine"
          }
        }
      },
      "required": [
        "kind",
        "warehouse",
        "date",
        "lines"
      ]
    },
    "NewStockLine": {
      "type": "object",
      "properties": {
        "item": {
          "$ref": "#/$defs/ItemId"
        },
        "quantity": {
          "$ref": "#/$defs/Qty"
        },
        "value": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "costs": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true
        },
        "sale_price": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "item",
        "quantity"
      ]
    },
    "CancelStockDoc": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "reason"
      ]
    },
    "StockDocOverview": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/StockDocId"
        },
        "kind": {
          "$ref": "#/$defs/StockDocKind"
        },
        "state": {
          "$ref": "#/$defs/StockDocState"
        },
        "warehouse_id": {
          "$ref": "#/$defs/WarehouseId"
        },
        "warehouse": {
          "type": "string"
        },
        "to_warehouse_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/WarehouseId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "to_warehouse": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "partner_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "partner": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "counter_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "costs_account": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "reference": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "storno_of": {
          "anyOf": [
            {
              "$ref": "#/$defs/StockDocId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "storno_by": {
          "anyOf": [
            {
              "$ref": "#/$defs/StockDocId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "stocktake_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/StocktakeId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "entry_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "draft_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "einvoice_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "einvoice_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "plan_error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "has_moves": {
          "type": "boolean"
        },
        "has_entry": {
          "type": "boolean"
        },
        "has_calc": {
          "type": "boolean"
        },
        "retail": {
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "kind",
        "state",
        "warehouse_id",
        "warehouse",
        "doc_date",
        "reference",
        "description",
        "created_at",
        "created_by",
        "has_moves",
        "has_entry",
        "has_calc",
        "retail"
      ]
    },
    "StockPostResult": {
      "type": "object",
      "properties": {
        "doc_id": {
          "$ref": "#/$defs/StockDocId"
        },
        "entry_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "draft_id": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "doc_id"
      ]
    },
    "StornoStockDoc": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "format": "date"
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "date",
        "reason"
      ]
    },
    "api::einvoice_receipts::MapsQ": {
      "type": "object",
      "properties": {
        "partner": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        },
        "all": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": []
    },
    "StockItemMap": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/StockItemMapId"
        },
        "partner_id": {
          "$ref": "#/$defs/PartnerId"
        },
        "partner_code": {
          "type": "integer",
          "format": "i32"
        },
        "partner": {
          "type": "string"
        },
        "supplier_key": {
          "type": "string"
        },
        "item_id": {
          "$ref": "#/$defs/ItemId"
        },
        "item_code": {
          "type": "string"
        },
        "item_name": {
          "type": "string"
        },
        "unit": {
          "type": "string"
        },
        "factor": {
          "type": "string"
        },
        "active": {
          "type": "boolean"
        },
        "deactivated_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "partner_id",
        "partner_code",
        "partner",
        "supplier_key",
        "item_id",
        "item_code",
        "item_name",
        "unit",
        "factor",
        "active",
        "created_at",
        "created_by"
      ]
    },
    "NewStockItemMap": {
      "type": "object",
      "properties": {
        "partner": {
          "$ref": "#/$defs/PartnerId"
        },
        "supplier_key": {
          "type": "string"
        },
        "item": {
          "$ref": "#/$defs/ItemId"
        },
        "factor": {
          "type": "string",
          "x-serde-default": "one",
          "default": "1"
        }
      },
      "required": [
        "partner",
        "supplier_key",
        "item"
      ]
    },
    "DeactivateStockItemMap": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "reason"
      ]
    },
    "Item": {
      "type": "object",
      "properties": {
        "tracking": {
          "anyOf": [
            {
              "$ref": "#/$defs/ItemTracking"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "id": {
          "$ref": "#/$defs/ItemId"
        },
        "code": {
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/ItemKind"
        },
        "unit": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "name": {
          "type": "string"
        },
        "vat_rate": {
          "type": "string"
        },
        "active": {
          "type": "boolean"
        },
        "domestic": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "changed_at": {
          "type": "string",
          "format": "date-time"
        },
        "changed_by": {
          "type": "string"
        },
        "versions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ItemVersion"
          },
          "x-serde-default": true,
          "default": [],
          "x-omitted-when": "Vec::is_empty"
        }
      },
      "required": [
        "id",
        "code",
        "kind",
        "unit",
        "version",
        "name",
        "vat_rate",
        "active",
        "changed_at",
        "changed_by"
      ]
    },
    "ItemTracking": {
      "type": "object",
      "properties": {
        "parent": {
          "$ref": "#/$defs/ItemId"
        },
        "variant": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "lot": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "serial": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "parent"
      ]
    },
    "ItemKind": {
      "type": "string",
      "enum": [
        "material",
        "goods",
        "product"
      ]
    },
    "ItemVersion": {
      "type": "object",
      "properties": {
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "name": {
          "type": "string"
        },
        "vat_rate": {
          "type": "string"
        },
        "active": {
          "type": "boolean"
        },
        "domestic": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "version",
        "name",
        "vat_rate",
        "active",
        "created_at",
        "created_by"
      ]
    },
    "NewItem": {
      "type": "object",
      "properties": {
        "tracking": {
          "anyOf": [
            {
              "$ref": "#/$defs/ItemTracking"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "code": {
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/ItemKind"
        },
        "unit": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "vat_rate": {
          "type": "string"
        },
        "active": {
          "type": "boolean",
          "x-serde-default": "yes",
          "default": true
        },
        "domestic": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": [
        "code",
        "kind",
        "unit",
        "name",
        "vat_rate"
      ]
    },
    "ItemData": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "vat_rate": {
          "type": "string"
        },
        "active": {
          "type": "boolean",
          "x-serde-default": "yes",
          "default": true
        },
        "domestic": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": [
        "name",
        "vat_rate"
      ]
    },
    "api::stock::ItemQuery": {
      "type": "object",
      "properties": {
        "summary_only": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": []
    },
    "ItemChange": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "vat_rate": {
          "type": "string"
        },
        "active": {
          "type": "boolean",
          "x-serde-default": "yes",
          "default": true
        },
        "domestic": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "vat_rate",
        "reason"
      ]
    },
    "api::stock::ListQ": {
      "type": "object",
      "properties": {
        "warehouse": {
          "anyOf": [
            {
              "$ref": "#/$defs/WarehouseId"
            },
            {
              "type": "null"
            }
          ]
        },
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "StockListRow": {
      "type": "object",
      "properties": {
        "warehouse_id": {
          "$ref": "#/$defs/WarehouseId"
        },
        "warehouse": {
          "type": "string"
        },
        "retail": {
          "type": "boolean"
        },
        "item_id": {
          "$ref": "#/$defs/ItemId"
        },
        "item_code": {
          "type": "string"
        },
        "item_name": {
          "type": "string"
        },
        "unit": {
          "type": "string"
        },
        "quantity": {
          "$ref": "#/$defs/Qty"
        },
        "value": {
          "$ref": "#/$defs/Money"
        },
        "sale_value": {
          "$ref": "#/$defs/Money"
        },
        "vat_value": {
          "$ref": "#/$defs/Money"
        },
        "avg_price": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "warehouse_id",
        "warehouse",
        "retail",
        "item_id",
        "item_code",
        "item_name",
        "unit",
        "quantity",
        "value",
        "sale_value",
        "vat_value",
        "avg_price"
      ]
    },
    "StockParam": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "code": {
          "type": "string"
        },
        "item_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/ItemId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "item_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "value": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "code",
        "valid_from",
        "value",
        "source",
        "created_at",
        "created_by"
      ]
    },
    "NewStockParam": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "item": {
          "anyOf": [
            {
              "$ref": "#/$defs/ItemId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "value": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "code",
        "valid_from",
        "value",
        "source"
      ]
    },
    "ProductionOrder": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "recipe": {
          "type": "integer",
          "format": "i64"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "materials": {
          "$ref": "#/$defs/WarehouseId"
        },
        "destination": {
          "$ref": "#/$defs/WarehouseId"
        },
        "quantity": {
          "$ref": "#/$defs/Qty"
        },
        "name": {
          "type": "string"
        },
        "issue_doc": {
          "$ref": "#/$defs/StockDocId"
        },
        "issue_state": {
          "$ref": "#/$defs/StockDocState"
        },
        "receipt_doc": {
          "anyOf": [
            {
              "$ref": "#/$defs/StockDocId"
            },
            {
              "type": "null"
            }
          ]
        },
        "receipt_state": {
          "anyOf": [
            {
              "$ref": "#/$defs/StockDocState"
            },
            {
              "type": "null"
            }
          ]
        },
        "receipt_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "recipe",
        "date",
        "materials",
        "destination",
        "quantity",
        "name",
        "issue_doc",
        "issue_state"
      ]
    },
    "NewProductionOrder": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "recipe": {
          "type": "integer",
          "format": "i64"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "materials": {
          "$ref": "#/$defs/WarehouseId"
        },
        "destination": {
          "$ref": "#/$defs/WarehouseId"
        },
        "quantity": {
          "$ref": "#/$defs/Qty"
        }
      },
      "required": [
        "id",
        "recipe",
        "date",
        "materials",
        "destination",
        "quantity"
      ]
    },
    "ProductionRecipe": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "name": {
          "type": "string"
        },
        "product": {
          "$ref": "#/$defs/ItemId"
        },
        "components": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RecipeComponent"
          }
        }
      },
      "required": [
        "id",
        "name",
        "product",
        "components"
      ]
    },
    "NewRecipe": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "product": {
          "$ref": "#/$defs/ItemId"
        },
        "components": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RecipeComponent"
          }
        }
      },
      "required": [
        "name",
        "product",
        "components"
      ]
    },
    "RecipeComponent": {
      "type": "object",
      "properties": {
        "item": {
          "$ref": "#/$defs/ItemId"
        },
        "quantity": {
          "$ref": "#/$defs/Qty"
        }
      },
      "required": [
        "item",
        "quantity"
      ]
    },
    "api::stock::DateQ": {
      "type": "object",
      "properties": {
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "StockRecon": {
      "type": "object",
      "properties": {
        "account": {
          "type": "string"
        },
        "analytics": {
          "$ref": "#/$defs/Money"
        },
        "ledger": {
          "$ref": "#/$defs/Money"
        },
        "ok": {
          "type": "boolean"
        }
      },
      "required": [
        "account",
        "analytics",
        "ledger",
        "ok"
      ]
    },
    "Warehouse": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/WarehouseId"
        },
        "code": {
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/ItemKind"
        },
        "account": {
          "type": "string"
        },
        "retail": {
          "type": "boolean"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "name": {
          "type": "string"
        },
        "address": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "active": {
          "type": "boolean"
        },
        "changed_at": {
          "type": "string",
          "format": "date-time"
        },
        "changed_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "code",
        "kind",
        "account",
        "retail",
        "version",
        "name",
        "active",
        "changed_at",
        "changed_by"
      ]
    },
    "NewWarehouse": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/ItemKind"
        },
        "account": {
          "type": "string"
        },
        "retail": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "name": {
          "type": "string"
        },
        "active": {
          "type": "boolean",
          "x-serde-default": "yes",
          "default": true
        },
        "address": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "code",
        "kind",
        "account",
        "name"
      ]
    },
    "WarehouseData": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "active": {
          "type": "boolean",
          "x-serde-default": "yes",
          "default": true
        },
        "address": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "name"
      ]
    },
    "WarehouseChange": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "active": {
          "type": "boolean",
          "x-serde-default": "yes",
          "default": true
        },
        "address": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "reason"
      ]
    },
    "StocktakeSummary": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/StocktakeId"
        },
        "warehouse_id": {
          "$ref": "#/$defs/WarehouseId"
        },
        "warehouse": {
          "type": "string"
        },
        "take_date": {
          "type": "string",
          "format": "date"
        },
        "description": {
          "type": "string"
        },
        "locked": {
          "type": "boolean"
        },
        "doc_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/StockDocId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "warehouse_id",
        "warehouse",
        "take_date",
        "description",
        "locked",
        "created_at",
        "created_by"
      ]
    },
    "NewStocktake": {
      "type": "object",
      "properties": {
        "warehouse": {
          "$ref": "#/$defs/WarehouseId"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "description": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "warehouse",
        "date"
      ]
    },
    "Stocktake": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/StocktakeId"
        },
        "warehouse_id": {
          "$ref": "#/$defs/WarehouseId"
        },
        "warehouse": {
          "type": "string"
        },
        "take_date": {
          "type": "string",
          "format": "date"
        },
        "description": {
          "type": "string"
        },
        "locked": {
          "type": "boolean"
        },
        "doc_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/StockDocId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StocktakeLine"
          }
        }
      },
      "required": [
        "id",
        "warehouse_id",
        "warehouse",
        "take_date",
        "description",
        "locked",
        "created_at",
        "created_by",
        "lines"
      ]
    },
    "StocktakeLine": {
      "type": "object",
      "properties": {
        "item_id": {
          "$ref": "#/$defs/ItemId"
        },
        "item_code": {
          "type": "string"
        },
        "item_name": {
          "type": "string"
        },
        "unit": {
          "type": "string"
        },
        "book_qty": {
          "$ref": "#/$defs/Qty"
        },
        "book_value": {
          "$ref": "#/$defs/Money"
        },
        "book_sale": {
          "$ref": "#/$defs/Money"
        },
        "counted": {
          "$ref": "#/$defs/Qty"
        },
        "count_value": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "sale_price": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "diff_qty": {
          "$ref": "#/$defs/Qty"
        },
        "outflow_qty": {
          "$ref": "#/$defs/Qty"
        },
        "allowance_pct": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "allowance_qty": {
          "$ref": "#/$defs/Qty"
        },
        "is_counted": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "item_id",
        "item_code",
        "item_name",
        "unit",
        "book_qty",
        "book_value",
        "book_sale",
        "counted",
        "diff_qty",
        "outflow_qty",
        "allowance_qty"
      ]
    },
    "StocktakeCount": {
      "type": "object",
      "properties": {
        "item": {
          "$ref": "#/$defs/ItemId"
        },
        "counted": {
          "$ref": "#/$defs/Qty"
        },
        "value": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "sale_price": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "item",
        "counted"
      ]
    },
    "Subscription": {
      "type": "object",
      "properties": {
        "seats": {
          "anyOf": [
            {
              "$ref": "#/$defs/SubscriptionSeats"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "status": {
          "type": "string"
        },
        "changed_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "license": {
          "type": "string",
          "x-serde-default": "license_active",
          "default": "active"
        },
        "valid_from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "valid_until": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "status"
      ]
    },
    "SubscriptionSeats": {
      "type": "object",
      "properties": {
        "organization_id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "capacity": {
          "type": "integer",
          "format": "i32"
        },
        "used": {
          "type": "integer",
          "format": "i64"
        }
      },
      "required": [
        "organization_id",
        "name",
        "capacity",
        "used"
      ]
    },
    "SupportSuggestRequest": {
      "type": "object",
      "properties": {
        "question": {
          "type": "string"
        },
        "lang": {
          "type": "string",
          "x-serde-default": "lang_mk",
          "default": "mk"
        },
        "ai": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": [
        "question"
      ]
    },
    "SupportSuggestion": {
      "type": "object",
      "properties": {
        "articles": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/HelpArticleHit"
          }
        },
        "answer": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "articles"
      ]
    },
    "HelpArticleHit": {
      "type": "object",
      "properties": {
        "slug": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "summary": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "required": [
        "slug",
        "title",
        "summary",
        "url"
      ]
    },
    "NewSupportTicket": {
      "type": "object",
      "properties": {
        "subject": {
          "type": "string"
        },
        "body": {
          "type": "string"
        },
        "lang": {
          "type": "string",
          "x-serde-default": "lang_mk",
          "default": "mk"
        }
      },
      "required": [
        "subject",
        "body"
      ]
    },
    "SupportThread": {
      "type": "object",
      "properties": {
        "ticket": {
          "$ref": "#/$defs/SupportTicket"
        },
        "messages": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SupportMessage"
          }
        }
      },
      "required": [
        "ticket",
        "messages"
      ]
    },
    "SupportMessage": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "author": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "body": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "author",
        "name",
        "body",
        "created_at"
      ]
    },
    "NewSupportMessage": {
      "type": "object",
      "properties": {
        "body": {
          "type": "string"
        }
      },
      "required": [
        "body"
      ]
    },
    "TaxRegimeSetting": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "regime": {
          "$ref": "#/$defs/TaxRegime"
        },
        "reason": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "valid_from",
        "regime",
        "reason",
        "created_at",
        "created_by"
      ]
    },
    "TaxRegime": {
      "type": "string",
      "enum": [
        "profit",
        "total_income"
      ]
    },
    "NewTaxRegimeSetting": {
      "type": "object",
      "properties": {
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "regime": {
          "$ref": "#/$defs/TaxRegime"
        },
        "reason": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "valid_from",
        "regime"
      ]
    },
    "TotalIncomeTaxReturn": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/TotalIncomeTaxReturnId"
        },
        "number": {
          "type": "string"
        },
        "fy_start": {
          "type": "string",
          "format": "date"
        },
        "fy_end": {
          "type": "string",
          "format": "date"
        },
        "params_id": {
          "type": "integer",
          "format": "i64"
        },
        "rate": {
          "$ref": "#/$defs/RateE4"
        },
        "income_limit": {
          "$ref": "#/$defs/Money"
        },
        "exempt_limit": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "exempt": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "accounts": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "verified": {
          "type": "boolean"
        },
        "income_positions": {
          "anyOf": [
            {
              "$ref": "#/$defs/DbVpIncomePositions"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "total_income": {
          "$ref": "#/$defs/Money"
        },
        "tax": {
          "$ref": "#/$defs/Money"
        },
        "advances": {
          "$ref": "#/$defs/Money"
        },
        "balance": {
          "$ref": "#/$defs/Money"
        },
        "entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ]
        },
        "note": {
          "type": "string"
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "storno_entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "number",
        "fy_start",
        "fy_end",
        "params_id",
        "rate",
        "income_limit",
        "accounts",
        "verified",
        "total_income",
        "tax",
        "advances",
        "balance",
        "note",
        "created_at",
        "created_by"
      ]
    },
    "TotalIncomeTaxReturnId": {
      "type": "integer",
      "format": "i64"
    },
    "NewTotalIncomeTaxReturn": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "format": "date"
        },
        "advances": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        }
      },
      "required": [
        "date"
      ]
    },
    "TotalIncomeTaxParams": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "own": {
          "type": "boolean"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "rate": {
          "$ref": "#/$defs/RateE4"
        },
        "income_limit": {
          "$ref": "#/$defs/Money"
        },
        "exempt_limit": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "accounts": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "conditions": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "verified": {
          "type": "boolean"
        },
        "note": {
          "type": "string"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "own",
        "valid_from",
        "rate",
        "income_limit",
        "accounts",
        "conditions",
        "source",
        "verified",
        "note",
        "created_at",
        "created_by"
      ]
    },
    "NewTotalIncomeTaxParams": {
      "type": "object",
      "properties": {
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "rate": {
          "$ref": "#/$defs/RateE4"
        },
        "income_limit": {
          "$ref": "#/$defs/Money"
        },
        "exempt_limit": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "accounts": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "conditions": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "source": {
          "type": "string"
        },
        "verified": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "valid_from",
        "rate",
        "income_limit",
        "accounts",
        "source",
        "reason"
      ]
    },
    "api::total_income_tax::PreviewQ": {
      "type": "object",
      "properties": {
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "TotalIncomeTaxPreview": {
      "type": "object",
      "properties": {
        "fy_start": {
          "type": "string",
          "format": "date"
        },
        "fy_end": {
          "type": "string",
          "format": "date"
        },
        "regime": {
          "$ref": "#/$defs/TaxRegime"
        },
        "params": {
          "anyOf": [
            {
              "$ref": "#/$defs/TotalIncomeTaxParams"
            },
            {
              "type": "null"
            }
          ]
        },
        "total_income": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        },
        "tax": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        },
        "existing": {
          "anyOf": [
            {
              "$ref": "#/$defs/TotalIncomeTaxReturnId"
            },
            {
              "type": "null"
            }
          ]
        },
        "profit_tax_existing": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "fy_start",
        "fy_end",
        "regime"
      ]
    },
    "CancelTotalIncomeTax": {
      "$ref": "#/$defs/CancelProfitTax"
    },
    "TravelRate": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/TravelRateId"
        },
        "tenant_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "country": {
          "type": "string"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "currency": {
          "type": "string"
        },
        "amount": {
          "type": "integer",
          "format": "i64"
        },
        "source": {
          "type": "string"
        },
        "verified": {
          "type": "boolean"
        },
        "note": {
          "type": "string"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "country",
        "valid_from",
        "currency",
        "amount",
        "source",
        "verified",
        "note",
        "created_at",
        "created_by"
      ]
    },
    "TravelRateId": {
      "type": "integer",
      "format": "i64"
    },
    "NewTravelRate": {
      "type": "object",
      "properties": {
        "country": {
          "type": "string"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "currency": {
          "type": "string"
        },
        "amount": {
          "type": "integer",
          "format": "i64"
        },
        "source": {
          "type": "string"
        },
        "verified": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "note": {
          "type": "string",
          "x-serde-default": true,
          "default": ""
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "country",
        "valid_from",
        "currency",
        "amount",
        "source",
        "reason"
      ]
    },
    "TravelCancel": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "reason"
      ]
    },
    "TravelOrderDetail": {
      "type": "object",
      "properties": {
        "order": {
          "$ref": "#/$defs/TravelOrder"
        },
        "expenses": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TravelExpense"
          }
        },
        "settlement": {
          "anyOf": [
            {
              "$ref": "#/$defs/TravelCalculation"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "payment_orders": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TravelPaymentOrder"
          }
        }
      },
      "required": [
        "order",
        "expenses",
        "payment_orders"
      ]
    },
    "TravelOrder": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/TravelOrderId"
        },
        "year": {
          "type": "integer",
          "format": "i32"
        },
        "number": {
          "type": "integer",
          "format": "i32"
        },
        "order_date": {
          "type": "string",
          "format": "date"
        },
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "employee_name": {
          "type": "string"
        },
        "purpose": {
          "type": "string"
        },
        "destination": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "transport": {
          "$ref": "#/$defs/TravelTransport"
        },
        "vehicle": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "depart_at": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?$"
        },
        "return_at": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?$"
        },
        "advance": {
          "$ref": "#/$defs/Money"
        },
        "breakfasts": {
          "type": "integer",
          "format": "i32"
        },
        "lunches": {
          "type": "integer",
          "format": "i32"
        },
        "dinners": {
          "type": "integer",
          "format": "i32"
        },
        "cost_center_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/CostCenterId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "state": {
          "$ref": "#/$defs/TravelOrderState"
        },
        "total": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "balance": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "year",
        "number",
        "order_date",
        "employee_id",
        "employee_name",
        "purpose",
        "destination",
        "country",
        "transport",
        "depart_at",
        "return_at",
        "advance",
        "breakfasts",
        "lunches",
        "dinners",
        "state",
        "created_at",
        "created_by"
      ]
    },
    "TravelOrderId": {
      "type": "integer",
      "format": "i64"
    },
    "TravelTransport": {
      "type": "string",
      "enum": [
        "company_vehicle",
        "private_vehicle",
        "bus",
        "train",
        "plane",
        "other"
      ]
    },
    "TravelOrderState": {
      "type": "string",
      "enum": [
        "open",
        "settled",
        "cancelled"
      ]
    },
    "TravelExpense": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/TravelExpenseId"
        },
        "order_id": {
          "$ref": "#/$defs/TravelOrderId"
        },
        "kind": {
          "$ref": "#/$defs/TravelLineKind"
        },
        "description": {
          "type": "string"
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "currency": {
          "type": "string"
        },
        "amount": {
          "type": "integer",
          "format": "i64"
        },
        "attachment_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/AttachmentId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "attachment_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "cancel_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "order_id",
        "kind",
        "description",
        "doc_date",
        "currency",
        "amount",
        "created_at",
        "created_by"
      ]
    },
    "TravelExpenseId": {
      "type": "integer",
      "format": "i64"
    },
    "TravelLineKind": {
      "type": "string",
      "enum": [
        "per_diem",
        "transport",
        "accommodation",
        "other"
      ]
    },
    "TravelCalculation": {
      "type": "object",
      "properties": {
        "order_id": {
          "$ref": "#/$defs/TravelOrderId"
        },
        "number": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "minutes": {
          "type": "integer",
          "format": "i64"
        },
        "full_days": {
          "type": "integer",
          "format": "i32"
        },
        "half_days": {
          "type": "integer",
          "format": "i32"
        },
        "rate_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/TravelRateId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "rate_currency": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "rate_amount": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "gross_fx": {
          "type": "integer",
          "format": "i64"
        },
        "meal_reduction_fx": {
          "type": "integer",
          "format": "i64"
        },
        "per_diem_fx": {
          "type": "integer",
          "format": "i64"
        },
        "fx_rate_micro": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "per_diem": {
          "$ref": "#/$defs/Money"
        },
        "expenses": {
          "$ref": "#/$defs/Money"
        },
        "total": {
          "$ref": "#/$defs/Money"
        },
        "advance": {
          "$ref": "#/$defs/Money"
        },
        "balance": {
          "$ref": "#/$defs/Money"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TravelLine"
          }
        },
        "unverified": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "entry_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/EntryId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "order_id",
        "number",
        "date",
        "minutes",
        "full_days",
        "half_days",
        "gross_fx",
        "meal_reduction_fx",
        "per_diem_fx",
        "per_diem",
        "expenses",
        "total",
        "advance",
        "balance",
        "lines",
        "unverified"
      ]
    },
    "TravelLine": {
      "type": "object",
      "properties": {
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "kind": {
          "$ref": "#/$defs/TravelLineKind"
        },
        "expense_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/TravelExpenseId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "description": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "amount_fx": {
          "type": "integer",
          "format": "i64"
        },
        "fx_rate_micro": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i64"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "line_no",
        "kind",
        "description",
        "currency",
        "amount_fx",
        "amount"
      ]
    },
    "TravelPaymentOrder": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/TravelPaymentKind"
        },
        "order": {
          "$ref": "#/$defs/PaymentOrder"
        }
      },
      "required": [
        "kind",
        "order"
      ]
    },
    "TravelPaymentKind": {
      "type": "string",
      "enum": [
        "advance",
        "balance"
      ]
    },
    "api::travel_orders::ListQ": {
      "type": "object",
      "properties": {
        "year": {
          "anyOf": [
            {
              "type": "integer",
              "format": "i32"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "NewTravelOrder": {
      "type": "object",
      "properties": {
        "order_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "employee_id": {
          "$ref": "#/$defs/EmployeeId"
        },
        "purpose": {
          "type": "string"
        },
        "destination": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "transport": {
          "$ref": "#/$defs/TravelTransport"
        },
        "vehicle": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "depart_at": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?$"
        },
        "return_at": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?$"
        },
        "advance": {
          "$ref": "#/$defs/Money",
          "x-serde-default": true
        },
        "breakfasts": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": true,
          "default": 0
        },
        "lunches": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": true,
          "default": 0
        },
        "dinners": {
          "type": "integer",
          "format": "i32",
          "x-serde-default": true,
          "default": 0
        },
        "cost_center_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/CostCenterId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "employee_id",
        "purpose",
        "destination",
        "country",
        "transport",
        "depart_at",
        "return_at"
      ]
    },
    "NewTravelExpense": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/TravelLineKind"
        },
        "description": {
          "type": "string"
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "currency": {
          "type": "string",
          "x-serde-default": "mkd",
          "default": "MKD"
        },
        "amount": {
          "type": "integer",
          "format": "i64"
        },
        "attachment_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/AttachmentId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "kind",
        "description",
        "doc_date",
        "amount"
      ]
    },
    "NewTravelPayment": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/TravelPaymentKind"
        },
        "bank_account_id": {
          "$ref": "#/$defs/BankAccountId"
        },
        "value_date": {
          "type": "string",
          "format": "date"
        },
        "amount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "kind",
        "bank_account_id",
        "value_date"
      ]
    },
    "api::travel_orders::PreviewQ": {
      "type": "object",
      "properties": {
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "TravelSettle": {
      "type": "object",
      "properties": {
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": []
    },
    "TrialBalanceRow": {
      "type": "object",
      "properties": {
        "account": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "debit": {
          "$ref": "#/$defs/Money"
        },
        "credit": {
          "$ref": "#/$defs/Money"
        },
        "balance": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "account",
        "name",
        "debit",
        "credit",
        "balance"
      ]
    },
    "UjpStatus": {
      "type": "object",
      "properties": {
        "environment": {
          "$ref": "#/$defs/UjpEnvironment"
        },
        "reachable": {
          "type": "boolean"
        },
        "checked_at": {
          "type": "string",
          "format": "date-time"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "environment",
        "reachable",
        "checked_at"
      ]
    },
    "UsageQuota": {
      "type": "object",
      "properties": {
        "mail": {
          "$ref": "#/$defs/QuotaItem"
        },
        "ai_read": {
          "$ref": "#/$defs/QuotaItem"
        },
        "enforced": {
          "type": "boolean"
        }
      },
      "required": [
        "mail",
        "ai_read",
        "enforced"
      ]
    },
    "api::vat::RangeQ": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string",
          "format": "date"
        },
        "to": {
          "type": "string",
          "format": "date"
        },
        "direction": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "from",
        "to"
      ]
    },
    "VatBookRow": {
      "type": "object",
      "properties": {
        "entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "entry_year": {
          "type": "integer",
          "format": "i32"
        },
        "entry_number": {
          "type": "integer",
          "format": "i32"
        },
        "posting_date": {
          "type": "string",
          "format": "date"
        },
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "direction": {
          "$ref": "#/$defs/VatDirection"
        },
        "treatment": {
          "$ref": "#/$defs/VatTreatment"
        },
        "advance": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "doc_kind": {
          "$ref": "#/$defs/VatDocKind"
        },
        "doc_number": {
          "type": "string"
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "counterparty": {
          "type": "string"
        },
        "counterparty_vat": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "base": {
          "$ref": "#/$defs/Money"
        },
        "rate": {
          "type": "integer",
          "format": "i32"
        },
        "vat": {
          "$ref": "#/$defs/Money"
        },
        "corrects_period": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "period_start": {
          "type": "string",
          "format": "date"
        },
        "period_end": {
          "type": "string",
          "format": "date"
        }
      },
      "required": [
        "entry_id",
        "entry_year",
        "entry_number",
        "posting_date",
        "line_no",
        "direction",
        "treatment",
        "doc_kind",
        "doc_number",
        "doc_date",
        "counterparty",
        "base",
        "rate",
        "vat",
        "period_start",
        "period_end"
      ]
    },
    "VatRegistration": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "status": {
          "$ref": "#/$defs/VatStatus"
        },
        "period": {
          "anyOf": [
            {
              "$ref": "#/$defs/VatPeriodKind"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "vat_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "valid_from",
        "status",
        "created_at",
        "created_by"
      ]
    },
    "NewVatRegistration": {
      "type": "object",
      "properties": {
        "valid_from": {
          "type": "string",
          "format": "date"
        },
        "status": {
          "$ref": "#/$defs/VatStatus"
        },
        "period": {
          "anyOf": [
            {
              "$ref": "#/$defs/VatPeriodKind"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        },
        "vat_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "valid_from",
        "status"
      ]
    },
    "VatStatus": {
      "type": "string",
      "enum": [
        "registered",
        "deregistered"
      ]
    },
    "VatPeriodKind": {
      "type": "string",
      "enum": [
        "month",
        "quarter"
      ]
    },
    "VatReturn": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "period_start": {
          "type": "string",
          "format": "date"
        },
        "period_end": {
          "type": "string",
          "format": "date"
        },
        "version": {
          "type": "integer",
          "format": "i32"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        },
        "export_separated": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "empty_books": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "amounts": {
          "$ref": "#/$defs/VatAmounts"
        },
        "sources": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "$ref": "#/$defs/VatAmountSource"
              }
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "id",
        "period_start",
        "period_end",
        "version",
        "created_at",
        "created_by",
        "amounts"
      ]
    },
    "VatAmounts": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/Money"
      }
    },
    "VatAmountSource": {
      "type": "object",
      "properties": {
        "entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "doc_number": {
          "type": "string"
        },
        "doc_date": {
          "type": "string",
          "format": "date"
        },
        "counterparty": {
          "type": "string"
        },
        "amount": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "entry_id",
        "line_no",
        "doc_number",
        "doc_date",
        "counterparty",
        "amount"
      ]
    },
    "NewVatReturn": {
      "type": "object",
      "properties": {
        "period_start": {
          "type": "string",
          "format": "date"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "period_start"
      ]
    },
    "api::vat::SourceQ": {
      "type": "object",
      "properties": {
        "field": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "api::vat::VatFormQuery": {
      "type": "object",
      "properties": {
        "nil": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        }
      },
      "required": []
    },
    "Ddv04Supplement": {
      "type": "object",
      "properties": {
        "return_id": {
          "type": "integer",
          "format": "i64"
        },
        "choices": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Ddv04Choice"
          }
        },
        "settlement": {
          "anyOf": [
            {
              "$ref": "#/$defs/Ddv04Settlement"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null,
          "x-omitted-when": "Option::is_none"
        }
      },
      "required": [
        "return_id",
        "choices"
      ]
    },
    "Ddv04Choice": {
      "type": "object",
      "properties": {
        "entry_id": {
          "$ref": "#/$defs/EntryId"
        },
        "line_no": {
          "type": "integer",
          "format": "i32"
        },
        "basis": {
          "$ref": "#/$defs/Ddv04Basis"
        }
      },
      "required": [
        "entry_id",
        "line_no",
        "basis"
      ]
    },
    "Ddv04Basis": {
      "type": "string",
      "enum": [
        "foreign_customer",
        "article32a",
        "article32",
        "outside_field10"
      ]
    },
    "Ddv04Settlement": {
      "type": "object",
      "properties": {
        "adjustments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Ddv04Adjustment"
          }
        },
        "refund": {
          "type": "boolean"
        },
        "assignment": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "adjustments",
        "refund",
        "assignment"
      ]
    },
    "Ddv04Adjustment": {
      "type": "object",
      "properties": {
        "amount": {
          "$ref": "#/$defs/Money"
        },
        "attachment_id": {
          "$ref": "#/$defs/AttachmentId"
        }
      },
      "required": [
        "amount",
        "attachment_id"
      ]
    },
    "Ddv04Item": {
      "type": "object",
      "properties": {
        "without_deduction": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "source": {
          "$ref": "#/$defs/VatAmountSource"
        },
        "field": {
          "type": "string"
        },
        "rate": {
          "type": "integer",
          "format": "i32"
        },
        "vat": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "source",
        "field",
        "rate",
        "vat"
      ]
    },
    "VatSummary": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string",
          "format": "date"
        },
        "to": {
          "type": "string",
          "format": "date"
        },
        "export_separated": {
          "type": "boolean",
          "x-serde-default": true,
          "default": false
        },
        "amounts": {
          "$ref": "#/$defs/VatAmounts"
        }
      },
      "required": [
        "from",
        "to",
        "amounts"
      ]
    },
    "api::year::DateQ": {
      "type": "object",
      "properties": {
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "YearCloseStatus": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string",
          "format": "date"
        },
        "end": {
          "type": "string",
          "format": "date"
        },
        "closed": {
          "type": "boolean"
        },
        "checks": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/YearCloseCheck"
          }
        },
        "preview": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/YearClosePreviewLine"
          }
        }
      },
      "required": [
        "start",
        "end",
        "closed",
        "checks",
        "preview"
      ]
    },
    "YearCloseCheck": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "ok": {
          "type": "boolean"
        },
        "detail": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "ok",
        "detail"
      ]
    },
    "YearClosePreviewLine": {
      "type": "object",
      "properties": {
        "role": {
          "$ref": "#/$defs/CloseRole"
        },
        "posting_date": {
          "type": "string",
          "format": "date"
        },
        "account": {
          "type": "string"
        },
        "asset_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/AssetId"
            },
            {
              "type": "null"
            }
          ]
        },
        "partner_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartnerId"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        },
        "debit": {
          "$ref": "#/$defs/Money"
        },
        "credit": {
          "$ref": "#/$defs/Money"
        }
      },
      "required": [
        "role",
        "posting_date",
        "account",
        "debit",
        "credit"
      ]
    },
    "CloseRole": {
      "type": "string",
      "enum": [
        "result",
        "balance",
        "opening"
      ]
    },
    "YearCloseRequest": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "format": "date"
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "date",
        "reason"
      ]
    },
    "YearClosing": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "i64"
        },
        "start": {
          "type": "string",
          "format": "date"
        },
        "end": {
          "type": "string",
          "format": "date"
        },
        "status": {
          "$ref": "#/$defs/YearCloseStatusKind"
        },
        "reason": {
          "type": "string"
        },
        "entry_ids": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EntryId"
          }
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "start",
        "end",
        "status",
        "reason",
        "entry_ids",
        "created_at",
        "created_by"
      ]
    },
    "YearCloseStatusKind": {
      "type": "string",
      "enum": [
        "closed",
        "reopened"
      ]
    },
    "YearCloseOverview": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string",
          "format": "date"
        },
        "end": {
          "type": "string",
          "format": "date"
        },
        "closed": {
          "type": "boolean"
        },
        "can_close": {
          "type": "boolean"
        }
      },
      "required": [
        "start",
        "end",
        "closed",
        "can_close"
      ]
    },
    "api::NewClientScope": {
      "type": "object",
      "properties": {
        "bureau": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": []
    },
    "NewTenantWithDetails": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "edb": {
          "type": "string"
        },
        "details": {
          "anyOf": [
            {
              "$ref": "#/$defs/TenantDetails"
            },
            {
              "type": "null"
            }
          ],
          "x-serde-default": true,
          "default": null
        }
      },
      "required": [
        "name",
        "edb"
      ]
    },
    "NewTenant": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "edb": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "edb"
      ]
    }
  }
}