{
  "components": {
    "schemas": {
      "AcceptInviteResult": {
        "properties": {
          "company_id": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          },
          "units": {
            "type": "number"
          }
        },
        "required": [
          "success",
          "company_id",
          "units"
        ],
        "title": "AcceptInviteResult",
        "type": "object"
      },
      "ActivateResult": {
        "properties": {
          "activated": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "activated",
          "message"
        ],
        "title": "ActivateResult",
        "type": "object"
      },
      "Address": {
        "description": "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 EMBEDDED TYPES - Nested structures (no sid field) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Physical address",
        "properties": {
          "city": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "postal_code": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "street": {
            "type": "string"
          }
        },
        "required": [
          "street",
          "city",
          "state",
          "postal_code",
          "country"
        ],
        "title": "Address",
        "type": "object"
      },
      "AdminAction": {
        "description": "Admin audit log entry [rootobject]",
        "properties": {
          "action": {
            "type": "string"
          },
          "admin_email": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "details": {
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "target_id": {
            "type": "string"
          },
          "target_type": {
            "type": "string"
          }
        },
        "required": [
          "sid",
          "admin_email",
          "action",
          "target_type",
          "target_id",
          "details",
          "created_at"
        ],
        "title": "AdminAction",
        "type": "object"
      },
      "AllPricingConfig": {
        "description": "All pricing configurations",
        "properties": {
          "company_types": {
            "items": {
              "$ref": "#/components/schemas/CompanyPricingConfig"
            },
            "type": "array"
          },
          "feature_flags": {
            "$ref": "#/components/schemas/PublicFeatureFlags"
          },
          "early_bird_discount": {
            "type": "number"
          },
          "one_year_discount": {
            "type": "number"
          },
          "resident_monthly_fee": {
            "type": "number"
          },
          "two_year_discount": {
            "type": "number"
          },
          "resident_plans": {
            "items": {
              "$ref": "#/components/schemas/ResidentPlanPrice"
            },
            "type": "array"
          },
          "company_one_year_discount": {
            "type": "number"
          },
          "company_two_year_discount": {
            "type": "number"
          }
        },
        "required": [
          "company_types",
          "feature_flags",
          "resident_monthly_fee",
          "early_bird_discount",
          "one_year_discount",
          "two_year_discount"
        ],
        "title": "AllPricingConfig",
        "type": "object"
      },
      "ResidentPlanPrice": {
        "description": "One resident plan as the server prices it (home#935). Display `price`; never derive it.",
        "properties": {
          "code": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "months": {
            "type": "integer"
          },
          "price": {
            "type": "number"
          },
          "resident_discount": {
            "type": "number"
          }
        },
        "required": [
          "code",
          "label",
          "months",
          "price"
        ],
        "title": "ResidentPlanPrice",
        "type": "object"
      },
      "ApiKey": {
        "description": "API key for reseller access [rootobject]",
        "properties": {
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "expires_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "key_hash": {
            "type": "string"
          },
          "last_used_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        },
        "required": [
          "sid",
          "key_hash",
          "name",
          "is_active",
          "created_at"
        ],
        "title": "ApiKey",
        "type": "object"
      },
      "ApiKeyError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "ApiKeyError",
        "type": "object"
      },
      "ApiKeyResult": {
        "description": "API key service types",
        "properties": {
          "api_key": {
            "type": "string"
          },
          "expires_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        "required": [
          "api_key",
          "expires_at"
        ],
        "title": "ApiKeyResult",
        "type": "object"
      },
      "ApiKeysListResult": {
        "description": "\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 ADDITIONAL RESULT AND DATA TYPES Added to support generated RPC handlers \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 API Key service types",
        "properties": {
          "api_keys": {
            "items": {
              "$ref": "#/components/schemas/ApiKey"
            },
            "type": "array"
          }
        },
        "required": [
          "api_keys"
        ],
        "title": "ApiKeysListResult",
        "type": "object"
      },
      "AuthError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "AuthError",
        "type": "object"
      },
      "AuthResult": {
        "description": "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 SERVICE REQUEST/RESPONSE TYPES \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Auth service types",
        "properties": {
          "expires_in": {
            "type": "integer"
          },
          "refresh_token": {
            "type": "string"
          },
          "token": {
            "type": "string"
          },
          "token_type": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/UserInfo"
          }
        },
        "required": [
          "token",
          "refresh_token",
          "token_type",
          "expires_in",
          "user"
        ],
        "title": "AuthResult",
        "type": "object"
      },
      "BalanceResult": {
        "properties": {
          "account_id": {
            "type": "string"
          },
          "balance": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "balance",
          "currency"
        ],
        "title": "BalanceResult",
        "type": "object"
      },
      "BusinessDocument": {
        "description": "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 BUSINESS DOCUMENTS \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Uploaded or generated business document [rootobject]",
        "properties": {
          "company_id": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "document_type": {
            "$ref": "#/components/schemas/BusinessDocumentType"
          },
          "expiry_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "file_url": {
            "type": "string"
          },
          "is_official": {
            "type": "boolean"
          },
          "issued_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "updated_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "uploaded_by": {
            "type": "string"
          }
        },
        "required": [
          "sid",
          "company_id",
          "document_type",
          "name",
          "is_official",
          "created_at",
          "updated_at"
        ],
        "title": "BusinessDocument",
        "type": "object"
      },
      "BusinessDocumentDetailResult": {
        "properties": {
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "document_id": {
            "type": "string"
          },
          "document_type": {
            "$ref": "#/components/schemas/BusinessDocumentType"
          },
          "expiry_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "file_url": {
            "type": "string"
          },
          "is_official": {
            "type": "boolean"
          },
          "issued_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "document_id",
          "company_id",
          "document_type",
          "name",
          "is_official",
          "created_at"
        ],
        "title": "BusinessDocumentDetailResult",
        "type": "object"
      },
      "BusinessDocumentError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "BusinessDocumentError",
        "type": "object"
      },
      "BusinessDocumentListResult": {
        "properties": {
          "documents": {
            "items": {
              "$ref": "#/components/schemas/BusinessDocumentDetailResult"
            },
            "type": "array"
          }
        },
        "required": [
          "documents"
        ],
        "title": "BusinessDocumentListResult",
        "type": "object"
      },
      "BusinessDocumentResult": {
        "description": "Business document service types",
        "properties": {
          "document_id": {
            "type": "string"
          },
          "document_type": {
            "$ref": "#/components/schemas/BusinessDocumentType"
          }
        },
        "required": [
          "document_id",
          "document_type"
        ],
        "title": "BusinessDocumentResult",
        "type": "object"
      },
      "BusinessDocumentType": {
        "description": "Business document type",
        "enum": [
          "certificate_of_incorporation",
          "business_license",
          "memorandum",
          "articles",
          "resolution",
          "other"
        ],
        "title": "BusinessDocumentType",
        "type": "string"
      },
      "ChangePasswordResult": {
        "properties": {
          "message": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "title": "ChangePasswordResult",
        "type": "object"
      },
      "ClickPesaResult": {
        "properties": {
          "expires_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "order_id": {
            "type": "string"
          },
          "payment_id": {
            "type": "string"
          },
          "payment_url": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/PaymentStatus"
          }
        },
        "required": [
          "payment_id",
          "order_id",
          "payment_url",
          "status",
          "expires_at"
        ],
        "title": "ClickPesaResult",
        "type": "object"
      },
      "ClickPesaWebhookData": {
        "properties": {
          "amount": {
            "type": "number"
          },
          "checksum": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "event": {
            "type": "string"
          },
          "order_id": {
            "type": "string"
          },
          "paid_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "payment_method": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "transaction_id": {
            "type": "string"
          }
        },
        "required": [
          "event",
          "order_id",
          "reference",
          "amount",
          "currency",
          "status"
        ],
        "title": "ClickPesaWebhookData",
        "type": "object"
      },
      "CompaniesListResult": {
        "description": "Company service types",
        "properties": {
          "companies": {
            "items": {
              "$ref": "#/components/schemas/FreeZoneCompany"
            },
            "type": "array"
          },
          "page": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "page_size": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "total": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        },
        "required": [
          "companies",
          "total",
          "page",
          "page_size"
        ],
        "title": "CompaniesListResult",
        "type": "object"
      },
      "CompanyCardResult": {
        "properties": {
          "company_id": {
            "type": "string"
          },
          "company_type": {
            "$ref": "#/components/schemas/CompanyType"
          },
          "established": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "keypair_version": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "public_key": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/CompanyStatus"
          }
        },
        "required": [
          "company_id",
          "name",
          "company_type",
          "status",
          "established"
        ],
        "title": "CompanyCardResult",
        "type": "object"
      },
      "CompanyCreateData": {
        "description": "Company service types",
        "properties": {
          "company_type": {
            "$ref": "#/components/schemas/CompanyType"
          },
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "resident_id": {
            "type": "string"
          },
          "trading_name": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "company_type",
          "resident_id"
        ],
        "title": "CompanyCreateData",
        "type": "object"
      },
      "CompanyError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "CompanyError",
        "type": "object"
      },
      "CompanyMessage": {
        "description": "Company message entity [rootobject]",
        "properties": {
          "action_label": {
            "type": "string"
          },
          "action_url": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "category": {
            "$ref": "#/components/schemas/MessageCategory"
          },
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "is_read": {
            "type": "boolean"
          },
          "message_type": {
            "$ref": "#/components/schemas/MessageType"
          },
          "sid": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        "required": [
          "sid",
          "company_id",
          "title",
          "body",
          "message_type",
          "is_read",
          "created_at",
          "updated_at"
        ],
        "title": "CompanyMessage",
        "type": "object"
      },
      "CompanyPricingConfig": {
        "description": "Company pricing configuration (for display)",
        "properties": {
          "company_type": {
            "$ref": "#/components/schemas/CompanyType"
          },
          "has_shareholder_fee": {
            "type": "boolean"
          },
          "holder_limit": {
            "description": "The most shareholders or members registration and quotes allow for this company type; 0 is no limit. max_shareholders is the pricing entry and may differ.",
            "maximum": 2147483647,
            "minimum": 0,
            "type": "integer"
          },
          "max_shareholders": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "monthly_fee": {
            "type": "number"
          },
          "setup_fee": {
            "type": "number"
          },
          "shareholder_tiers": {
            "items": {
              "$ref": "#/components/schemas/ShareholderFeeTier"
            },
            "type": "array"
          }
        },
        "required": [
          "company_type",
          "setup_fee",
          "monthly_fee",
          "max_shareholders",
          "has_shareholder_fee",
          "shareholder_tiers",
          "holder_limit"
        ],
        "title": "CompanyPricingConfig",
        "type": "object"
      },
      "CompanyPricingResult": {
        "properties": {
          "annual_fee": {
            "type": "number"
          },
          "company_type": {
            "$ref": "#/components/schemas/CompanyType"
          },
          "currency": {
            "type": "string"
          },
          "registration_fee": {
            "type": "number"
          }
        },
        "required": [
          "registration_fee",
          "annual_fee",
          "currency",
          "company_type"
        ],
        "title": "CompanyPricingResult",
        "type": "object"
      },
      "CompanyResult": {
        "properties": {
          "company": {
            "$ref": "#/components/schemas/FreeZoneCompany"
          }
        },
        "required": [
          "company"
        ],
        "title": "CompanyResult",
        "type": "object"
      },
      "CompanyStatus": {
        "description": "Free Zone Company status",
        "enum": [
          "active",
          "inactive",
          "suspended"
        ],
        "title": "CompanyStatus",
        "type": "string"
      },
      "CompanySubscriptionPlan": {
        "description": "Company subscription plan for recurring fees",
        "enum": [
          "monthly",
          "one_year",
          "two_years"
        ],
        "title": "CompanySubscriptionPlan",
        "type": "string"
      },
      "CompanyType": {
        "description": "Company types available in the freezone",
        "enum": [
          "single_fzc",
          "startup_fzc",
          "growth_fzc",
          "global_fzc",
          "coop_standard_fzc"
        ],
        "title": "CompanyType",
        "type": "string"
      },
      "CompanyUpdateData": {
        "properties": {
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/CompanyStatus"
          },
          "trading_name": {
            "type": "string"
          }
        },
        "title": "CompanyUpdateData",
        "type": "object"
      },
      "CompanyVerificationResult": {
        "properties": {
          "company_id": {
            "type": "string"
          },
          "company_type": {
            "$ref": "#/components/schemas/CompanyType"
          },
          "established": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "has_full_access": {
            "type": "boolean"
          },
          "keypair_version": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "public_key": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/CompanyStatus"
          },
          "valid": {
            "type": "boolean"
          },
          "verified_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "verified_by": {
            "type": "string"
          }
        },
        "required": [
          "valid",
          "company_id",
          "status",
          "verified_at",
          "has_full_access"
        ],
        "title": "CompanyVerificationResult",
        "type": "object"
      },
      "ConfirmResetResult": {
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ],
        "title": "ConfirmResetResult",
        "type": "object"
      },
      "Contract": {
        "description": "Business Contract entity [rootobject]",
        "properties": {
          "contract_type": {
            "type": "string"
          },
          "counterparty": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "end_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "fzc_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "start_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ContractStatus"
          },
          "total_value": {
            "type": "number"
          },
          "updated_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        "required": [
          "sid",
          "fzc_id",
          "name",
          "contract_type",
          "counterparty",
          "status",
          "start_date",
          "created_at",
          "updated_at"
        ],
        "title": "Contract",
        "type": "object"
      },
      "ContractCreateData": {
        "description": "Contract service types",
        "properties": {
          "content": {
            "type": "string"
          },
          "contract_type": {
            "type": "string"
          },
          "parties": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "title",
          "content",
          "contract_type",
          "parties"
        ],
        "title": "ContractCreateData",
        "type": "object"
      },
      "ContractError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "ContractError",
        "type": "object"
      },
      "ContractResult": {
        "properties": {
          "contract": {
            "$ref": "#/components/schemas/Contract"
          }
        },
        "required": [
          "contract"
        ],
        "title": "ContractResult",
        "type": "object"
      },
      "ContractSignature": {
        "description": "Contract Signature entity [rootobject]",
        "properties": {
          "content_sha256": {
            "description": "home#1007: SHA-256 (hex) of the signed text; absent on a row signed before it was recorded",
            "type": "string"
          },
          "contract_id": {
            "type": "string"
          },
          "contract_version": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "ip_address": {
            "type": "string"
          },
          "keypair_version": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "public_key_id": {
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "signature": {
            "type": "string"
          },
          "signed_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        },
        "required": [
          "sid",
          "user_id",
          "contract_id",
          "contract_version",
          "signature",
          "public_key_id",
          "keypair_version",
          "signed_at",
          "created_at"
        ],
        "title": "ContractSignature",
        "type": "object"
      },
      "ContractStatus": {
        "description": "Contract status",
        "enum": [
          "draft",
          "pending_signature",
          "active",
          "expired",
          "archived"
        ],
        "title": "ContractStatus",
        "type": "string"
      },
      "ContractTemplate": {
        "description": "Contract Template entity [rootobject]",
        "properties": {
          "category": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "sid": {
            "type": "string"
          }
        },
        "required": [
          "sid",
          "name",
          "description",
          "category",
          "content",
          "created_at"
        ],
        "title": "ContractTemplate",
        "type": "object"
      },
      "ContractsListResult": {
        "description": "Contract service types",
        "properties": {
          "contracts": {
            "items": {
              "$ref": "#/components/schemas/Contract"
            },
            "type": "array"
          }
        },
        "required": [
          "contracts"
        ],
        "title": "ContractsListResult",
        "type": "object"
      },
      "CreateCompanyData": {
        "properties": {
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "apply_early_bird": {
            "type": "boolean"
          },
          "auto_renewal": {
            "type": "boolean"
          },
          "company_type": {
            "$ref": "#/components/schemas/CompanyType"
          },
          "description": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "shareholders": {
            "items": {
              "$ref": "#/components/schemas/ShareholderData"
            },
            "type": "array"
          },
          "subscription_plan": {
            "$ref": "#/components/schemas/CompanySubscriptionPlan"
          },
          "website": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "company_type",
          "description",
          "address",
          "shareholders",
          "subscription_plan",
          "auto_renewal",
          "apply_early_bird",
          "password"
        ],
        "title": "CreateCompanyData",
        "type": "object"
      },
      "CreateContractData": {
        "properties": {
          "contract_type": {
            "type": "string"
          },
          "counterparty": {
            "type": "string"
          },
          "end_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "start_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "total_value": {
            "type": "number"
          }
        },
        "required": [
          "name",
          "contract_type",
          "counterparty",
          "start_date"
        ],
        "title": "CreateContractData",
        "type": "object"
      },
      "CreateExpenseData": {
        "properties": {
          "amount": {
            "type": "number"
          },
          "category": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "expense_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "receipt_number": {
            "type": "string"
          },
          "receipt_url": {
            "type": "string"
          },
          "vendor_name": {
            "type": "string"
          }
        },
        "required": [
          "receipt_number",
          "vendor_name",
          "description",
          "amount",
          "currency",
          "category",
          "expense_date"
        ],
        "title": "CreateExpenseData",
        "type": "object"
      },
      "CreateInvoiceData": {
        "properties": {
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "due_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "invoice_number": {
            "type": "string"
          },
          "issue_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "line_items": {
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "type": "array"
          },
          "tax_amount": {
            "type": "number"
          }
        },
        "required": [
          "invoice_number",
          "amount",
          "currency",
          "tax_amount",
          "description",
          "line_items",
          "issue_date",
          "due_date"
        ],
        "title": "CreateInvoiceData",
        "type": "object"
      },
      "CreateLinkResult": {
        "properties": {
          "expires_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "link_id": {
            "type": "string"
          },
          "single_use": {
            "type": "boolean"
          },
          "token": {
            "type": "string"
          },
          "verification_url": {
            "type": "string"
          }
        },
        "required": [
          "link_id",
          "token",
          "verification_url",
          "expires_at",
          "single_use"
        ],
        "title": "CreateLinkResult",
        "type": "object"
      },
      "CreateResidentData": {
        "properties": {
          "email": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "kyc_provider_id": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          }
        },
        "required": [
          "email",
          "first_name",
          "last_name",
          "phone"
        ],
        "title": "CreateResidentData",
        "type": "object"
      },
      "CreateTreasuryAccountData": {
        "properties": {
          "account_number": {
            "type": "string"
          },
          "bank_name": {
            "type": "string"
          },
          "bic": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "iban": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/TreasuryAccountKind"
          },
          "name": {
            "type": "string"
          },
          "network": {
            "type": "string"
          },
          "wallet_address": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "kind",
          "currency"
        ],
        "title": "CreateTreasuryAccountData",
        "type": "object"
      },
      "CreditBalance": {
        "description": "Credit balance per user [rootobject]",
        "properties": {
          "balance": {
            "type": "number"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "last_top_up_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "lifetime_earned": {
            "type": "number"
          },
          "lifetime_spent": {
            "type": "number"
          },
          "sid": {
            "type": "string"
          },
          "updated_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        },
        "required": [
          "sid",
          "user_id",
          "balance",
          "lifetime_earned",
          "lifetime_spent",
          "created_at",
          "updated_at"
        ],
        "title": "CreditBalance",
        "type": "object"
      },
      "CreditBalanceListResult": {
        "description": "Credit service types (aliases for generator compatibility)",
        "properties": {
          "balances": {
            "items": {
              "$ref": "#/components/schemas/CreditBalance"
            },
            "type": "array"
          }
        },
        "required": [
          "balances"
        ],
        "title": "CreditBalanceListResult",
        "type": "object"
      },
      "CreditBalanceResult": {
        "description": "Credit service types",
        "properties": {
          "balance": {
            "type": "number"
          },
          "last_top_up_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "lifetime_earned": {
            "type": "number"
          },
          "lifetime_spent": {
            "type": "number"
          },
          "user_id": {
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "balance",
          "lifetime_earned",
          "lifetime_spent"
        ],
        "title": "CreditBalanceResult",
        "type": "object"
      },
      "CreditError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "CreditError",
        "type": "object"
      },
      "CreditPlanInfo": {
        "properties": {
          "code": {
            "type": "string"
          },
          "discount_percent": {
            "type": "number"
          },
          "label": {
            "type": "string"
          },
          "monthly_effective": {
            "type": "number"
          },
          "months": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "total_cost": {
            "type": "number"
          }
        },
        "required": [
          "code",
          "label",
          "months",
          "total_cost",
          "monthly_effective",
          "discount_percent"
        ],
        "title": "CreditPlanInfo",
        "type": "object"
      },
      "CreditPricingResult": {
        "properties": {
          "currency": {
            "type": "string"
          },
          "kyc_cost": {
            "type": "number"
          },
          "monthly_subscription": {
            "type": "number"
          },
          "plans": {
            "items": {
              "$ref": "#/components/schemas/CreditPlanInfo"
            },
            "type": "array"
          },
          "welcome_bonus": {
            "type": "number"
          }
        },
        "required": [
          "kyc_cost",
          "monthly_subscription",
          "welcome_bonus",
          "currency",
          "plans"
        ],
        "title": "CreditPricingResult",
        "type": "object"
      },
      "CreditTransaction": {
        "description": "Credit transaction ledger entry [rootobject]",
        "properties": {
          "amount": {
            "type": "number"
          },
          "balance_after": {
            "type": "number"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "reference_id": {
            "type": "string"
          },
          "reference_type": {
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/CreditTransactionStatus"
          },
          "tx_type": {
            "$ref": "#/components/schemas/CreditTransactionType"
          },
          "user_id": {
            "type": "string"
          }
        },
        "required": [
          "sid",
          "user_id",
          "tx_type",
          "amount",
          "balance_after",
          "currency",
          "description",
          "status",
          "created_at"
        ],
        "title": "CreditTransaction",
        "type": "object"
      },
      "CreditTransactionDetail": {
        "properties": {
          "amount": {
            "type": "number"
          },
          "balance_after": {
            "type": "number"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "reference_id": {
            "type": "string"
          },
          "reference_type": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/CreditTransactionStatus"
          },
          "transaction_id": {
            "type": "string"
          },
          "tx_type": {
            "$ref": "#/components/schemas/CreditTransactionType"
          }
        },
        "required": [
          "transaction_id",
          "tx_type",
          "amount",
          "balance_after",
          "currency",
          "description",
          "status",
          "created_at"
        ],
        "title": "CreditTransactionDetail",
        "type": "object"
      },
      "CreditTransactionListResult": {
        "properties": {
          "transactions": {
            "items": {
              "$ref": "#/components/schemas/CreditTransaction"
            },
            "type": "array"
          }
        },
        "required": [
          "transactions"
        ],
        "title": "CreditTransactionListResult",
        "type": "object"
      },
      "CreditTransactionResult": {
        "properties": {
          "amount": {
            "type": "number"
          },
          "balance_after": {
            "type": "number"
          },
          "status": {
            "$ref": "#/components/schemas/CreditTransactionStatus"
          },
          "transaction_id": {
            "type": "string"
          },
          "tx_type": {
            "$ref": "#/components/schemas/CreditTransactionType"
          }
        },
        "required": [
          "transaction_id",
          "tx_type",
          "amount",
          "balance_after",
          "status"
        ],
        "title": "CreditTransactionResult",
        "type": "object"
      },
      "CreditTransactionStatus": {
        "description": "Credit transaction status",
        "enum": [
          "pending",
          "completed",
          "failed"
        ],
        "title": "CreditTransactionStatus",
        "type": "string"
      },
      "CreditTransactionType": {
        "description": "Credit transaction type",
        "enum": [
          "top_up",
          "deduction",
          "refund",
          "bonus",
          "expiry"
        ],
        "title": "CreditTransactionType",
        "type": "string"
      },
      "CreditTransactionsListResult": {
        "properties": {
          "page": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "page_size": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "total": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "transactions": {
            "items": {
              "$ref": "#/components/schemas/CreditTransactionDetail"
            },
            "type": "array"
          }
        },
        "required": [
          "transactions",
          "total",
          "page",
          "page_size"
        ],
        "title": "CreditTransactionsListResult",
        "type": "object"
      },
      "CryptoWallet": {
        "description": "Crypto wallet for companies",
        "properties": {
          "chain": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "public_key": {
            "type": "string"
          }
        },
        "required": [
          "public_key",
          "chain",
          "label"
        ],
        "title": "CryptoWallet",
        "type": "object"
      },
      "DeleteBusinessDocumentResult": {
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ],
        "title": "DeleteBusinessDocumentResult",
        "type": "object"
      },
      "DeleteLinksResult": {
        "properties": {
          "deleted_count": {
            "type": "integer"
          }
        },
        "required": [
          "deleted_count"
        ],
        "title": "DeleteLinksResult",
        "type": "object"
      },
      "DeleteResult": {
        "properties": {
          "message": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "title": "DeleteResult",
        "type": "object"
      },
      "DigitalResident": {
        "description": "Digital Resident entity [rootobject]",
        "properties": {
          "auto_renewal": {
            "type": "boolean"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "encrypted_private_key": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "keypair_version": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "kyc_provider_id": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "public_key": {
            "type": "string"
          },
          "resident_id": {
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ResidentStatus"
          },
          "subscription_end_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "subscription_plan": {
            "type": "string"
          },
          "subscription_start_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "updated_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        },
        "required": [
          "sid",
          "resident_id",
          "user_id",
          "email",
          "first_name",
          "last_name",
          "kyc_provider_id",
          "phone",
          "status",
          "keypair_version",
          "auto_renewal",
          "created_at",
          "updated_at"
        ],
        "title": "DigitalResident",
        "type": "object"
      },
      "DirectorData": {
        "properties": {
          "appointed_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "position": {
            "type": "string"
          },
          "resident_id": {
            "type": "string"
          }
        },
        "required": [
          "resident_id",
          "position"
        ],
        "title": "DirectorData",
        "type": "object"
      },
      "DividendDetailResult": {
        "properties": {
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "distribution_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "dividend_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/DividendStatus"
          },
          "total_amount": {
            "type": "number"
          }
        },
        "required": [
          "dividend_id",
          "company_id",
          "total_amount",
          "currency",
          "distribution_date",
          "status",
          "created_at"
        ],
        "title": "DividendDetailResult",
        "type": "object"
      },
      "DividendDistribution": {
        "description": "Dividend distribution [rootobject]",
        "properties": {
          "approved_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "company_id": {
            "type": "string"
          },
          "completed_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "distribution_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "initiated_by": {
            "type": "string"
          },
          "proposal_id": {
            "type": "string"
          },
          "requires_vote": {
            "type": "boolean"
          },
          "sid": {
            "type": "string"
          },
          "source_account_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/DividendStatus"
          },
          "total_amount": {
            "type": "number"
          },
          "updated_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        "required": [
          "sid",
          "company_id",
          "total_amount",
          "currency",
          "source_account_id",
          "distribution_date",
          "status",
          "requires_vote",
          "initiated_by",
          "created_at",
          "updated_at"
        ],
        "title": "DividendDistribution",
        "type": "object"
      },
      "DividendDistributionListResult": {
        "properties": {
          "distributions": {
            "items": {
              "$ref": "#/components/schemas/DividendDistribution"
            },
            "type": "array"
          }
        },
        "required": [
          "distributions"
        ],
        "title": "DividendDistributionListResult",
        "type": "object"
      },
      "DividendDistributionResult": {
        "description": "Treasury operations types (aliases for generator compatibility)",
        "properties": {
          "distribution": {
            "$ref": "#/components/schemas/DividendDistribution"
          }
        },
        "required": [
          "distribution"
        ],
        "title": "DividendDistributionResult",
        "type": "object"
      },
      "DividendListResult": {
        "properties": {
          "dividends": {
            "items": {
              "$ref": "#/components/schemas/DividendDetailResult"
            },
            "type": "array"
          }
        },
        "required": [
          "dividends"
        ],
        "title": "DividendListResult",
        "type": "object"
      },
      "DividendPayment": {
        "description": "Individual dividend payment [rootobject]",
        "properties": {
          "amount": {
            "type": "number"
          },
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "destination_account_id": {
            "type": "string"
          },
          "distribution_id": {
            "type": "string"
          },
          "ownership_percentage": {
            "type": "number"
          },
          "paid_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "recipient_id": {
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "transaction_id": {
            "type": "string"
          }
        },
        "required": [
          "sid",
          "distribution_id",
          "company_id",
          "recipient_id",
          "ownership_percentage",
          "amount",
          "currency",
          "created_at"
        ],
        "title": "DividendPayment",
        "type": "object"
      },
      "DividendPaymentListResult": {
        "properties": {
          "payments": {
            "items": {
              "$ref": "#/components/schemas/DividendPayment"
            },
            "type": "array"
          }
        },
        "required": [
          "payments"
        ],
        "title": "DividendPaymentListResult",
        "type": "object"
      },
      "DividendPaymentResult": {
        "properties": {
          "payment": {
            "$ref": "#/components/schemas/DividendPayment"
          }
        },
        "required": [
          "payment"
        ],
        "title": "DividendPaymentResult",
        "type": "object"
      },
      "DividendResult": {
        "properties": {
          "dividend_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/DividendStatus"
          }
        },
        "required": [
          "dividend_id",
          "status"
        ],
        "title": "DividendResult",
        "type": "object"
      },
      "DividendStatus": {
        "description": "Dividend distribution status",
        "enum": [
          "proposed",
          "approved",
          "processing",
          "completed",
          "cancelled"
        ],
        "title": "DividendStatus",
        "type": "string"
      },
      "DocumentType": {
        "description": "Document types for signing",
        "enum": [
          "contract",
          "agreement",
          "invoice",
          "certificate",
          "other"
        ],
        "title": "DocumentType",
        "type": "string"
      },
      "EmailError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "EmailError",
        "type": "object"
      },
      "EmailVerificationToken": {
        "description": "Email verification token [rootobject]",
        "properties": {
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "expires_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "token": {
            "type": "string"
          },
          "used": {
            "type": "boolean"
          },
          "user_id": {
            "type": "string"
          }
        },
        "required": [
          "sid",
          "user_id",
          "token",
          "expires_at",
          "used",
          "created_at"
        ],
        "title": "EmailVerificationToken",
        "type": "object"
      },
      "EntityType": {
        "description": "\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 ZANZIBAR DIGITAL FREEZONE - OSIS Schema v2.0 \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550  A complete schema-driven system for digital residency and company management. Features: - Type-safe enums for all categorical data - Full-text search on relevant fields - Declarative business rules - Cryptographic identity with key versioning  \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 ENUMS - Type-safe categorical values \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Entity type for polymorphic references (resident or company)",
        "enum": [
          "resident",
          "company"
        ],
        "title": "EntityType",
        "type": "string"
      },
      "ExchangeDetailResult": {
        "properties": {
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "exchange_id": {
            "type": "string"
          },
          "exchange_rate": {
            "type": "number"
          },
          "from_amount": {
            "type": "number"
          },
          "from_currency": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ExchangeStatus"
          },
          "to_amount": {
            "type": "number"
          },
          "to_currency": {
            "type": "string"
          }
        },
        "required": [
          "exchange_id",
          "from_amount",
          "from_currency",
          "to_amount",
          "to_currency",
          "exchange_rate",
          "status",
          "created_at"
        ],
        "title": "ExchangeDetailResult",
        "type": "object"
      },
      "ExchangeListResult": {
        "properties": {
          "exchanges": {
            "items": {
              "$ref": "#/components/schemas/ExchangeDetailResult"
            },
            "type": "array"
          }
        },
        "required": [
          "exchanges"
        ],
        "title": "ExchangeListResult",
        "type": "object"
      },
      "ExchangeQuoteResult": {
        "properties": {
          "exchange_rate": {
            "type": "number"
          },
          "expires_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "fee_amount": {
            "type": "number"
          },
          "fee_percentage": {
            "type": "number"
          },
          "from_amount": {
            "type": "number"
          },
          "from_currency": {
            "type": "string"
          },
          "to_amount": {
            "type": "number"
          },
          "to_currency": {
            "type": "string"
          }
        },
        "required": [
          "from_currency",
          "to_currency",
          "from_amount",
          "to_amount",
          "exchange_rate",
          "fee_percentage",
          "fee_amount",
          "expires_at"
        ],
        "title": "ExchangeQuoteResult",
        "type": "object"
      },
      "ExchangeResult": {
        "properties": {
          "exchange_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ExchangeStatus"
          }
        },
        "required": [
          "exchange_id",
          "status"
        ],
        "title": "ExchangeResult",
        "type": "object"
      },
      "ExchangeStatus": {
        "description": "Exchange transaction status",
        "enum": [
          "pending",
          "processing",
          "completed",
          "failed",
          "expired"
        ],
        "title": "ExchangeStatus",
        "type": "string"
      },
      "ExchangeTransaction": {
        "description": "Crypto exchange transaction [rootobject]",
        "properties": {
          "completed_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "exchange_rate": {
            "type": "number"
          },
          "fee_amount": {
            "type": "number"
          },
          "fee_percentage": {
            "type": "number"
          },
          "from_account_id": {
            "type": "string"
          },
          "from_amount": {
            "type": "number"
          },
          "from_currency": {
            "type": "string"
          },
          "initiated_by": {
            "type": "string"
          },
          "owner_id": {
            "type": "string"
          },
          "owner_type": {
            "$ref": "#/components/schemas/EntityType"
          },
          "rate_expires_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ExchangeStatus"
          },
          "to_account_id": {
            "type": "string"
          },
          "to_amount": {
            "type": "number"
          },
          "to_currency": {
            "type": "string"
          },
          "updated_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        "required": [
          "sid",
          "owner_type",
          "owner_id",
          "from_account_id",
          "to_account_id",
          "from_amount",
          "from_currency",
          "to_amount",
          "to_currency",
          "exchange_rate",
          "fee_percentage",
          "fee_amount",
          "status",
          "rate_expires_at",
          "initiated_by",
          "created_at",
          "updated_at"
        ],
        "title": "ExchangeTransaction",
        "type": "object"
      },
      "ExchangeTransactionListResult": {
        "properties": {
          "exchanges": {
            "items": {
              "$ref": "#/components/schemas/ExchangeTransaction"
            },
            "type": "array"
          }
        },
        "required": [
          "exchanges"
        ],
        "title": "ExchangeTransactionListResult",
        "type": "object"
      },
      "ExchangeTransactionResult": {
        "properties": {
          "exchange": {
            "$ref": "#/components/schemas/ExchangeTransaction"
          }
        },
        "required": [
          "exchange"
        ],
        "title": "ExchangeTransactionResult",
        "type": "object"
      },
      "ExpenseResult": {
        "properties": {
          "expense": {
            "$ref": "#/components/schemas/FreeZoneExpense"
          }
        },
        "required": [
          "expense"
        ],
        "title": "ExpenseResult",
        "type": "object"
      },
      "ExpenseStatus": {
        "description": "Expense status",
        "enum": [
          "draft",
          "submitted",
          "approved",
          "rejected"
        ],
        "title": "ExpenseStatus",
        "type": "string"
      },
      "ExpensesListResult": {
        "description": "Expense service types",
        "properties": {
          "expenses": {
            "items": {
              "$ref": "#/components/schemas/FreeZoneExpense"
            },
            "type": "array"
          }
        },
        "required": [
          "expenses"
        ],
        "title": "ExpensesListResult",
        "type": "object"
      },
      "FeeBreakdown": {
        "description": "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 PRICING TYPES - Company pricing and subscription \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Fee breakdown for a single fee component",
        "properties": {
          "base": {
            "type": "number"
          },
          "discount": {
            "type": "number"
          },
          "discount_label": {
            "type": "string"
          },
          "final": {
            "type": "number"
          },
          "months": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "quantity": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "subtotal": {
            "type": "number"
          }
        },
        "required": [
          "base",
          "months",
          "quantity",
          "subtotal",
          "discount",
          "discount_label",
          "final"
        ],
        "title": "FeeBreakdown",
        "type": "object"
      },
      "FinancialReport": {
        "description": "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 FINANCIAL REPORTS \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Generated financial report [rootobject]",
        "properties": {
          "as_of_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "company_id": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "generated_by": {
            "type": "string"
          },
          "period_end": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "period_start": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "report_type": {
            "$ref": "#/components/schemas/FinancialReportType"
          },
          "sid": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "sid",
          "company_id",
          "report_type",
          "title",
          "content",
          "generated_by",
          "created_at"
        ],
        "title": "FinancialReport",
        "type": "object"
      },
      "FinancialReportDetailResult": {
        "properties": {
          "as_of_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "company_id": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "period_end": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "period_start": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "report_id": {
            "type": "string"
          },
          "report_type": {
            "$ref": "#/components/schemas/FinancialReportType"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "report_id",
          "company_id",
          "report_type",
          "title",
          "content",
          "created_at"
        ],
        "title": "FinancialReportDetailResult",
        "type": "object"
      },
      "FinancialReportListResult": {
        "properties": {
          "reports": {
            "items": {
              "$ref": "#/components/schemas/FinancialReportDetailResult"
            },
            "type": "array"
          }
        },
        "required": [
          "reports"
        ],
        "title": "FinancialReportListResult",
        "type": "object"
      },
      "FinancialReportResult": {
        "description": "Report service types",
        "properties": {
          "report_id": {
            "type": "string"
          },
          "report_type": {
            "$ref": "#/components/schemas/FinancialReportType"
          }
        },
        "required": [
          "report_id",
          "report_type"
        ],
        "title": "FinancialReportResult",
        "type": "object"
      },
      "FinancialReportType": {
        "description": "Financial report type",
        "enum": [
          "balance_sheet",
          "income_statement",
          "cash_flow",
          "trial_balance"
        ],
        "title": "FinancialReportType",
        "type": "string"
      },
      "FreeZoneCompany": {
        "description": "Free Zone Company entity [rootobject]",
        "properties": {
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "auto_renewal": {
            "type": "boolean"
          },
          "company_id": {
            "type": "string"
          },
          "company_type": {
            "$ref": "#/components/schemas/CompanyType"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "crypto_wallets": {
            "items": {
              "$ref": "#/components/schemas/CryptoWallet"
            },
            "type": "array"
          },
          "description": {
            "type": "string"
          },
          "early_bird_applied": {
            "type": "boolean"
          },
          "email": {
            "type": "string"
          },
          "encrypted_private_key": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          },
          "keypair_version": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "monthly_fee_rate": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "prepaid_discount_applied": {
            "type": "number"
          },
          "public_key": {
            "type": "string"
          },
          "registration_number": {
            "type": "string"
          },
          "setup_fee_paid": {
            "type": "number"
          },
          "shareholder_fee_rate": {
            "type": "number"
          },
          "shareholders": {
            "items": {
              "$ref": "#/components/schemas/ShareholderData"
            },
            "type": "array"
          },
          "sid": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/CompanyStatus"
          },
          "subscription_end_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "subscription_plan": {
            "$ref": "#/components/schemas/CompanySubscriptionPlan"
          },
          "subscription_start_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "tax_id": {
            "type": "string"
          },
          "updated_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "voting_model": {
            "$ref": "#/components/schemas/VotingModel"
          },
          "website": {
            "type": "string"
          },
          "renewal_hold": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CompanyRenewalHold"
              },
              {
                "type": "null"
              }
            ]
          },
          "renewal_revision": {
            "type": "integer",
            "format": "uint64",
            "minimum": 0
          },
          "setup_fee_paid_known": {
            "type": "boolean",
            "description": "True only when the original paid setup component is verified. Missing or false means unavailable."
          }
        },
        "required": [
          "sid",
          "company_id",
          "user_id",
          "name",
          "company_type",
          "voting_model",
          "description",
          "registration_number",
          "tax_id",
          "address",
          "shareholders",
          "crypto_wallets",
          "status",
          "keypair_version",
          "auto_renewal",
          "setup_fee_paid",
          "monthly_fee_rate",
          "shareholder_fee_rate",
          "prepaid_discount_applied",
          "early_bird_applied",
          "created_at",
          "updated_at",
          "renewal_revision"
        ],
        "title": "FreeZoneCompany",
        "type": "object"
      },
      "FreeZoneExpense": {
        "description": "Free Zone Expense entity [rootobject]",
        "properties": {
          "amount": {
            "type": "number"
          },
          "category": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "expense_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "fzc_id": {
            "type": "string"
          },
          "receipt_number": {
            "type": "string"
          },
          "receipt_url": {
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ExpenseStatus"
          },
          "updated_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "vendor_name": {
            "type": "string"
          }
        },
        "required": [
          "sid",
          "fzc_id",
          "receipt_number",
          "vendor_name",
          "description",
          "amount",
          "currency",
          "category",
          "expense_date",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "FreeZoneExpense",
        "type": "object"
      },
      "FreeZoneInvoice": {
        "description": "Free Zone Invoice entity [rootobject]",
        "properties": {
          "amount": {
            "type": "number"
          },
          "beneficiary_id": {
            "type": "string"
          },
          "beneficiary_type": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "due_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "fzc_id": {
            "type": "string"
          },
          "invoice_number": {
            "type": "string"
          },
          "issue_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "line_items": {
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "type": "array"
          },
          "payer_entity_id": {
            "type": "string"
          },
          "payer_entity_type": {
            "type": "string"
          },
          "payer_user_id": {
            "type": "string"
          },
          "public_company_id": {
            "description": "Public id of the company the invoice is for, when it is for a company that has one. Returned only to the partner gateway's own key by invoiceservice.list_received; never stored on the invoice and never returned to any other caller.",
            "type": "string"
          },
          "public_invoice_number": {
            "description": "Opaque public invoice number, issued once and never renumbered. Returned only to the partner gateway's own key by invoiceservice.list_received; never stored on the invoice and never returned to any other caller.",
            "type": "string"
          },
          "related_invoice_id": {
            "type": "string"
          },
          "related_public_invoice_number": {
            "description": "For a credit note or reversal, the public number of the invoice it is for, when the same wallet received that invoice. Returned only to the partner gateway's own key by invoiceservice.list_received; never stored on the invoice and never returned to any other caller.",
            "type": "string"
          },
          "reseller_invoice_id": {
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "service_period_end": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "service_period_start": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "service_reference": {
            "type": "string"
          },
          "service_type": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatus"
          },
          "tax_amount": {
            "type": "number"
          },
          "updated_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "wallet_document_type": {
            "type": "string"
          },
          "wallet_effect_key": {
            "type": "string"
          },
          "wallet_purchase_state": {
            "type": "string"
          },
          "wallet_transaction_id": {
            "type": "string"
          }
        },
        "required": [
          "sid",
          "fzc_id",
          "reseller_invoice_id",
          "invoice_number",
          "amount",
          "currency",
          "tax_amount",
          "description",
          "line_items",
          "issue_date",
          "due_date",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "FreeZoneInvoice",
        "type": "object"
      },
      "FundTransfer": {
        "description": "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 TREASURY OPERATIONS \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Fund transfer between accounts [rootobject]",
        "properties": {
          "amount": {
            "type": "number"
          },
          "approval_threshold": {
            "type": "number"
          },
          "approved_by": {
            "type": "string"
          },
          "completed_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "fee_amount": {
            "type": "number"
          },
          "from_account_id": {
            "type": "string"
          },
          "initiated_by": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "requires_approval": {
            "type": "boolean"
          },
          "sid": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/FundTransferStatus"
          },
          "to_account_id": {
            "type": "string"
          },
          "to_external_address": {
            "type": "string"
          },
          "to_external_name": {
            "type": "string"
          },
          "transaction_id": {
            "type": "string"
          },
          "updated_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        "required": [
          "sid",
          "from_account_id",
          "amount",
          "currency",
          "status",
          "requires_approval",
          "approval_threshold",
          "initiated_by",
          "created_at",
          "updated_at"
        ],
        "title": "FundTransfer",
        "type": "object"
      },
      "FundTransferDetailResult": {
        "properties": {
          "amount": {
            "type": "number"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "from_account_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/FundTransferStatus"
          },
          "to_account_id": {
            "type": "string"
          },
          "to_external_address": {
            "type": "string"
          },
          "transfer_id": {
            "type": "string"
          }
        },
        "required": [
          "transfer_id",
          "from_account_id",
          "amount",
          "currency",
          "status",
          "created_at"
        ],
        "title": "FundTransferDetailResult",
        "type": "object"
      },
      "FundTransferListResult": {
        "properties": {
          "transfers": {
            "items": {
              "$ref": "#/components/schemas/FundTransferDetailResult"
            },
            "type": "array"
          }
        },
        "required": [
          "transfers"
        ],
        "title": "FundTransferListResult",
        "type": "object"
      },
      "FundTransferResult": {
        "description": "Treasury operations service types",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/FundTransferStatus"
          },
          "transfer_id": {
            "type": "string"
          }
        },
        "required": [
          "transfer_id",
          "status"
        ],
        "title": "FundTransferResult",
        "type": "object"
      },
      "FundTransferStatus": {
        "description": "Fund transfer status",
        "enum": [
          "pending",
          "processing",
          "completed",
          "failed",
          "cancelled"
        ],
        "title": "FundTransferStatus",
        "type": "string"
      },
      "GovernanceError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "GovernanceError",
        "type": "object"
      },
      "IdenfyDocumentData": {
        "description": "iDenfy document data extracted from verification",
        "properties": {
          "doc_dob": {
            "type": "string"
          },
          "doc_expiry": {
            "type": "string"
          },
          "doc_first_name": {
            "type": "string"
          },
          "doc_last_name": {
            "type": "string"
          },
          "doc_nationality": {
            "type": "string"
          },
          "doc_number": {
            "type": "string"
          },
          "doc_type": {
            "type": "string"
          }
        },
        "title": "IdenfyDocumentData",
        "type": "object"
      },
      "IdenfyWebhookData": {
        "properties": {
          "client_id": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/IdenfyDocumentData"
          },
          "scan_ref": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/IdenfyWebhookStatus"
          }
        },
        "required": [
          "client_id",
          "scan_ref",
          "status"
        ],
        "title": "IdenfyWebhookData",
        "type": "object"
      },
      "IdenfyWebhookStatus": {
        "description": "iDenfy webhook status",
        "properties": {
          "auto_document": {
            "type": "string"
          },
          "auto_face": {
            "type": "string"
          },
          "manual_document": {
            "type": "string"
          },
          "manual_face": {
            "type": "string"
          },
          "overall": {
            "type": "string"
          }
        },
        "required": [
          "overall"
        ],
        "title": "IdenfyWebhookStatus",
        "type": "object"
      },
      "IndividualVerificationResult": {
        "description": "Verification service types",
        "properties": {
          "has_full_access": {
            "type": "boolean"
          },
          "keypair_version": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "member_since": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "member_since_is_upper_bound": {
            "description": "home#962 - true when member_since is a DERIVED UPPER BOUND rather than a measured creation date. A renderer must present it as \"on or before\" when this is true.",
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "public_key": {
            "type": "string"
          },
          "resident_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ResidentStatus"
          },
          "valid": {
            "type": "boolean"
          },
          "verified_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "verified_by": {
            "type": "string"
          }
        },
        "required": [
          "valid",
          "resident_id",
          "status",
          "verified_at",
          "has_full_access",
          "member_since_is_upper_bound"
        ],
        "title": "IndividualVerificationResult",
        "type": "object"
      },
      "InviteDetailResult": {
        "properties": {
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "expires_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "invite_id": {
            "type": "string"
          },
          "invitee_email": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ShareholderInviteStatus"
          },
          "proposed_units": {
            "type": "number"
          }
        },
        "required": [
          "invite_id",
          "company_id",
          "invitee_email",
          "proposed_units",
          "status",
          "expires_at",
          "created_at"
        ],
        "title": "InviteDetailResult",
        "type": "object"
      },
      "InviteListResult": {
        "properties": {
          "invites": {
            "items": {
              "$ref": "#/components/schemas/InviteDetailResult"
            },
            "type": "array"
          }
        },
        "required": [
          "invites"
        ],
        "title": "InviteListResult",
        "type": "object"
      },
      "InviteResult": {
        "description": "Shareholder service types",
        "properties": {
          "invite_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ShareholderInviteStatus"
          },
          "token": {
            "type": "string"
          }
        },
        "required": [
          "invite_id",
          "token",
          "status"
        ],
        "title": "InviteResult",
        "type": "object"
      },
      "InvoiceCreateData": {
        "description": "Invoice service types",
        "properties": {
          "client_email": {
            "type": "string"
          },
          "client_name": {
            "type": "string"
          },
          "due_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/InvoiceLineItem"
            },
            "type": "array"
          },
          "notes": {
            "type": "string"
          }
        },
        "required": [
          "client_name",
          "client_email",
          "items",
          "due_date"
        ],
        "title": "InvoiceCreateData",
        "type": "object"
      },
      "InvoiceError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "InvoiceError",
        "type": "object"
      },
      "InvoiceLineItem": {
        "description": "Invoice line item for creating invoices",
        "properties": {
          "description": {
            "type": "string"
          },
          "quantity": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "tax_rate": {
            "type": "number"
          },
          "unit_price": {
            "type": "number"
          }
        },
        "required": [
          "description",
          "quantity",
          "unit_price"
        ],
        "title": "InvoiceLineItem",
        "type": "object"
      },
      "InvoiceResult": {
        "properties": {
          "invoice": {
            "$ref": "#/components/schemas/FreeZoneInvoice"
          }
        },
        "required": [
          "invoice"
        ],
        "title": "InvoiceResult",
        "type": "object"
      },
      "InvoiceStatus": {
        "description": "Invoice status",
        "enum": [
          "draft",
          "sent",
          "paid",
          "overdue",
          "cancelled"
        ],
        "title": "InvoiceStatus",
        "type": "string"
      },
      "InvoiceTotalsResult": {
        "properties": {
          "currency": {
            "type": "string"
          },
          "subtotal": {
            "type": "number"
          },
          "tax": {
            "type": "number"
          },
          "total": {
            "type": "number"
          }
        },
        "required": [
          "subtotal",
          "tax",
          "total",
          "currency"
        ],
        "title": "InvoiceTotalsResult",
        "type": "object"
      },
      "InvoiceUpdateData": {
        "properties": {
          "client_email": {
            "type": "string"
          },
          "client_name": {
            "type": "string"
          },
          "due_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatus"
          }
        },
        "title": "InvoiceUpdateData",
        "type": "object"
      },
      "InvoicesListResult": {
        "description": "Invoice service types",
        "properties": {
          "invoices": {
            "items": {
              "$ref": "#/components/schemas/FreeZoneInvoice"
            },
            "type": "array"
          }
        },
        "required": [
          "invoices"
        ],
        "title": "InvoicesListResult",
        "type": "object"
      },
      "KeyStatusResult": {
        "properties": {
          "has_keypair": {
            "type": "boolean"
          },
          "keypair_version": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "public_key": {
            "type": "string"
          }
        },
        "required": [
          "has_keypair"
        ],
        "title": "KeyStatusResult",
        "type": "object"
      },
      "KeypairError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "KeypairError",
        "type": "object"
      },
      "KeypairResult": {
        "description": "Keypair service types",
        "properties": {
          "keypair_version": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "public_key": {
            "type": "string"
          }
        },
        "required": [
          "public_key",
          "keypair_version"
        ],
        "title": "KeypairResult",
        "type": "object"
      },
      "KycCompleteResult": {
        "properties": {
          "complete": {
            "type": "boolean"
          },
          "verified_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        "required": [
          "complete"
        ],
        "title": "KycCompleteResult",
        "type": "object"
      },
      "KycConfirmData": {
        "properties": {
          "document_verified": {
            "type": "boolean"
          },
          "identity_verified": {
            "type": "boolean"
          },
          "liveness_verified": {
            "type": "boolean"
          },
          "verification_level": {
            "type": "string"
          }
        },
        "required": [
          "identity_verified",
          "document_verified",
          "liveness_verified",
          "verification_level"
        ],
        "title": "KycConfirmData",
        "type": "object"
      },
      "KycConfirmResult": {
        "properties": {
          "resident_activated": {
            "type": "boolean"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "resident_activated"
        ],
        "title": "KycConfirmResult",
        "type": "object"
      },
      "KycError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "KycError",
        "type": "object"
      },
      "KycSession": {
        "description": "KYC Session entity [rootobject]",
        "properties": {
          "callback_url": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "document_verified": {
            "type": "boolean"
          },
          "expires_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "idenfy_scan_ref": {
            "type": "string"
          },
          "identity_verified": {
            "type": "boolean"
          },
          "kyc_url": {
            "type": "string"
          },
          "liveness_verified": {
            "type": "boolean"
          },
          "public_key": {
            "type": "string"
          },
          "resident_id": {
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/KycStatus"
          },
          "updated_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "verification_level": {
            "type": "string"
          },
          "verified_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        "required": [
          "sid",
          "user_id",
          "resident_id",
          "public_key",
          "kyc_url",
          "status",
          "identity_verified",
          "document_verified",
          "liveness_verified",
          "expires_at",
          "created_at",
          "updated_at"
        ],
        "title": "KycSession",
        "type": "object"
      },
      "KycSessionResult": {
        "description": "KYC service types",
        "properties": {
          "expires_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "kyc_url": {
            "type": "string"
          },
          "session_id": {
            "type": "string"
          }
        },
        "required": [
          "kyc_url",
          "session_id",
          "expires_at"
        ],
        "title": "KycSessionResult",
        "type": "object"
      },
      "KycStatus": {
        "description": "KYC verification status",
        "enum": [
          "pending",
          "in_progress",
          "completed",
          "failed",
          "expired"
        ],
        "title": "KycStatus",
        "type": "string"
      },
      "KycStatusResult": {
        "properties": {
          "session_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/KycStatus"
          },
          "verification_data": {
            "$ref": "#/components/schemas/KycVerificationData"
          },
          "verified_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        "required": [
          "session_id",
          "status"
        ],
        "title": "KycStatusResult",
        "type": "object"
      },
      "KycUserStatusResult": {
        "description": "KYC service types",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/KycStatus"
          },
          "user_id": {
            "type": "string"
          },
          "verified": {
            "type": "boolean"
          },
          "verified_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "status",
          "verified"
        ],
        "title": "KycUserStatusResult",
        "type": "object"
      },
      "KycVerificationData": {
        "description": "KYC verification data",
        "properties": {
          "document_verified": {
            "type": "boolean"
          },
          "identity_verified": {
            "type": "boolean"
          },
          "liveness_verified": {
            "type": "boolean"
          },
          "verification_level": {
            "type": "string"
          }
        },
        "required": [
          "identity_verified",
          "document_verified",
          "liveness_verified",
          "verification_level"
        ],
        "title": "KycVerificationData",
        "type": "object"
      },
      "LineItem": {
        "description": "Invoice line item",
        "properties": {
          "amount": {
            "type": "number"
          },
          "description": {
            "type": "string"
          },
          "quantity": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "unit_price": {
            "type": "number"
          }
        },
        "required": [
          "description",
          "quantity",
          "unit_price",
          "amount"
        ],
        "title": "LineItem",
        "type": "object"
      },
      "LinkError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "LinkError",
        "type": "object"
      },
      "LoginResult": {
        "properties": {
          "expires_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "refresh_token": {
            "type": "string"
          },
          "token": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        },
        "required": [
          "token",
          "refresh_token",
          "user_id",
          "expires_at"
        ],
        "title": "LoginResult",
        "type": "object"
      },
      "LogoutResult": {
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ],
        "title": "LogoutResult",
        "type": "object"
      },
      "MarkAllReadResult": {
        "description": "Message service types",
        "properties": {
          "count": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        },
        "required": [
          "count"
        ],
        "title": "MarkAllReadResult",
        "type": "object"
      },
      "MarkReadResult": {
        "properties": {
          "marked_count": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "marked_count"
        ],
        "title": "MarkReadResult",
        "type": "object"
      },
      "MessageCategory": {
        "description": "Message categories",
        "enum": [
          "account",
          "registration",
          "security",
          "kyc",
          "payment",
          "company",
          "resident",
          "general"
        ],
        "title": "MessageCategory",
        "type": "string"
      },
      "MessageError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "MessageError",
        "type": "object"
      },
      "MessageResult": {
        "properties": {
          "message": {
            "$ref": "#/components/schemas/UserMessage"
          }
        },
        "required": [
          "message"
        ],
        "title": "MessageResult",
        "type": "object"
      },
      "MessageType": {
        "description": "Message types",
        "enum": [
          "system",
          "notification",
          "alert"
        ],
        "title": "MessageType",
        "type": "string"
      },
      "MessagesListResult": {
        "description": "Message service types",
        "properties": {
          "messages": {
            "items": {
              "$ref": "#/components/schemas/UserMessage"
            },
            "type": "array"
          }
        },
        "required": [
          "messages"
        ],
        "title": "MessagesListResult",
        "type": "object"
      },
      "PartnerWalletStatementLine": {
        "type": "object",
        "title": "PartnerWalletStatementLine",
        "properties": {
          "transaction_id": {
            "description": "From partner-wallet-statement/v2, a keyed hash of the ledger row. A statement of a month closed under v1 carries the unkeyed hash of the row storage id.",
            "type": "string"
          },
          "tx_type": {
            "$ref": "#/components/schemas/CreditTransactionType"
          },
          "amount": {
            "type": "number"
          },
          "balance_after": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "reference_type": {
            "type": "string"
          },
          "reference_id": {
            "description": "From v2, a public id, or ref_ followed by a keyed hash. A v1 statement passed a sequential id through and hashed anything else without a key.",
            "type": "string"
          },
          "created_at": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "transaction_id",
          "tx_type",
          "amount",
          "balance_after",
          "currency",
          "description",
          "created_at"
        ]
      },
      "PartnerWalletPeriodStatement": {
        "type": "object",
        "title": "PartnerWalletPeriodStatement",
        "properties": {
          "schema_version": {
            "description": "partner-wallet-statement/v2. A month closed under v1 is served as a v2 statement rebuilt from the same ledger with the same totals, and refused when its ledger no longer reproduces them. The v1 snapshot is kept, not served.",
            "type": "string"
          },
          "statement_id": {
            "type": "string"
          },
          "source_digest": {
            "type": "string"
          },
          "period": {
            "type": "string",
            "pattern": "^[0-9]{4}-[0-9]{2}$"
          },
          "period_start": {
            "type": "integer",
            "minimum": 0
          },
          "period_end": {
            "type": "integer",
            "minimum": 0
          },
          "opening_balance": {
            "type": "number"
          },
          "closing_balance": {
            "type": "number"
          },
          "total_credits": {
            "type": "number"
          },
          "total_deductions": {
            "type": "number"
          },
          "total_refunds": {
            "type": "number"
          },
          "total_adjustments": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "transactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PartnerWalletStatementLine"
            }
          }
        },
        "required": [
          "schema_version",
          "statement_id",
          "source_digest",
          "period",
          "period_start",
          "period_end",
          "opening_balance",
          "closing_balance",
          "total_credits",
          "total_deductions",
          "total_refunds",
          "total_adjustments",
          "currency",
          "transactions"
        ]
      },
      "PartnerScheduledCharge": {
        "type": "object",
        "title": "PartnerScheduledCharge",
        "properties": {
          "company_id": {
            "description": "The company public id, or Pending before it has one. Never the sequential company id.",
            "type": "string"
          },
          "company_type": {
            "$ref": "#/components/schemas/CompanyType"
          },
          "shareholder_count": {
            "type": "integer",
            "minimum": 0
          },
          "subscription_plan": {
            "$ref": "#/components/schemas/CompanySubscriptionPlan"
          },
          "discount_profile": {
            "type": "string"
          },
          "base_amount": {
            "type": "number"
          },
          "discount_amount": {
            "type": "number"
          },
          "scheduled_at": {
            "type": "integer",
            "minimum": 0
          },
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          }
        },
        "required": [
          "company_id",
          "company_type",
          "shareholder_count",
          "subscription_plan",
          "discount_profile",
          "base_amount",
          "discount_amount",
          "scheduled_at",
          "amount",
          "currency"
        ]
      },
      "PartnerWalletFundingSnapshot": {
        "type": "object",
        "title": "PartnerWalletFundingSnapshot",
        "properties": {
          "observed_at": {
            "type": "integer",
            "minimum": 0
          },
          "forecast_end": {
            "type": "integer",
            "minimum": 0
          },
          "current_balance": {
            "type": "number"
          },
          "scheduled_total": {
            "type": "number"
          },
          "shortfall": {
            "type": "number",
            "minimum": 0
          },
          "currency": {
            "type": "string"
          },
          "scheduled_charges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PartnerScheduledCharge"
            }
          }
        },
        "required": [
          "observed_at",
          "forecast_end",
          "current_balance",
          "scheduled_total",
          "shortfall",
          "currency",
          "scheduled_charges"
        ]
      },
      "PartnerWalletStatementResult": {
        "type": "object",
        "title": "PartnerWalletStatementResult",
        "properties": {
          "statement": {
            "$ref": "#/components/schemas/PartnerWalletPeriodStatement"
          },
          "funding": {
            "$ref": "#/components/schemas/PartnerWalletFundingSnapshot"
          }
        },
        "required": [
          "statement",
          "funding"
        ]
      },
      "Payment": {
        "description": "Payment entity for crypto/ClickPesa [rootobject]",
        "properties": {
          "amount": {
            "type": "number"
          },
          "auto_renewal": {
            "type": "boolean"
          },
          "clickpesa_order_id": {
            "type": "string"
          },
          "confirmation_count": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "confirmed_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "crypto_amount": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "entity_id": {
            "type": "string"
          },
          "entity_type": {
            "$ref": "#/components/schemas/EntityType"
          },
          "exchange_rate": {
            "type": "string"
          },
          "expires_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "external_id": {
            "type": "string"
          },
          "payment_purpose": {
            "type": "string"
          },
          "payment_type": {
            "$ref": "#/components/schemas/PaymentType"
          },
          "sender_address": {
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/PaymentStatus"
          },
          "subscription_plan": {
            "type": "string"
          },
          "transaction_hash": {
            "type": "string"
          },
          "updated_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "wallet_address": {
            "type": "string"
          }
        },
        "required": [
          "sid",
          "user_id",
          "entity_id",
          "entity_type",
          "payment_type",
          "amount",
          "currency",
          "external_id",
          "payment_purpose",
          "auto_renewal",
          "status",
          "expires_at",
          "created_at",
          "updated_at"
        ],
        "title": "Payment",
        "type": "object"
      },
      "PaymentCompleteResult": {
        "properties": {
          "complete": {
            "type": "boolean"
          },
          "payment_id": {
            "type": "string"
          }
        },
        "required": [
          "complete"
        ],
        "title": "PaymentCompleteResult",
        "type": "object"
      },
      "PaymentConfirmResult": {
        "properties": {
          "amount_received": {
            "type": "number"
          },
          "confirmation_count": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "confirmed_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "payment_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/PaymentStatus"
          },
          "transaction_hash": {
            "type": "string"
          }
        },
        "required": [
          "payment_id",
          "status"
        ],
        "title": "PaymentConfirmResult",
        "type": "object"
      },
      "PaymentCreateData": {
        "description": "Payment service types",
        "properties": {
          "amount": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "payment_method": {
            "$ref": "#/components/schemas/PaymentMethod"
          }
        },
        "required": [
          "amount",
          "currency",
          "payment_method"
        ],
        "title": "PaymentCreateData",
        "type": "object"
      },
      "PaymentError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "PaymentError",
        "type": "object"
      },
      "PaymentInvoiceResult": {
        "properties": {
          "expires_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "invoice_id": {
            "type": "string"
          },
          "payment_url": {
            "type": "string"
          }
        },
        "required": [
          "invoice_id",
          "payment_url",
          "expires_at"
        ],
        "title": "PaymentInvoiceResult",
        "type": "object"
      },
      "PaymentMethod": {
        "description": "Payment method enum",
        "enum": [
          "crypto",
          "clickpesa",
          "bank_transfer",
          "card"
        ],
        "title": "PaymentMethod",
        "type": "string"
      },
      "PaymentResult": {
        "properties": {
          "payment": {
            "$ref": "#/components/schemas/Payment"
          }
        },
        "required": [
          "payment"
        ],
        "title": "PaymentResult",
        "type": "object"
      },
      "PaymentStatus": {
        "description": "Payment status",
        "enum": [
          "pending",
          "confirming",
          "confirmed",
          "failed",
          "expired"
        ],
        "title": "PaymentStatus",
        "type": "string"
      },
      "PaymentType": {
        "description": "Payment types",
        "enum": [
          "bitcoin",
          "ethereum",
          "clickpesa"
        ],
        "title": "PaymentType",
        "type": "string"
      },
      "PaymentVerifyResult": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/PaymentStatus"
          },
          "verified": {
            "type": "boolean"
          }
        },
        "required": [
          "verified",
          "status"
        ],
        "title": "PaymentVerifyResult",
        "type": "object"
      },
      "PaymentWalletResult": {
        "description": "Payment service types",
        "properties": {
          "amount": {
            "type": "number"
          },
          "crypto_amount": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "exchange_rate": {
            "type": "string"
          },
          "expires_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "external_id": {
            "type": "string"
          },
          "payment_id": {
            "type": "string"
          },
          "payment_type": {
            "$ref": "#/components/schemas/PaymentType"
          },
          "wallet_address": {
            "type": "string"
          }
        },
        "required": [
          "wallet_address",
          "payment_type",
          "amount",
          "currency",
          "crypto_amount",
          "exchange_rate",
          "payment_id",
          "expires_at",
          "external_id"
        ],
        "title": "PaymentWalletResult",
        "type": "object"
      },
      "PaymentsListResult": {
        "properties": {
          "payments": {
            "items": {
              "$ref": "#/components/schemas/Payment"
            },
            "type": "array"
          }
        },
        "required": [
          "payments"
        ],
        "title": "PaymentsListResult",
        "type": "object"
      },
      "PricingBreakdown": {
        "description": "Complete pricing breakdown for company registration",
        "properties": {
          "company_type": {
            "$ref": "#/components/schemas/CompanyType"
          },
          "early_bird": {
            "type": "boolean"
          },
          "effective_monthly": {
            "type": "number"
          },
          "monthly_fee": {
            "$ref": "#/components/schemas/FeeBreakdown"
          },
          "setup_fee": {
            "$ref": "#/components/schemas/FeeBreakdown"
          },
          "shareholder_count": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "shareholder_fee": {
            "$ref": "#/components/schemas/FeeBreakdown"
          },
          "subscription_plan": {
            "$ref": "#/components/schemas/CompanySubscriptionPlan"
          },
          "total": {
            "type": "number"
          }
        },
        "required": [
          "company_type",
          "subscription_plan",
          "shareholder_count",
          "early_bird",
          "setup_fee",
          "monthly_fee",
          "total",
          "effective_monthly"
        ],
        "title": "PricingBreakdown",
        "type": "object"
      },
      "PricingError": {
        "description": "Pricing error",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "PricingError",
        "type": "object"
      },
      "PricingItem": {
        "properties": {
          "item_type": {
            "type": "string"
          },
          "quantity": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "unit_price": {
            "type": "number"
          }
        },
        "required": [
          "item_type",
          "quantity",
          "unit_price"
        ],
        "title": "PricingItem",
        "type": "object"
      },
      "PricingPlan": {
        "properties": {
          "currency": {
            "type": "string"
          },
          "features": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          },
          "price": {
            "type": "number"
          }
        },
        "required": [
          "name",
          "price",
          "currency",
          "features"
        ],
        "title": "PricingPlan",
        "type": "object"
      },
      "PricingPlansResult": {
        "description": "Pricing service types",
        "properties": {
          "plans": {
            "items": {
              "$ref": "#/components/schemas/PricingPlan"
            },
            "type": "array"
          }
        },
        "required": [
          "plans"
        ],
        "title": "PricingPlansResult",
        "type": "object"
      },
      "PricingResult": {
        "description": "Pricing calculation result",
        "properties": {
          "breakdown": {
            "$ref": "#/components/schemas/PricingBreakdown"
          }
        },
        "required": [
          "breakdown"
        ],
        "title": "PricingResult",
        "type": "object"
      },
      "PricingTotalResult": {
        "properties": {
          "currency": {
            "type": "string"
          },
          "subtotal": {
            "type": "number"
          },
          "tax": {
            "type": "number"
          },
          "total": {
            "type": "number"
          }
        },
        "required": [
          "subtotal",
          "tax",
          "total",
          "currency"
        ],
        "title": "PricingTotalResult",
        "type": "object"
      },
      "PrivateKeyResult": {
        "properties": {
          "private_key": {
            "type": "string"
          }
        },
        "required": [
          "private_key"
        ],
        "title": "PrivateKeyResult",
        "type": "object"
      },
      "Proposal": {
        "description": "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 GOVERNANCE & VOTING \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Governance proposal [rootobject]",
        "properties": {
          "allow_abstention": {
            "type": "boolean"
          },
          "category": {
            "$ref": "#/components/schemas/ProposalCategory"
          },
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "passing_threshold": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "proposer_id": {
            "type": "string"
          },
          "quorum_percentage": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "resolution_id": {
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ProposalStatus"
          },
          "title": {
            "type": "string"
          },
          "total_voted": {
            "type": "number"
          },
          "updated_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "votes_abstain": {
            "type": "number"
          },
          "votes_against": {
            "type": "number"
          },
          "votes_for": {
            "type": "number"
          },
          "voting_ends_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "voting_starts_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        "required": [
          "sid",
          "company_id",
          "title",
          "description",
          "category",
          "status",
          "proposer_id",
          "voting_starts_at",
          "voting_ends_at",
          "quorum_percentage",
          "passing_threshold",
          "allow_abstention",
          "votes_for",
          "votes_against",
          "votes_abstain",
          "total_voted",
          "created_at",
          "updated_at"
        ],
        "title": "Proposal",
        "type": "object"
      },
      "ProposalCategory": {
        "description": "Proposal category",
        "enum": [
          "financial",
          "strategic",
          "operational",
          "governance",
          "personnel"
        ],
        "title": "ProposalCategory",
        "type": "string"
      },
      "ProposalDetailResult": {
        "properties": {
          "category": {
            "$ref": "#/components/schemas/ProposalCategory"
          },
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "passing_threshold": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "proposal_id": {
            "type": "string"
          },
          "proposer_id": {
            "type": "string"
          },
          "quorum_percentage": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "quorum_reached": {
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/ProposalStatus"
          },
          "title": {
            "type": "string"
          },
          "total_voted": {
            "type": "number"
          },
          "votes_abstain": {
            "type": "number"
          },
          "votes_against": {
            "type": "number"
          },
          "votes_for": {
            "type": "number"
          },
          "voting_ends_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "voting_starts_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        "required": [
          "proposal_id",
          "company_id",
          "title",
          "description",
          "category",
          "status",
          "proposer_id",
          "voting_starts_at",
          "voting_ends_at",
          "quorum_percentage",
          "passing_threshold",
          "votes_for",
          "votes_against",
          "votes_abstain",
          "total_voted",
          "quorum_reached",
          "created_at"
        ],
        "title": "ProposalDetailResult",
        "type": "object"
      },
      "ProposalListResult": {
        "properties": {
          "proposals": {
            "items": {
              "$ref": "#/components/schemas/ProposalDetailResult"
            },
            "type": "array"
          }
        },
        "required": [
          "proposals"
        ],
        "title": "ProposalListResult",
        "type": "object"
      },
      "ProposalResult": {
        "description": "Governance service types",
        "properties": {
          "proposal_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ProposalStatus"
          }
        },
        "required": [
          "proposal_id",
          "status"
        ],
        "title": "ProposalResult",
        "type": "object"
      },
      "ProposalStatus": {
        "description": "Proposal status",
        "enum": [
          "draft",
          "active",
          "passed",
          "rejected",
          "expired",
          "executed"
        ],
        "title": "ProposalStatus",
        "type": "string"
      },
      "PublicKeyHistory": {
        "description": "Historical public key for signature verification [rootobject]",
        "properties": {
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "entity_id": {
            "type": "string"
          },
          "entity_type": {
            "$ref": "#/components/schemas/EntityType"
          },
          "keypair_version": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "public_key": {
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "valid_from": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "valid_until": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        "required": [
          "sid",
          "user_id",
          "entity_type",
          "entity_id",
          "public_key",
          "keypair_version",
          "valid_from",
          "valid_until",
          "created_at"
        ],
        "title": "PublicKeyHistory",
        "type": "object"
      },
      "PublicKeyHistoryListResult": {
        "description": "Public key history types",
        "properties": {
          "history": {
            "items": {
              "$ref": "#/components/schemas/PublicKeyHistory"
            },
            "type": "array"
          }
        },
        "required": [
          "history"
        ],
        "title": "PublicKeyHistoryListResult",
        "type": "object"
      },
      "PublicKeyHistoryResult": {
        "description": "Public key history types",
        "properties": {
          "current_version": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "keys": {
            "items": {
              "$ref": "#/components/schemas/PublicKeyHistory"
            },
            "type": "array"
          }
        },
        "required": [
          "keys",
          "current_version"
        ],
        "title": "PublicKeyHistoryResult",
        "type": "object"
      },
      "RefreshResult": {
        "properties": {
          "expires_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "refresh_token": {
            "type": "string"
          },
          "token": {
            "type": "string"
          }
        },
        "required": [
          "token",
          "refresh_token",
          "expires_at"
        ],
        "title": "RefreshResult",
        "type": "object"
      },
      "RegisterResult": {
        "description": "Auth service types",
        "properties": {
          "email": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "verification_sent": {
            "type": "boolean"
          }
        },
        "required": [
          "user_id",
          "email",
          "verification_sent"
        ],
        "title": "RegisterResult",
        "type": "object"
      },
      "RegistrationContract": {
        "description": "Registration Contract entity [rootobject] Note: category_str is indexed for Tantivy search; category enum provides type safety",
        "properties": {
          "category": {
            "$ref": "#/components/schemas/RegistrationContractCategory"
          },
          "category_str": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "content_hash": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "sid": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "sid",
          "name",
          "version",
          "content",
          "content_hash",
          "required",
          "category",
          "category_str",
          "created_at"
        ],
        "title": "RegistrationContract",
        "type": "object"
      },
      "RegistrationContractCategory": {
        "description": "Registration contract categories",
        "enum": [
          "terms_of_service",
          "privacy_policy",
          "digital_residency",
          "company_formation"
        ],
        "title": "RegistrationContractCategory",
        "type": "string"
      },
      "RegistrationContractResult": {
        "properties": {
          "contract": {
            "$ref": "#/components/schemas/RegistrationContract"
          }
        },
        "required": [
          "contract"
        ],
        "title": "RegistrationContractResult",
        "type": "object"
      },
      "RegistrationError": {
        "description": "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 ERROR TYPES \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "RegistrationError",
        "type": "object"
      },
      "RegistrationFlowStatus": {
        "description": "Registration flow status",
        "enum": [
          "identity_pending",
          "identity_complete",
          "personal_info_complete",
          "payment_pending",
          "payment_complete",
          "kyc_pending",
          "kyc_complete",
          "registration_complete"
        ],
        "title": "RegistrationFlowStatus",
        "type": "string"
      },
      "RegistrationStatusResult": {
        "description": "Registration service types",
        "properties": {
          "contracts_signed": {
            "type": "boolean"
          },
          "entity_type": {
            "$ref": "#/components/schemas/EntityType"
          },
          "kyc_complete": {
            "type": "boolean"
          },
          "payment_complete": {
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/RegistrationFlowStatus"
          },
          "user_id": {
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "entity_type",
          "status",
          "contracts_signed",
          "payment_complete",
          "kyc_complete"
        ],
        "title": "RegistrationStatusResult",
        "type": "object"
      },
      "RejectInviteResult": {
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ],
        "title": "RejectInviteResult",
        "type": "object"
      },
      "ReportError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "ReportError",
        "type": "object"
      },
      "RequiredContractsResult": {
        "properties": {
          "contracts": {
            "items": {
              "$ref": "#/components/schemas/RegistrationContract"
            },
            "type": "array"
          },
          "entity_type": {
            "$ref": "#/components/schemas/EntityType"
          }
        },
        "required": [
          "contracts",
          "entity_type"
        ],
        "title": "RequiredContractsResult",
        "type": "object"
      },
      "ResendResult": {
        "properties": {
          "sent": {
            "type": "boolean"
          }
        },
        "required": [
          "sent"
        ],
        "title": "ResendResult",
        "type": "object"
      },
      "ResetPasswordResult": {
        "properties": {
          "sent": {
            "type": "boolean"
          }
        },
        "required": [
          "sent"
        ],
        "title": "ResetPasswordResult",
        "type": "object"
      },
      "ResidentCardResult": {
        "properties": {
          "keypair_version": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "member_since": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "member_since_is_upper_bound": {
            "description": "home#962 - true when member_since is a DERIVED UPPER BOUND rather than a measured creation date. A renderer must present it as \"on or before\" when this is true.",
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "public_key": {
            "type": "string"
          },
          "resident_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ResidentStatus"
          },
          "subscription": {
            "$ref": "#/components/schemas/SubscriptionInfo"
          }
        },
        "required": [
          "resident_id",
          "name",
          "status",
          "member_since",
          "member_since_is_upper_bound"
        ],
        "title": "ResidentCardResult",
        "type": "object"
      },
      "ResidentCreateData": {
        "description": "Resident service types",
        "properties": {
          "date_of_birth": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "nationality": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "first_name",
          "last_name",
          "nationality"
        ],
        "title": "ResidentCreateData",
        "type": "object"
      },
      "ResidentError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "ResidentError",
        "type": "object"
      },
      "ResidentPricingResult": {
        "properties": {
          "annual_fee": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "registration_fee": {
            "type": "number"
          }
        },
        "required": [
          "registration_fee",
          "annual_fee",
          "currency"
        ],
        "title": "ResidentPricingResult",
        "type": "object"
      },
      "ResidentResult": {
        "properties": {
          "resident": {
            "$ref": "#/components/schemas/DigitalResident"
          }
        },
        "required": [
          "resident"
        ],
        "title": "ResidentResult",
        "type": "object"
      },
      "ResidentStatus": {
        "description": "Digital Resident status",
        "enum": [
          "pending",
          "active",
          "suspended",
          "expired"
        ],
        "title": "ResidentStatus",
        "type": "string"
      },
      "ResidentUpdateData": {
        "properties": {
          "address": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "nationality": {
            "type": "string"
          }
        },
        "title": "ResidentUpdateData",
        "type": "object"
      },
      "ResidentsListResult": {
        "description": "Resident service types",
        "properties": {
          "page": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "page_size": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "residents": {
            "items": {
              "$ref": "#/components/schemas/DigitalResident"
            },
            "type": "array"
          },
          "total": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        },
        "required": [
          "residents",
          "total",
          "page",
          "page_size"
        ],
        "title": "ResidentsListResult",
        "type": "object"
      },
      "Resolution": {
        "description": "Executed resolution from passed proposal [rootobject]",
        "properties": {
          "category": {
            "$ref": "#/components/schemas/ProposalCategory"
          },
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "executed_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "executed_by": {
            "type": "string"
          },
          "execution_notes": {
            "type": "string"
          },
          "passed": {
            "type": "boolean"
          },
          "proposal_id": {
            "type": "string"
          },
          "quorum_reached": {
            "type": "boolean"
          },
          "sid": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "votes_abstain": {
            "type": "number"
          },
          "votes_against": {
            "type": "number"
          },
          "votes_for": {
            "type": "number"
          }
        },
        "required": [
          "sid",
          "company_id",
          "proposal_id",
          "title",
          "description",
          "category",
          "votes_for",
          "votes_against",
          "votes_abstain",
          "quorum_reached",
          "passed",
          "created_at"
        ],
        "title": "Resolution",
        "type": "object"
      },
      "ResolutionDetailResult": {
        "properties": {
          "category": {
            "$ref": "#/components/schemas/ProposalCategory"
          },
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "executed_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "passed": {
            "type": "boolean"
          },
          "proposal_id": {
            "type": "string"
          },
          "quorum_reached": {
            "type": "boolean"
          },
          "resolution_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "votes_against": {
            "type": "number"
          },
          "votes_for": {
            "type": "number"
          }
        },
        "required": [
          "resolution_id",
          "company_id",
          "proposal_id",
          "title",
          "category",
          "votes_for",
          "votes_against",
          "quorum_reached",
          "passed",
          "created_at"
        ],
        "title": "ResolutionDetailResult",
        "type": "object"
      },
      "ResolutionListResult": {
        "properties": {
          "resolutions": {
            "items": {
              "$ref": "#/components/schemas/ResolutionDetailResult"
            },
            "type": "array"
          }
        },
        "required": [
          "resolutions"
        ],
        "title": "ResolutionListResult",
        "type": "object"
      },
      "ResolutionResult": {
        "properties": {
          "passed": {
            "type": "boolean"
          },
          "proposal_id": {
            "type": "string"
          },
          "resolution_id": {
            "type": "string"
          }
        },
        "required": [
          "resolution_id",
          "proposal_id",
          "passed"
        ],
        "title": "ResolutionResult",
        "type": "object"
      },
      "RevokeKeypairResult": {
        "description": "Keypair service types",
        "properties": {
          "revoked": {
            "type": "boolean"
          }
        },
        "required": [
          "revoked"
        ],
        "title": "RevokeKeypairResult",
        "type": "object"
      },
      "RevokeLinkResult": {
        "properties": {
          "revoked": {
            "type": "boolean"
          }
        },
        "required": [
          "revoked"
        ],
        "title": "RevokeLinkResult",
        "type": "object"
      },
      "RevokeResult": {
        "properties": {
          "message": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "title": "RevokeResult",
        "type": "object"
      },
      "ShareTransfer": {
        "description": "Share transfer between shareholders [rootobject]",
        "properties": {
          "approved_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "company_id": {
            "type": "string"
          },
          "completed_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "from_resident_id": {
            "type": "string"
          },
          "from_signature": {
            "type": "string"
          },
          "proposal_id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "requires_vote": {
            "type": "boolean"
          },
          "sid": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ShareTransferStatus"
          },
          "to_resident_id": {
            "type": "string"
          },
          "to_signature": {
            "type": "string"
          },
          "updated_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "units": {
            "type": "number",
            "description": "Absolute ownership/voting units being transferred"
          }
        },
        "required": [
          "sid",
          "company_id",
          "from_resident_id",
          "to_resident_id",
          "units",
          "status",
          "requires_vote",
          "created_at",
          "updated_at"
        ],
        "title": "ShareTransfer",
        "type": "object"
      },
      "ShareTransferListResult": {
        "properties": {
          "transfers": {
            "items": {
              "$ref": "#/components/schemas/ShareTransfer"
            },
            "type": "array"
          }
        },
        "required": [
          "transfers"
        ],
        "title": "ShareTransferListResult",
        "type": "object"
      },
      "ShareTransferResult": {
        "properties": {
          "transfer": {
            "$ref": "#/components/schemas/ShareTransfer"
          }
        },
        "required": [
          "transfer"
        ],
        "title": "ShareTransferResult",
        "type": "object"
      },
      "ShareTransferStatus": {
        "description": "Share transfer status",
        "enum": [
          "pending",
          "approved",
          "rejected",
          "completed",
          "cancelled"
        ],
        "title": "ShareTransferStatus",
        "type": "string"
      },
      "ShareholderData": {
        "description": "Shareholder data with absolute ownership/voting units. Percent ownership is derived as holder_units / total_issued_units * 100; it is never the cap-table source of truth.",
        "properties": {
          "name": {
            "type": "string"
          },
          "resident_id": {
            "type": "string"
          },
          "units": {
            "type": "number",
            "description": "Absolute ownership/voting units held by this shareholder/member"
          }
        },
        "required": [
          "resident_id",
          "name",
          "units"
        ],
        "title": "ShareholderData",
        "type": "object"
      },
      "ShareholderError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "ShareholderError",
        "type": "object"
      },
      "ShareholderFeeRateResult": {
        "description": "Shareholder fee rate result",
        "properties": {
          "rate": {
            "type": "number"
          },
          "tier_label": {
            "type": "string"
          }
        },
        "required": [
          "rate",
          "tier_label"
        ],
        "title": "ShareholderFeeRateResult",
        "type": "object"
      },
      "ShareholderFeeTier": {
        "description": "Shareholder fee tier (for tiered pricing)",
        "properties": {
          "max_count": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "rate": {
            "type": "number"
          }
        },
        "required": [
          "max_count",
          "rate"
        ],
        "title": "ShareholderFeeTier",
        "type": "object"
      },
      "ShareholderInvite": {
        "description": "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 SHAREHOLDER MANAGEMENT \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Invitation to become shareholder [rootobject]",
        "properties": {
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "expires_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "invitee_email": {
            "type": "string"
          },
          "invitee_resident_id": {
            "type": "string"
          },
          "inviter_id": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "responded_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ShareholderInviteStatus"
          },
          "token": {
            "type": "string"
          },
          "proposed_units": {
            "type": "number",
            "description": "Proposed absolute ownership/voting units"
          }
        },
        "required": [
          "sid",
          "company_id",
          "inviter_id",
          "invitee_email",
          "proposed_units",
          "status",
          "token",
          "expires_at",
          "created_at"
        ],
        "title": "ShareholderInvite",
        "type": "object"
      },
      "ShareholderInviteListResult": {
        "properties": {
          "invites": {
            "items": {
              "$ref": "#/components/schemas/ShareholderInvite"
            },
            "type": "array"
          }
        },
        "required": [
          "invites"
        ],
        "title": "ShareholderInviteListResult",
        "type": "object"
      },
      "ShareholderInviteResult": {
        "description": "Shareholder service types (aliases for generator compatibility)",
        "properties": {
          "invite": {
            "$ref": "#/components/schemas/ShareholderInvite"
          }
        },
        "required": [
          "invite"
        ],
        "title": "ShareholderInviteResult",
        "type": "object"
      },
      "ShareholderInviteStatus": {
        "description": "Shareholder invite status",
        "enum": [
          "pending",
          "accepted",
          "rejected",
          "expired"
        ],
        "title": "ShareholderInviteStatus",
        "type": "string"
      },
      "ShareholderResult": {
        "properties": {
          "company_id": {
            "type": "string"
          },
          "resident_id": {
            "type": "string"
          },
          "shareholder_id": {
            "type": "string"
          },
          "ownership_units": {
            "type": "number"
          }
        },
        "required": [
          "shareholder_id",
          "resident_id",
          "company_id",
          "ownership_units"
        ],
        "title": "ShareholderResult",
        "type": "object"
      },
      "SignContractResult": {
        "properties": {
          "contract_id": {
            "type": "string"
          },
          "signature": {
            "type": "string"
          },
          "signature_id": {
            "type": "string"
          },
          "signed_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        "required": [
          "signature_id",
          "contract_id",
          "signed_at",
          "signature"
        ],
        "title": "SignContractResult",
        "type": "object"
      },
      "SignError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "SignError",
        "type": "object"
      },
      "SignResult": {
        "properties": {
          "keypair_version": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "signature": {
            "type": "string"
          },
          "signed_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "signer_id": {
            "type": "string"
          }
        },
        "required": [
          "signature",
          "signed_at",
          "signer_id",
          "keypair_version"
        ],
        "title": "SignResult",
        "type": "object"
      },
      "SignaturesListResult": {
        "properties": {
          "signatures": {
            "items": {
              "$ref": "#/components/schemas/ContractSignature"
            },
            "type": "array"
          }
        },
        "required": [
          "signatures"
        ],
        "title": "SignaturesListResult",
        "type": "object"
      },
      "SignedDocumentsResult": {
        "properties": {
          "documents": {
            "items": {
              "$ref": "#/components/schemas/ContractSignature"
            },
            "type": "array"
          }
        },
        "required": [
          "documents"
        ],
        "title": "SignedDocumentsResult",
        "type": "object"
      },
      "SubscriptionInfo": {
        "description": "Subscription information (computed, returned in auth and resident card)",
        "properties": {
          "auto_renewal": {
            "type": "boolean"
          },
          "days_remaining": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "end_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "start_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SubscriptionStatus"
          }
        },
        "required": [
          "status",
          "auto_renewal"
        ],
        "title": "SubscriptionInfo",
        "type": "object"
      },
      "SubscriptionResult": {
        "properties": {
          "auto_renewal": {
            "type": "boolean"
          },
          "plan": {
            "type": "string"
          },
          "subscription_end_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "plan",
          "auto_renewal"
        ],
        "title": "SubscriptionResult",
        "type": "object"
      },
      "SubscriptionStatus": {
        "description": "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 SUBSCRIPTION TYPES - Resident subscription lifecycle \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Subscription status (computed by backend from dates)",
        "enum": [
          "none",
          "active",
          "expiring",
          "suspended"
        ],
        "title": "SubscriptionStatus",
        "type": "string"
      },
      "TallyResult": {
        "properties": {
          "passed": {
            "type": "boolean"
          },
          "proposal_id": {
            "type": "string"
          },
          "quorum_reached": {
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/ProposalStatus"
          },
          "total_voted": {
            "type": "number"
          },
          "votes_abstain": {
            "type": "number"
          },
          "votes_against": {
            "type": "number"
          },
          "votes_for": {
            "type": "number"
          }
        },
        "required": [
          "proposal_id",
          "votes_for",
          "votes_against",
          "votes_abstain",
          "total_voted",
          "quorum_reached",
          "passed",
          "status"
        ],
        "title": "TallyResult",
        "type": "object"
      },
      "TaxCalculationResult": {
        "description": "Tax service types",
        "properties": {
          "currency": {
            "type": "string"
          },
          "deductions": {
            "type": "number"
          },
          "gross_revenue": {
            "type": "number"
          },
          "tax_due": {
            "type": "number"
          },
          "tax_rate": {
            "type": "number"
          },
          "taxable_income": {
            "type": "number"
          }
        },
        "required": [
          "gross_revenue",
          "deductions",
          "taxable_income",
          "tax_rate",
          "tax_due",
          "currency"
        ],
        "title": "TaxCalculationResult",
        "type": "object"
      },
      "TaxDeadlineItem": {
        "properties": {
          "due_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "filing_type": {
            "$ref": "#/components/schemas/TaxFilingPeriod"
          },
          "period_end": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "period_start": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "filing_type",
          "period_start",
          "period_end",
          "due_date",
          "status"
        ],
        "title": "TaxDeadlineItem",
        "type": "object"
      },
      "TaxDeadlineResult": {
        "properties": {
          "deadlines": {
            "items": {
              "$ref": "#/components/schemas/TaxDeadlineItem"
            },
            "type": "array"
          }
        },
        "required": [
          "deadlines"
        ],
        "title": "TaxDeadlineResult",
        "type": "object"
      },
      "TaxDocument": {
        "description": "Tax document [rootobject]",
        "properties": {
          "company_id": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "document_type": {
            "type": "string"
          },
          "file_url": {
            "type": "string"
          },
          "filing_id": {
            "type": "string"
          },
          "generated": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "sid": {
            "type": "string"
          }
        },
        "required": [
          "sid",
          "filing_id",
          "company_id",
          "document_type",
          "name",
          "generated",
          "created_at"
        ],
        "title": "TaxDocument",
        "type": "object"
      },
      "TaxDocumentDetailResult": {
        "properties": {
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "document_id": {
            "type": "string"
          },
          "document_type": {
            "type": "string"
          },
          "filing_id": {
            "type": "string"
          },
          "generated": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "document_id",
          "filing_id",
          "document_type",
          "name",
          "generated",
          "created_at"
        ],
        "title": "TaxDocumentDetailResult",
        "type": "object"
      },
      "TaxDocumentListResult": {
        "properties": {
          "documents": {
            "items": {
              "$ref": "#/components/schemas/TaxDocumentDetailResult"
            },
            "type": "array"
          }
        },
        "required": [
          "documents"
        ],
        "title": "TaxDocumentListResult",
        "type": "object"
      },
      "TaxDocumentResult": {
        "properties": {
          "document_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "document_id",
          "name"
        ],
        "title": "TaxDocumentResult",
        "type": "object"
      },
      "TaxError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "TaxError",
        "type": "object"
      },
      "TaxFiling": {
        "description": "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 TAX & COMPLIANCE \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Tax filing record [rootobject]",
        "properties": {
          "company_id": {
            "type": "string"
          },
          "cost_of_goods_sold": {
            "type": "number"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "due_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "filing_type": {
            "$ref": "#/components/schemas/TaxFilingPeriod"
          },
          "gross_profit": {
            "type": "number"
          },
          "gross_revenue": {
            "type": "number"
          },
          "net_income": {
            "type": "number"
          },
          "operating_expenses": {
            "type": "number"
          },
          "period_end": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "period_start": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "signature": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/TaxFilingStatus"
          },
          "submitted_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "submitted_by": {
            "type": "string"
          },
          "tax_due": {
            "type": "number"
          },
          "tax_rate": {
            "type": "number"
          },
          "updated_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        "required": [
          "sid",
          "company_id",
          "filing_type",
          "period_start",
          "period_end",
          "due_date",
          "status",
          "gross_revenue",
          "cost_of_goods_sold",
          "gross_profit",
          "operating_expenses",
          "net_income",
          "tax_rate",
          "tax_due",
          "created_at",
          "updated_at"
        ],
        "title": "TaxFiling",
        "type": "object"
      },
      "TaxFilingDetailResult": {
        "properties": {
          "company_id": {
            "type": "string"
          },
          "cost_of_goods_sold": {
            "type": "number"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "due_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "filing_id": {
            "type": "string"
          },
          "filing_type": {
            "$ref": "#/components/schemas/TaxFilingPeriod"
          },
          "gross_profit": {
            "type": "number"
          },
          "gross_revenue": {
            "type": "number"
          },
          "net_income": {
            "type": "number"
          },
          "operating_expenses": {
            "type": "number"
          },
          "period_end": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "period_start": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/TaxFilingStatus"
          },
          "tax_due": {
            "type": "number"
          },
          "tax_rate": {
            "type": "number"
          }
        },
        "required": [
          "filing_id",
          "company_id",
          "filing_type",
          "period_start",
          "period_end",
          "due_date",
          "status",
          "gross_revenue",
          "cost_of_goods_sold",
          "gross_profit",
          "operating_expenses",
          "net_income",
          "tax_rate",
          "tax_due",
          "created_at"
        ],
        "title": "TaxFilingDetailResult",
        "type": "object"
      },
      "TaxFilingListResult": {
        "properties": {
          "filings": {
            "items": {
              "$ref": "#/components/schemas/TaxFilingDetailResult"
            },
            "type": "array"
          }
        },
        "required": [
          "filings"
        ],
        "title": "TaxFilingListResult",
        "type": "object"
      },
      "TaxFilingPeriod": {
        "description": "Tax filing period type",
        "enum": [
          "monthly",
          "quarterly",
          "annual"
        ],
        "title": "TaxFilingPeriod",
        "type": "string"
      },
      "TaxFilingResult": {
        "description": "Tax service types",
        "properties": {
          "filing_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/TaxFilingStatus"
          }
        },
        "required": [
          "filing_id",
          "status"
        ],
        "title": "TaxFilingResult",
        "type": "object"
      },
      "TaxFilingStatus": {
        "description": "Tax filing status",
        "enum": [
          "draft",
          "submitted",
          "accepted",
          "rejected",
          "amended"
        ],
        "title": "TaxFilingStatus",
        "type": "string"
      },
      "TemplateResult": {
        "properties": {
          "template": {
            "$ref": "#/components/schemas/ContractTemplate"
          }
        },
        "required": [
          "template"
        ],
        "title": "TemplateResult",
        "type": "object"
      },
      "TemplatesListResult": {
        "properties": {
          "templates": {
            "items": {
              "$ref": "#/components/schemas/ContractTemplate"
            },
            "type": "array"
          }
        },
        "required": [
          "templates"
        ],
        "title": "TemplatesListResult",
        "type": "object"
      },
      "TransactionResult": {
        "properties": {
          "transaction": {
            "$ref": "#/components/schemas/TreasuryTransaction"
          }
        },
        "required": [
          "transaction"
        ],
        "title": "TransactionResult",
        "type": "object"
      },
      "TransactionsListResult": {
        "properties": {
          "transactions": {
            "items": {
              "$ref": "#/components/schemas/TreasuryTransaction"
            },
            "type": "array"
          }
        },
        "required": [
          "transactions"
        ],
        "title": "TransactionsListResult",
        "type": "object"
      },
      "TransferDetailResult": {
        "properties": {
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "from_resident_id": {
            "type": "string"
          },
          "requires_vote": {
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/ShareTransferStatus"
          },
          "to_resident_id": {
            "type": "string"
          },
          "transfer_id": {
            "type": "string"
          },
          "units": {
            "type": "number"
          }
        },
        "required": [
          "transfer_id",
          "company_id",
          "from_resident_id",
          "to_resident_id",
          "units",
          "status",
          "requires_vote",
          "created_at"
        ],
        "title": "TransferDetailResult",
        "type": "object"
      },
      "TransferListResult": {
        "properties": {
          "transfers": {
            "items": {
              "$ref": "#/components/schemas/TransferDetailResult"
            },
            "type": "array"
          }
        },
        "required": [
          "transfers"
        ],
        "title": "TransferListResult",
        "type": "object"
      },
      "TransferResult": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/ShareTransferStatus"
          },
          "transfer_id": {
            "type": "string"
          }
        },
        "required": [
          "transfer_id",
          "status"
        ],
        "title": "TransferResult",
        "type": "object"
      },
      "PublicFeatureFlags": {
        "properties": {
          "allow_company_upgrade": {
            "type": "boolean"
          },
          "allow_external_invoicing": {
            "type": "boolean"
          },
          "governance": {
            "type": "boolean"
          },
          "treasury": {
            "type": "boolean"
          },
          "company_registration": {
            "type": "boolean"
          },
          "crypto_payments": {
            "type": "boolean"
          },
          "docs_pages": {
            "type": "boolean"
          },
          "credits": {
            "type": "boolean"
          },
          "pbz_banking": {
            "type": "boolean"
          },
          "pbz_account_information": {
            "type": "boolean"
          }
        },
        "required": [
          "allow_company_upgrade",
          "allow_external_invoicing",
          "governance",
          "treasury",
          "company_registration",
          "crypto_payments",
          "docs_pages",
          "credits",
          "pbz_banking",
          "pbz_account_information"
        ],
        "title": "PublicFeatureFlags",
        "type": "object"
      },
      "BankingError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "BankingError",
        "type": "object"
      },
      "BankingOverview": {
        "description": "PBZ application, masked account, and optional read-only account information. Every value carries its originating data_source.",
        "properties": {
          "application": {
            "$ref": "#/components/schemas/PbzApplicationView"
          },
          "account": {
            "$ref": "#/components/schemas/PbzAccountSummary"
          },
          "balance": {
            "$ref": "#/components/schemas/PbzBalance"
          },
          "balances": {
            "items": {
              "$ref": "#/components/schemas/PbzBalance"
            },
            "type": "array"
          },
          "recent_transactions": {
            "items": {
              "$ref": "#/components/schemas/PbzTransaction"
            },
            "type": "array"
          },
          "account_information_enabled": {
            "type": "boolean"
          },
          "data_source": {
            "type": "string"
          }
        },
        "required": [
          "application",
          "balances",
          "recent_transactions",
          "account_information_enabled",
          "data_source"
        ],
        "title": "BankingOverview",
        "type": "object"
      },
      "PbzAccountSummary": {
        "properties": {
          "bank_name": {
            "type": "string"
          },
          "masked_account_number": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "portal_url": {
            "type": "string"
          },
          "data_source": {
            "type": "string"
          }
        },
        "required": [
          "bank_name",
          "masked_account_number",
          "currency",
          "portal_url",
          "data_source"
        ],
        "title": "PbzAccountSummary",
        "type": "object"
      },
      "PbzApplicationInput": {
        "description": "Account-opening application. Carries the applicant details the bank requires \u2014 including a residential address, which no Digital Resident record holds \u2014 and the applicant's explicit authorisation to share their registration identity with the bank. The authorisation is enforced: a submission without it is refused. The overview returned by the service echoes none of these values back.",
        "properties": {
          "requested_currency": {
            "type": "string"
          },
          "accepted_mock_terms": {
            "type": "boolean"
          },
          "applicant_full_name": {
            "type": "string"
          },
          "applicant_address_line": {
            "type": "string"
          },
          "applicant_city": {
            "type": "string"
          },
          "applicant_country": {
            "type": "string"
          },
          "applicant_citizenship": {
            "type": "string"
          },
          "kyc_transfer_consent": {
            "type": "boolean"
          },
          "use_registration_documents": {
            "type": "boolean"
          }
        },
        "required": [
          "requested_currency",
          "accepted_mock_terms",
          "applicant_full_name",
          "applicant_address_line",
          "applicant_city",
          "applicant_country",
          "applicant_citizenship",
          "kyc_transfer_consent"
        ],
        "title": "PbzApplicationInput",
        "type": "object"
      },
      "PbzApplicationStatus": {
        "enum": [
          "draft",
          "submitted",
          "action_required",
          "approved",
          "rejected"
        ],
        "title": "PbzApplicationStatus",
        "type": "string"
      },
      "PbzApplicationView": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/PbzApplicationStatus"
          },
          "submitted_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "updated_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "uses_registration_documents": {
            "type": "boolean"
          },
          "data_source": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "updated_at",
          "message",
          "data_source"
        ],
        "title": "PbzApplicationView",
        "type": "object"
      },
      "PbzBalance": {
        "properties": {
          "amount_minor": {
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "refreshed_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "data_source": {
            "type": "string"
          }
        },
        "required": [
          "amount_minor",
          "currency",
          "refreshed_at",
          "data_source"
        ],
        "title": "PbzBalance",
        "type": "object"
      },
      "PbzTransaction": {
        "properties": {
          "reference": {
            "type": "string"
          },
          "booked_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "amount_minor": {
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "direction": {
            "type": "string"
          },
          "data_source": {
            "type": "string"
          }
        },
        "required": [
          "reference",
          "booked_at",
          "description",
          "amount_minor",
          "currency",
          "direction",
          "data_source"
        ],
        "title": "PbzTransaction",
        "type": "object"
      },
      "TreasuryAccount": {
        "description": "Treasury Account entity [rootobject]",
        "properties": {
          "external_id": {
            "description": "Server-minted opaque handle for protected portal routes; absent on legacy records. Not a public verification capability.",
            "type": "string"
          },
          "account_number": {
            "type": "string"
          },
          "balance": {
            "type": "number"
          },
          "bank_name": {
            "type": "string"
          },
          "bic": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "iban": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/TreasuryAccountKind"
          },
          "name": {
            "type": "string"
          },
          "network": {
            "type": "string"
          },
          "owner_id": {
            "type": "string"
          },
          "owner_type": {
            "$ref": "#/components/schemas/EntityType"
          },
          "sid": {
            "type": "string"
          },
          "updated_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "wallet_address": {
            "type": "string"
          }
        },
        "required": [
          "sid",
          "owner_type",
          "owner_id",
          "name",
          "kind",
          "currency",
          "balance",
          "created_at",
          "updated_at"
        ],
        "title": "TreasuryAccount",
        "type": "object"
      },
      "TreasuryAccountKind": {
        "description": "Treasury account kind",
        "enum": [
          "crypto_wallet",
          "bank_account"
        ],
        "title": "TreasuryAccountKind",
        "type": "string"
      },
      "TreasuryAccountResult": {
        "properties": {
          "account": {
            "$ref": "#/components/schemas/TreasuryAccount"
          }
        },
        "required": [
          "account"
        ],
        "title": "TreasuryAccountResult",
        "type": "object"
      },
      "TreasuryAccountsListResult": {
        "description": "Treasury service types",
        "properties": {
          "accounts": {
            "items": {
              "$ref": "#/components/schemas/TreasuryAccount"
            },
            "type": "array"
          }
        },
        "required": [
          "accounts"
        ],
        "title": "TreasuryAccountsListResult",
        "type": "object"
      },
      "TreasuryAccountsResult": {
        "description": "Treasury service types",
        "properties": {
          "accounts": {
            "items": {
              "$ref": "#/components/schemas/TreasuryAccount"
            },
            "type": "array"
          }
        },
        "required": [
          "accounts"
        ],
        "title": "TreasuryAccountsResult",
        "type": "object"
      },
      "TreasuryError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "TreasuryError",
        "type": "object"
      },
      "TreasuryOperationsError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "TreasuryOperationsError",
        "type": "object"
      },
      "TreasuryTransaction": {
        "description": "Treasury Transaction entity [rootobject]",
        "properties": {
          "account_id": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "asset": {
            "type": "string"
          },
          "counterparty": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/TreasuryTransactionStatus"
          },
          "timestamp": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "tx_type": {
            "$ref": "#/components/schemas/TreasuryTransactionType"
          }
        },
        "required": [
          "sid",
          "account_id",
          "timestamp",
          "tx_type",
          "asset",
          "amount",
          "currency",
          "status",
          "created_at"
        ],
        "title": "TreasuryTransaction",
        "type": "object"
      },
      "TreasuryTransactionStatus": {
        "description": "Treasury transaction status",
        "enum": [
          "pending",
          "confirmed",
          "failed"
        ],
        "title": "TreasuryTransactionStatus",
        "type": "string"
      },
      "TreasuryTransactionType": {
        "description": "Treasury transaction type",
        "enum": [
          "credit",
          "debit",
          "transfer"
        ],
        "title": "TreasuryTransactionType",
        "type": "string"
      },
      "TreasuryTransactionsResult": {
        "properties": {
          "transactions": {
            "items": {
              "$ref": "#/components/schemas/TreasuryTransaction"
            },
            "type": "array"
          }
        },
        "required": [
          "transactions"
        ],
        "title": "TreasuryTransactionsResult",
        "type": "object"
      },
      "UnreadCountResult": {
        "properties": {
          "count": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        },
        "required": [
          "count"
        ],
        "title": "UnreadCountResult",
        "type": "object"
      },
      "UnsignedDocumentsResult": {
        "description": "Document service types",
        "properties": {
          "documents": {
            "items": {
              "$ref": "#/components/schemas/RegistrationContract"
            },
            "type": "array"
          }
        },
        "required": [
          "documents"
        ],
        "title": "UnsignedDocumentsResult",
        "type": "object"
      },
      "UpdateCompanyData": {
        "properties": {
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "description": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "shareholders": {
            "items": {
              "$ref": "#/components/schemas/ShareholderData"
            },
            "type": "array"
          },
          "status": {
            "$ref": "#/components/schemas/CompanyStatus"
          },
          "website": {
            "type": "string"
          },
          "auto_renewal": {
            "type": "boolean"
          }
        },
        "title": "UpdateCompanyData",
        "type": "object"
      },
      "UpdateContractData": {
        "properties": {
          "counterparty": {
            "type": "string"
          },
          "end_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ContractStatus"
          },
          "total_value": {
            "type": "number"
          }
        },
        "title": "UpdateContractData",
        "type": "object"
      },
      "UpdateExpenseData": {
        "properties": {
          "amount": {
            "type": "number"
          },
          "category": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "expense_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "receipt_number": {
            "type": "string"
          },
          "receipt_url": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ExpenseStatus"
          },
          "vendor_name": {
            "type": "string"
          }
        },
        "title": "UpdateExpenseData",
        "type": "object"
      },
      "UpdateInvoiceData": {
        "properties": {
          "amount": {
            "type": "number"
          },
          "description": {
            "type": "string"
          },
          "due_date": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "line_items": {
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "type": "array"
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatus"
          },
          "tax_amount": {
            "type": "number"
          }
        },
        "title": "UpdateInvoiceData",
        "type": "object"
      },
      "UpdateResidentData": {
        "properties": {
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ResidentStatus"
          }
        },
        "title": "UpdateResidentData",
        "type": "object"
      },
      "UpdateTreasuryAccountData": {
        "properties": {
          "account_number": {
            "type": "string"
          },
          "bank_name": {
            "type": "string"
          },
          "bic": {
            "type": "string"
          },
          "iban": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "title": "UpdateTreasuryAccountData",
        "type": "object"
      },
      "User": {
        "description": "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 BUSINESS RULES - Implemented in rpc.rs (not supported by new generator) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 ROOT OBJECTS - Storable entities with CRUD operations [rootobject] \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 User account for authentication [rootobject]",
        "properties": {
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "email_verified": {
            "type": "boolean"
          },
          "email_verified_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "encrypted_private_key": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "keypair_version": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "kyc_verified": {
            "type": "boolean"
          },
          "kyc_verified_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "password_hash": {
            "type": "string"
          },
          "public_key": {
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "updated_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        "required": [
          "sid",
          "email",
          "password_hash",
          "is_active",
          "email_verified",
          "kyc_verified",
          "keypair_version",
          "created_at",
          "updated_at"
        ],
        "title": "User",
        "type": "object"
      },
      "UserInfo": {
        "properties": {
          "email": {
            "type": "string"
          },
          "email_verified": {
            "type": "boolean"
          },
          "first_name": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "kyc_verified": {
            "type": "boolean"
          },
          "kyc_verified_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "subscription": {
            "$ref": "#/components/schemas/SubscriptionInfo"
          }
        },
        "required": [
          "id",
          "email",
          "is_active",
          "email_verified",
          "kyc_verified"
        ],
        "title": "UserInfo",
        "type": "object"
      },
      "UserKeypair": {
        "description": "User Keypair entity for storing encrypted keys [rootobject]",
        "properties": {
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "encrypted_private_key": {
            "type": "string"
          },
          "entity_id": {
            "type": "string"
          },
          "entity_type": {
            "$ref": "#/components/schemas/EntityType"
          },
          "is_current": {
            "type": "boolean"
          },
          "public_key": {
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "version": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        },
        "required": [
          "sid",
          "user_id",
          "entity_type",
          "entity_id",
          "public_key",
          "encrypted_private_key",
          "version",
          "is_current",
          "created_at"
        ],
        "title": "UserKeypair",
        "type": "object"
      },
      "UserMessage": {
        "description": "User message entity [rootobject]",
        "properties": {
          "action_label": {
            "type": "string"
          },
          "action_url": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "category": {
            "$ref": "#/components/schemas/MessageCategory"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "is_read": {
            "type": "boolean"
          },
          "message_type": {
            "$ref": "#/components/schemas/MessageType"
          },
          "sid": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        },
        "required": [
          "sid",
          "user_id",
          "title",
          "body",
          "message_type",
          "is_read",
          "created_at",
          "updated_at"
        ],
        "title": "UserMessage",
        "type": "object"
      },
      "ValidationResult": {
        "properties": {
          "permissions": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "reseller_id": {
            "type": "string"
          },
          "valid": {
            "type": "boolean"
          }
        },
        "required": [
          "valid",
          "permissions"
        ],
        "title": "ValidationResult",
        "type": "object"
      },
      "VerificationError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "VerificationError",
        "type": "object"
      },
      "VerificationLink": {
        "description": "Verification Link for Tier 3 access [rootobject]",
        "properties": {
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "expires_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "first_used_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "last_used_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "resident_id": {
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "single_use": {
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/VerificationLinkStatus"
          },
          "token": {
            "type": "string"
          },
          "use_count": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "user_id": {
            "type": "string"
          }
        },
        "required": [
          "sid",
          "user_id",
          "token",
          "expires_at",
          "single_use",
          "use_count",
          "status",
          "created_at"
        ],
        "title": "VerificationLink",
        "type": "object"
      },
      "VerificationLinkResult": {
        "description": "Verification service types",
        "properties": {
          "link": {
            "$ref": "#/components/schemas/VerificationLink"
          }
        },
        "required": [
          "link"
        ],
        "title": "VerificationLinkResult",
        "type": "object"
      },
      "VerificationLinkStatus": {
        "description": "Verification link status",
        "enum": [
          "active",
          "expired",
          "used",
          "revoked"
        ],
        "title": "VerificationLinkStatus",
        "type": "string"
      },
      "VerificationLinksListResult": {
        "properties": {
          "links": {
            "items": {
              "$ref": "#/components/schemas/VerificationLink"
            },
            "type": "array"
          }
        },
        "required": [
          "links"
        ],
        "title": "VerificationLinksListResult",
        "type": "object"
      },
      "VerificationLinksResult": {
        "description": "Verification service additional types",
        "properties": {
          "links": {
            "items": {
              "$ref": "#/components/schemas/VerificationLink"
            },
            "type": "array"
          }
        },
        "required": [
          "links"
        ],
        "title": "VerificationLinksResult",
        "type": "object"
      },
      "VerifyAllSignedResult": {
        "properties": {
          "all_signed": {
            "type": "boolean"
          },
          "unsigned_count": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        },
        "required": [
          "all_signed",
          "unsigned_count"
        ],
        "title": "VerifyAllSignedResult",
        "type": "object"
      },
      "VerifyByTokenResult": {
        "properties": {
          "entity_id": {
            "type": "string"
          },
          "entity_type": {
            "$ref": "#/components/schemas/EntityType"
          },
          "has_full_access": {
            "type": "boolean"
          },
          "keypair_version": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "member_since": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "member_since_is_upper_bound": {
            "description": "home#962 - true when member_since is a DERIVED UPPER BOUND rather than a measured creation date. A renderer must present it as \"on or before\" when this is true.",
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "public_key": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "valid": {
            "type": "boolean"
          },
          "verified_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        "required": [
          "valid",
          "entity_type",
          "entity_id",
          "status",
          "verified_at",
          "has_full_access",
          "member_since_is_upper_bound"
        ],
        "title": "VerifyByTokenResult",
        "type": "object"
      },
      "VerifyEmailResult": {
        "properties": {
          "message": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "title": "VerifyEmailResult",
        "type": "object"
      },
      "VerifyError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "VerifyError",
        "type": "object"
      },
      "VerifyLinkResult": {
        "properties": {
          "company_id": {
            "type": "string"
          },
          "permissions": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "user_id": {
            "type": "string"
          },
          "valid": {
            "type": "boolean"
          }
        },
        "required": [
          "valid",
          "permissions"
        ],
        "title": "VerifyLinkResult",
        "type": "object"
      },
      "VerifyResult": {
        "properties": {
          "current_keypair_version": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "document_hash": {
            "type": "string"
          },
          "document_type": {
            "$ref": "#/components/schemas/DocumentType"
          },
          "error": {
            "type": "string"
          },
          "is_historical_key": {
            "type": "boolean"
          },
          "signature_keypair_version": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "signed_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "signer_id": {
            "type": "string"
          },
          "valid": {
            "type": "boolean"
          }
        },
        "required": [
          "valid",
          "signer_id",
          "signature_keypair_version",
          "current_keypair_version",
          "is_historical_key"
        ],
        "title": "VerifyResult",
        "type": "object"
      },
      "Vote": {
        "description": "Individual vote on a proposal [rootobject]",
        "properties": {
          "comment": {
            "type": "string"
          },
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "proposal_id": {
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "signature": {
            "type": "string"
          },
          "vote_value": {
            "$ref": "#/components/schemas/VoteValue"
          },
          "voter_id": {
            "type": "string"
          },
          "voting_power": {
            "type": "number"
          }
        },
        "required": [
          "sid",
          "proposal_id",
          "company_id",
          "voter_id",
          "vote_value",
          "voting_power",
          "signature",
          "created_at"
        ],
        "title": "Vote",
        "type": "object"
      },
      "VoteListResult": {
        "description": "Governance service types",
        "properties": {
          "votes": {
            "items": {
              "$ref": "#/components/schemas/Vote"
            },
            "type": "array"
          }
        },
        "required": [
          "votes"
        ],
        "title": "VoteListResult",
        "type": "object"
      },
      "VoteResult": {
        "properties": {
          "proposal_id": {
            "type": "string"
          },
          "vote_id": {
            "type": "string"
          },
          "vote_value": {
            "$ref": "#/components/schemas/VoteValue"
          },
          "voting_power": {
            "type": "number"
          }
        },
        "required": [
          "vote_id",
          "proposal_id",
          "vote_value",
          "voting_power"
        ],
        "title": "VoteResult",
        "type": "object"
      },
      "VoteValue": {
        "description": "Vote value",
        "enum": [
          "for",
          "against",
          "abstain"
        ],
        "title": "VoteValue",
        "type": "string"
      },
      "VotingModel": {
        "description": "Voting model for companies",
        "enum": [
          "standard",
          "cooperative"
        ],
        "title": "VotingModel",
        "type": "string"
      },
      "VotingPowerResult": {
        "properties": {
          "company_id": {
            "type": "string"
          },
          "resident_id": {
            "type": "string"
          },
          "shareholding_percentage": {
            "type": "number"
          },
          "voting_model": {
            "$ref": "#/components/schemas/VotingModel"
          },
          "voting_power": {
            "type": "number"
          }
        },
        "required": [
          "resident_id",
          "company_id",
          "voting_power",
          "voting_model",
          "shareholding_percentage"
        ],
        "title": "VotingPowerResult",
        "type": "object"
      },
      "WebhookError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "WebhookError",
        "type": "object"
      },
      "WebhookResult": {
        "properties": {
          "message": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "title": "WebhookResult",
        "type": "object"
      },
      "otime": {
        "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS (internally u32 epoch seconds)",
        "examples": [
          "2025-01-01 00:00:00",
          "2038-01-19 03:14:07"
        ],
        "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
        "type": "string"
      },
      "AdminRegistrationError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "AdminRegistrationError",
        "type": "object"
      },
      "ApproveRegistrationResult": {
        "properties": {
          "approved_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "created_entity_id": {
            "type": "string"
          },
          "created_entity_type": {
            "$ref": "#/components/schemas/RegistrationRequestType"
          },
          "request_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/RegistrationRequestStatus"
          }
        },
        "required": [
          "request_id",
          "status",
          "created_entity_type",
          "created_entity_id",
          "approved_at"
        ],
        "title": "ApproveRegistrationResult",
        "type": "object"
      },
      "AuditAction": {
        "description": "AuditAction \u2014 kinds of audited actions. Session 49 seeds 4 action variants (the mutation sites wired this session) plus an \"other\" fallback for generic UserAuditLogService.log callers. Session 50 adds view_document for can_view-consumer audit rows (paired with a typed VisibilityDecision sub-record). Session 53 adds appoint_director + remove_director for Director CompanyRole lifecycle (M&A Art. 17/18). Extend when new audited mutation sites are wired. Deliberately distinct from DocumentKind: DocumentKind discriminates document *entities*; AuditAction discriminates *actions* taken against any kind of target.  Session 54 adds \"grant_signing_authority\" / \"revoke_signing_authority\" for delegated SigningAuthority lifecycle (Board Resolution-granted signing per M&A Art. 3 + Alex Q1). Director-auto signing is NOT audited here \u2014 the underlying Director CompanyRole appointment already produces an \"appoint_director\" audit row (session 53), and there is no separate stored row to grant/revoke. See decisions/012-signing-authority.md (virtual director-auto scope \u2014 B.5 catch).  Session 55 adds \"governance_step\" (single variant covering all 5 due-process steps; the specific step is stored on GovernanceAction.kind, not duplicated on the audit enum \u2014 keeps the enum tight, matches D-013 audit-shape option a) and \"enforce_decision\" (separate variant because enforcement is the closure side-effect, not a state-chain step \u2014 pairing it with the closure-bearing handler gives per-step filter granularity exactly where it's load-bearing).  Session 57 adds \"revoke_api_key\" + \"rotate_api_key\" for personal ApiKey lifecycle (list/revoke/rotate handlers per #311). Generation is not audited here because `apikeyservice.generate` predates the audit primitive and exists on an unrelated authorization path (password re-confirm at generate time); revoke + rotate are the post-creation mutations worth observing. See decisions/015-personal-api-key-mgmt.md. Session 59 adds \"ai_query_debit\" for the idempotent post-debit write on aibroker billing rows. See decisions/017-ai-billing-freezone-side.md. Session 63 adds \"kyc_artifact_submit\" for the partner-track \u03c0-4 delegated-KYC attestation write. Fires once per KycArtifactAttestation row creation from the partner-aware submit wrapper. See decisions/021-partner-track-kyc-artifact.md. Session 64 adds \"kyc_artifact_view\" for the partner-track \u03c0-5 admin read-only audit-view handler. Distinct from kyc_artifact_submit: submit is the write-side event (partner shipped an artifact), view is the read-side event (an admin decrypted the PII). Separating the variants lets audit queries distinguish \"artifact ingested\" from \"admin examined\". See decisions/022-partner-track-admin-audit-view.md. Session 65 adds the four MCP Tier-6 approval-flow variants. approved/rejected are the owner's decision; executed is the system running the tool after approve; expired is the sweep auto-closing a Pending row whose expires_at elapsed. Four distinct variants (not one mcp_approval_decision) so the audit query shape \"how many Tier-6 calls ever executed vs how many approvals were granted\" reduces to a one-field filter. See decisions/023-mcp-tier6-approval.md.",
        "enum": [
          "sign_contract",
          "renew_subscription",
          "verify_kyc",
          "grant_bonus",
          "view_document",
          "appoint_director",
          "remove_director",
          "grant_signing_authority",
          "revoke_signing_authority",
          "governance_step",
          "enforce_decision",
          "revoke_api_key",
          "rotate_api_key",
          "ai_query_debit",
          "partner_registration_request_submit",
          "partner_registration_request_approve",
          "kyc_artifact_submit",
          "kyc_artifact_view",
          "kyc_personal_data_view",
          "mcp_approval_approved",
          "mcp_approval_rejected",
          "mcp_approval_executed",
          "mcp_approval_expired",
          "mcp_approval_admin_approved",
          "mcp_approval_admin_rejected",
          "mcp_approval_admin_viewed",
          "void_registration",
          "view_logs",
          "other"
        ],
        "title": "AuditAction",
        "type": "string"
      },
      "AuditTargetType": {
        "description": "AuditTargetType \u2014 kinds of entities an audited action targets. Deliberately broader than DocumentKind: audit targets include non-document entities (user, wallet, kyc_session). Session 50 adds 3 DocumentKind-aligned variants (invoice, business_document, share_transfer) for can_view-consumer audit rows \u2014 \"contract\" was already present from session 49. These carry an orthogonal VisibilityDecision sub-record for the visibility-specific fields (audience_sid, matched_role_sids, classification_intersected, as_of_epoch, \u2026). Session 53 adds \"company_role\" so appoint_director / remove_director can target the CompanyRole row by sid (rather than the company or subject by proxy). Session 54 adds \"signing_authority\" so designate_signatory / revoke_signatory can target the SigningAuthority row by sid. Session 55 adds \"governance_action\" so governance_step / enforce_decision can target the GovernanceAction row by sid. Session 57 adds \"api_key\" so revoke_api_key / rotate_api_key can target the ApiKey row by sid. Session 59 adds \"ai_call\" so ai_query_debit can target a specific upstream AI query; target_ref carries the external call_id so audit rows cross-link to aibroker's log. Session 63 adds \"kyc_artifact\" so kyc_artifact_submit targets the attestation row (never the payload row \u2014 the audit chain follows the immutable side). See D-021. Session 65 adds \"mcp_approval\" so the four mcp_approval_* variants target the McpApproval row by sid. Target is always the approval, never the underlying tool's output entity (forensics want the approval chain to be traceable as one unit). See decisions/023-mcp-tier6-approval.md.",
        "enum": [
          "contract",
          "invoice",
          "business_document",
          "share_transfer",
          "subscription",
          "kyc_session",
          "user",
          "wallet",
          "company",
          "company_role",
          "signing_authority",
          "governance_action",
          "api_key",
          "ai_call",
          "registration_request",
          "kyc_artifact",
          "kyc_personal_data",
          "mcp_approval",
          "other"
        ],
        "title": "AuditTargetType",
        "type": "string"
      },
      "AutoTopupResult": {
        "description": "Result of auto top-up configuration",
        "properties": {
          "amount": {
            "type": "number"
          },
          "enabled": {
            "type": "boolean"
          },
          "setup_url": {
            "type": "string"
          },
          "threshold": {
            "type": "number"
          }
        },
        "required": [
          "enabled",
          "amount",
          "threshold"
        ],
        "title": "AutoTopupResult",
        "type": "object"
      },
      "Begin2faRecoveryResult": {
        "description": "Self-service 2FA recovery \u2014 begin (home#550). Returns the iDenfy URL to send the user to + the opaque recovery_id to poll. No user data leaks.",
        "properties": {
          "expires_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "recovery_id": {
            "type": "string"
          },
          "verification_url": {
            "type": "string"
          }
        },
        "required": [
          "recovery_id",
          "verification_url",
          "expires_at",
          "message"
        ],
        "title": "Begin2faRecoveryResult",
        "type": "object"
      },
      "CompanyRole": {
        "description": "CompanyRole \u2014 role + time + classification, the primitive from FREEZONE.md principle 2. One row per (subject \u00d7 role \u00d7 company \u00d7 validity interval). Append-only (principle 3): supersede by closing valid_to and writing a new row, never edit in place.  subject_id is a formatted ID string, prefix-discriminated: \"ZDFZ-YYYY-RA...\"  \u2192 DigitalResident \"ZDFZ-C-YYYY-...\"  \u2192 CorporateShareholder (M2 forward-compat per e2e \u00a7X M1-ROLE-12) company_id is the formatted company/coop ID (ZDFZ-YYYY-Y... for FZC, ...-P... for coop). classification_scope enumerates the audience tiers for which this role is visible when DocumentAudience or visibility filters compute (current_roles \u00d7 classification) in a later session. [rootobject]",
        "properties": {
          "classification_scope": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "holder_external_id": {
            "type": "string"
          },
          "holder_name": {
            "type": "string"
          },
          "partner_attachment_id": {
            "type": "string"
          },
          "partner_intent_id": {
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/CompanyRoleKind"
          },
          "sid": {
            "type": "string"
          },
          "subject_id": {
            "type": "string"
          },
          "valid_from": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "valid_to": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        "required": [
          "sid",
          "company_id",
          "subject_id",
          "role",
          "valid_from",
          "classification_scope",
          "created_at",
          "created_by"
        ],
        "title": "CompanyRole",
        "type": "object"
      },
      "CompanyRoleError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "CompanyRoleError",
        "type": "object"
      },
      "CompanyRoleKind": {
        "description": "Company role kind \u2014 who holds what position in a company/coop. M1 ships: shareholder (FZC investor), founding_member / platinum_member (coop tiers), founder (creator marker, always written alongside the creator's first substantive role), director (company governance role; M&A Art. 17/18 appointment/removal by shareholders' Ordinary Resolution \u2014 Q1 pulled forward from M2 per Alex 2026-04-22). M2 will add: \"officer\" | \"liquidator\" \u2014 additive, no schema break.",
        "enum": [
          "shareholder",
          "founding_member",
          "platinum_member",
          "founder",
          "director"
        ],
        "title": "CompanyRoleKind",
        "type": "string"
      },
      "CompanyRoleListResult": {
        "description": "Result wrapper for the CompanyRole list RPCs (list_by_company / list_by_resident).",
        "properties": {
          "roles": {
            "items": {
              "$ref": "#/components/schemas/CompanyRole"
            },
            "type": "array"
          }
        },
        "required": [
          "roles"
        ],
        "title": "CompanyRoleListResult",
        "type": "object"
      },
      "DocumentAudience": {
        "description": "DocumentAudience \u2014 the visibility primitive from FREEZONE.md principle 2. Records *what* a document is (classification + relevant-period window) so that `can_view(subject_id, document_ref)` can compute \"may this subject read this document right now?\" from (CompanyRole rows \u00d7 classification) on demand.  Principals are deliberately NOT stored \u2014 computing them from CompanyRole on every read is what keeps the answer coherent as roles change (principle 3: past parties retain view for their period of interest; future parties do not gain retroactive view).  Append-only like CompanyRole: if the document's classification or relevant-period changes, write a new row with `supersedes` pointing at the prior sid. Never edit in place.  Relevant-period semantics (the principle-3 invariant): - document_relevant_from:   usually = document.created_at / signed_at / issued_at - document_relevant_to:     None = document is still live; Some(t) = closed at t (supersession, termination, cancellation). `can_view` checks whether a CompanyRole's (valid_from, valid_to) window OVERLAPS this window \u2014 so a past party who held the role during any part of the document's live period retains view, and a future party who joined after the document closed does NOT gain view. [rootobject]",
        "properties": {
          "as_of_epoch": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "audience_computation": {
            "type": "string"
          },
          "classification": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "document_ref": {
            "type": "string"
          },
          "document_relevant_from": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "document_relevant_to": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "document_type": {
            "$ref": "#/components/schemas/DocumentKind"
          },
          "sid": {
            "type": "string"
          },
          "supersedes": {
            "type": "string"
          }
        },
        "required": [
          "sid",
          "document_ref",
          "document_type",
          "company_id",
          "classification",
          "audience_computation",
          "document_relevant_from",
          "as_of_epoch",
          "created_at",
          "created_by"
        ],
        "title": "DocumentAudience",
        "type": "object"
      },
      "DocumentAudienceError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "DocumentAudienceError",
        "type": "object"
      },
      "DocumentAudienceListResult": {
        "description": "Service result/error types that are implemented by the hand-maintained RPC traits. Keeping them in OSchema makes its live documentation and the published OpenRPC component references complete as well as name-complete.",
        "properties": {
          "audiences": {
            "items": {
              "$ref": "#/components/schemas/DocumentAudience"
            },
            "type": "array"
          }
        },
        "required": [
          "audiences"
        ],
        "title": "DocumentAudienceListResult",
        "type": "object"
      },
      "DocumentCanViewResult": {
        "properties": {
          "audience_computation": {
            "type": "string"
          },
          "audience_sid": {
            "type": "string"
          },
          "can_view": {
            "type": "boolean"
          }
        },
        "required": [
          "can_view",
          "audience_computation",
          "audience_sid"
        ],
        "title": "DocumentCanViewResult",
        "type": "object"
      },
      "DocumentKind": {
        "description": "DocumentKind \u2014 discriminates which OSIS entity a DocumentAudience row references. Added in session 48 alongside DocumentAudience. Extend when new document-bearing entity types ship; a DocumentAudience row's document_type must match its document_ref's entity.",
        "enum": [
          "contract",
          "invoice",
          "inbox_message",
          "business_document",
          "proposal",
          "resolution",
          "tax_filing",
          "financial_report",
          "expense",
          "share_transfer",
          "dividend"
        ],
        "title": "DocumentKind",
        "type": "string"
      },
      "DraftActivationResult": {
        "properties": {
          "activated": {
            "type": "boolean"
          },
          "company_external_id": {
            "type": "string"
          },
          "company_id": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "activated",
          "company_id",
          "message"
        ],
        "title": "DraftActivationResult",
        "type": "object"
      },
      "DraftCompletionResult": {
        "properties": {
          "all_signed": {
            "type": "boolean"
          },
          "completed": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "pending_invitations": {
            "items": {
              "$ref": "#/components/schemas/EntityInvitation"
            },
            "type": "array"
          },
          "total_required": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        },
        "required": [
          "all_signed",
          "total_required",
          "completed",
          "pending_invitations"
        ],
        "title": "DraftCompletionResult",
        "type": "object"
      },
      "DraftDocumentsResult": {
        "properties": {
          "company_type": {
            "type": "string"
          },
          "document_version": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "draft_id": {
            "type": "string"
          },
          "rendered_documents": {
            "type": "string"
          }
        },
        "required": [
          "draft_id",
          "rendered_documents",
          "document_version",
          "company_type"
        ],
        "title": "DraftDocumentsResult",
        "type": "object"
      },
      "DraftError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "DraftError",
        "type": "object"
      },
      "DraftListResult": {
        "properties": {
          "drafts": {
            "items": {
              "$ref": "#/components/schemas/EntityDraft"
            },
            "type": "array"
          }
        },
        "required": [
          "drafts"
        ],
        "title": "DraftListResult",
        "type": "object"
      },
      "DraftResult": {
        "properties": {
          "draft": {
            "$ref": "#/components/schemas/EntityDraft"
          }
        },
        "required": [
          "draft"
        ],
        "title": "DraftResult",
        "type": "object"
      },
      "DraftStatusResult": {
        "properties": {
          "company_external_id": {
            "type": "string"
          },
          "completed_signatures": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "draft_id": {
            "type": "string"
          },
          "invitations": {
            "items": {
              "$ref": "#/components/schemas/EntityInvitation"
            },
            "type": "array"
          },
          "status": {
            "$ref": "#/components/schemas/EntityDraftStatus"
          },
          "total_required_signatures": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        },
        "required": [
          "draft_id",
          "status",
          "total_required_signatures",
          "completed_signatures",
          "invitations"
        ],
        "title": "DraftStatusResult",
        "type": "object"
      },
      "EncryptedKeyResult": {
        "description": "Result for get_encrypted_private_key \u2014 returns encrypted blob for client-side decryption",
        "properties": {
          "encrypted_private_key": {
            "type": "string"
          },
          "keypair_version": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        },
        "required": [
          "encrypted_private_key",
          "keypair_version"
        ],
        "title": "EncryptedKeyResult",
        "type": "object"
      },
      "EntityDraft": {
        "description": "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 ENTITY CREATION \u2014 Multi-sig draft + invite/countersign (D2) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Entity draft \u2014 a company or cooperative being formed, before all parties sign [rootobject]",
        "properties": {
          "company_type": {
            "$ref": "#/components/schemas/CompanyType"
          },
          "completed_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "completed_signatures": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "creator_dr_id": {
            "type": "string"
          },
          "creator_user_id": {
            "type": "string"
          },
          "document_version": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "entity_name": {
            "type": "string"
          },
          "entity_type": {
            "type": "string"
          },
          "finalized_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "form_schema_id": {
            "type": "string"
          },
          "paid_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "rendered_documents": {
            "type": "string"
          },
          "shareholders": {
            "items": {
              "$ref": "#/components/schemas/ShareholderData"
            },
            "type": "array"
          },
          "sid": {
            "type": "string"
          },
          "signature_deadline": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/EntityDraftStatus"
          },
          "template_data": {
            "type": "string"
          },
          "total_required_signatures": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "registration_price": {
            "$ref": "#/components/schemas/RegistrationPriceSnapshot"
          }
        },
        "required": [
          "sid",
          "entity_type",
          "entity_name",
          "company_type",
          "creator_user_id",
          "creator_dr_id",
          "template_data",
          "rendered_documents",
          "shareholders",
          "status",
          "document_version",
          "signature_deadline",
          "total_required_signatures",
          "completed_signatures",
          "created_at"
        ],
        "title": "EntityDraft",
        "type": "object"
      },
      "EntityDraftStatus": {
        "description": "Entity draft status (multi-sig creation flow)",
        "enum": [
          "draft",
          "pending_signatures",
          "all_signed",
          "paid",
          "active",
          "cancelled",
          "expired"
        ],
        "title": "EntityDraftStatus",
        "type": "string"
      },
      "EntityInvitation": {
        "description": "Invitation to join an entity as shareholder or founding member [rootobject]",
        "properties": {
          "cap_table_email": {
            "type": "string"
          },
          "document_version": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "draft_id": {
            "type": "string"
          },
          "entity_name": {
            "type": "string"
          },
          "expires_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "invited_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "invitee_dr_id": {
            "type": "string"
          },
          "invitee_email": {
            "type": "string"
          },
          "invitee_user_id": {
            "type": "string"
          },
          "inviter_dr_id": {
            "type": "string"
          },
          "inviter_name": {
            "type": "string"
          },
          "inviter_user_id": {
            "type": "string"
          },
          "responded_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "share_units": {
            "type": "number"
          },
          "sid": {
            "type": "string"
          },
          "signature_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ShareholderInviteStatus"
          }
        },
        "required": [
          "sid",
          "draft_id",
          "entity_name",
          "inviter_user_id",
          "invitee_user_id",
          "invitee_email",
          "invitee_dr_id",
          "cap_table_email",
          "role",
          "share_units",
          "status",
          "document_version",
          "invited_at",
          "expires_at"
        ],
        "title": "EntityInvitation",
        "type": "object"
      },
      "FormFieldDefinition": {
        "description": "Dynamic form field definition for entity creation wizards",
        "properties": {
          "default_value": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "field_type": {
            "$ref": "#/components/schemas/FormFieldType"
          },
          "group": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "max_value": {
            "type": "number"
          },
          "min_value": {
            "type": "number"
          },
          "options": {
            "items": {
              "$ref": "#/components/schemas/FormFieldOption"
            },
            "type": "array"
          },
          "required": {
            "type": "boolean"
          },
          "sort_order": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        },
        "required": [
          "key",
          "field_type",
          "label",
          "required",
          "options",
          "sort_order"
        ],
        "title": "FormFieldDefinition",
        "type": "object"
      },
      "FormFieldOption": {
        "description": "Option for dropdown or multi_select form fields",
        "properties": {
          "description": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "value",
          "label"
        ],
        "title": "FormFieldOption",
        "type": "object"
      },
      "FormFieldType": {
        "description": "Form field type for dynamic form schemas",
        "enum": [
          "text",
          "textarea",
          "dropdown",
          "number",
          "checkbox",
          "multi_select"
        ],
        "title": "FormFieldType",
        "type": "string"
      },
      "FormSchemaResult": {
        "properties": {
          "company_type": {
            "type": "string"
          },
          "entity_type": {
            "type": "string"
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/FormFieldDefinition"
            },
            "type": "array"
          }
        },
        "required": [
          "entity_type",
          "company_type",
          "fields"
        ],
        "title": "FormSchemaResult",
        "type": "object"
      },
      "InvitationListResult": {
        "properties": {
          "invitations": {
            "items": {
              "$ref": "#/components/schemas/EntityInvitation"
            },
            "type": "array"
          }
        },
        "required": [
          "invitations"
        ],
        "title": "InvitationListResult",
        "type": "object"
      },
      "InvitationResult": {
        "properties": {
          "invitation": {
            "$ref": "#/components/schemas/EntityInvitation"
          }
        },
        "required": [
          "invitation"
        ],
        "title": "InvitationResult",
        "type": "object"
      },
      "OnboardingStatus": {
        "description": "Complete onboarding status for a user",
        "properties": {
          "completed_count": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "next_action": {
            "type": "string"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/OnboardingStep"
            },
            "type": "array"
          },
          "tier": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "tier_label": {
            "type": "string"
          },
          "total_count": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "wallet_balance": {
            "type": "number"
          }
        },
        "required": [
          "tier",
          "tier_label",
          "steps",
          "completed_count",
          "total_count",
          "wallet_balance"
        ],
        "title": "OnboardingStatus",
        "type": "object"
      },
      "OnboardingStep": {
        "description": "Individual onboarding step",
        "properties": {
          "action_url": {
            "type": "string"
          },
          "cost": {
            "type": "number"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/OnboardingStepStatus"
          }
        },
        "required": [
          "id",
          "label",
          "description",
          "status"
        ],
        "title": "OnboardingStep",
        "type": "object"
      },
      "OnboardingStepStatus": {
        "description": "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 ONBOARDING TYPES - Progressive unlock tiers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Step status in the onboarding journey",
        "enum": [
          "locked",
          "available",
          "completed"
        ],
        "title": "OnboardingStepStatus",
        "type": "string"
      },
      "Poll2faRecoveryResult": {
        "description": "Self-service 2FA recovery \u2014 poll (home#550). Opaque status only.",
        "properties": {
          "message": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "message"
        ],
        "title": "Poll2faRecoveryResult",
        "type": "object"
      },
      "PrerequisiteCheckResult": {
        "properties": {
          "all_prerequisites_met": {
            "type": "boolean"
          },
          "contracts_signed": {
            "type": "boolean"
          },
          "kyc_passed": {
            "type": "boolean"
          },
          "missing_items": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "payment_confirmed": {
            "type": "boolean"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "request_id",
          "kyc_passed",
          "payment_confirmed",
          "contracts_signed",
          "all_prerequisites_met",
          "missing_items"
        ],
        "title": "PrerequisiteCheckResult",
        "type": "object"
      },
      "PreviewInvoiceEmailResult": {
        "description": "Rendered invoice email, exactly as a send would build it (home#641). Read-only: nothing is persisted and no mail is dispatched. `subject` is the raw subject line (never HTML-escaped \u2014 it reaches the provider as plain-text JSON); `html_body` is the escaped HTML body. The frontend MUST render html_body in a sandboxed iframe, never inline. `internal_recipient` says the recipient has an account, which means the email is only a bonus notification \u2014 the inbox message is the channel that always lands. The UI needs it to avoid implying the email is the delivery.",
        "properties": {
          "html_body": {
            "type": "string"
          },
          "internal_recipient": {
            "type": "boolean"
          },
          "subject": {
            "type": "string"
          }
        },
        "required": [
          "subject",
          "html_body",
          "internal_recipient"
        ],
        "title": "PreviewInvoiceEmailResult",
        "type": "object"
      },
      "PublicVerifyUrlResult": {
        "description": "home#472 \u2014 server-produced signed opaque verify URL for the owner's dashboard/cert QR. opaque_id = ZDFZ-XXXXXXXX (no HMAC), signed_id = {opaque_id}-{hmac8}. Both None for legacy rows.",
        "properties": {
          "opaque_id": {
            "type": "string"
          },
          "signed_id": {
            "type": "string"
          }
        },
        "title": "PublicVerifyUrlResult",
        "type": "object"
      },
      "OwnVerifyUrlResult": {
        "description": "home#656 \u2014 one entity's own verify address: entity_type (resident | company), the opaque public_id (empty while none is minted), verify_url ({app}/verify/{r|c}/{signed id}; absent while no public id is minted), status (its standing, wire form) and valid (true only when active). Never a storage or sequential id.",
        "properties": {
          "entity_type": {
            "type": "string"
          },
          "public_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "valid": {
            "type": "boolean"
          },
          "verify_url": {
            "type": "string"
          }
        },
        "required": [
          "entity_type",
          "public_id",
          "status",
          "valid"
        ],
        "title": "OwnVerifyUrlResult",
        "type": "object"
      },
      "RegistrationContractMeta": {
        "description": "Registration contract metadata (no body) \u2014 home#539. Mirrors RegistrationContract minus the ~36KB `content` field, so callers that only need to identify/list required contracts don't transfer their bodies.",
        "properties": {
          "applicable_types": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "category": {
            "$ref": "#/components/schemas/RegistrationContractCategory"
          },
          "category_str": {
            "type": "string"
          },
          "content_hash": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "sid": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "sid",
          "name",
          "version",
          "content_hash",
          "required",
          "category",
          "category_str",
          "applicable_types",
          "created_at"
        ],
        "title": "RegistrationContractMeta",
        "type": "object"
      },
      "RegistrationRequestDetailResult": {
        "properties": {
          "admin_notes": {
            "type": "string"
          },
          "client_email": {
            "type": "string"
          },
          "client_name": {
            "type": "string"
          },
          "kyc_session_id": {
            "type": "string"
          },
          "payment_id": {
            "type": "string"
          },
          "rejection_reason": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "request_type": {
            "$ref": "#/components/schemas/RegistrationRequestType"
          },
          "reseller_id": {
            "type": "string"
          },
          "reviewed_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "reviewed_by": {
            "type": "string"
          },
          "signed_contract_ids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "status": {
            "$ref": "#/components/schemas/RegistrationRequestStatus"
          },
          "submitted_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        "required": [
          "request_id",
          "reseller_id",
          "request_type",
          "client_email",
          "client_name",
          "signed_contract_ids",
          "status",
          "submitted_at"
        ],
        "title": "RegistrationRequestDetailResult",
        "type": "object"
      },
      "RegistrationRequestError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "RegistrationRequestError",
        "type": "object"
      },
      "RegistrationRequestFullDetailResult": {
        "description": "Admin registration service result types",
        "properties": {
          "contracts_count": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "contracts_signed": {
            "type": "boolean"
          },
          "kyc_status": {
            "$ref": "#/components/schemas/KycStatusResult"
          },
          "payment_amount": {
            "type": "number"
          },
          "payment_status": {
            "$ref": "#/components/schemas/PaymentStatus"
          },
          "request": {
            "$ref": "#/components/schemas/RegistrationRequestDetailResult"
          }
        },
        "required": [
          "request",
          "contracts_signed",
          "contracts_count"
        ],
        "title": "RegistrationRequestFullDetailResult",
        "type": "object"
      },
      "RegistrationRequestListResult": {
        "properties": {
          "requests": {
            "items": {
              "$ref": "#/components/schemas/RegistrationRequestDetailResult"
            },
            "type": "array"
          }
        },
        "required": [
          "requests"
        ],
        "title": "RegistrationRequestListResult",
        "type": "object"
      },
      "RegistrationRequestResult": {
        "description": "Registration request service result types",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/RegistrationRequestStatus"
          },
          "submitted_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        "required": [
          "request_id",
          "status",
          "submitted_at"
        ],
        "title": "RegistrationRequestResult",
        "type": "object"
      },
      "RegistrationRequestStatus": {
        "description": "Registration request status for reseller-submitted registrations",
        "enum": [
          "pending",
          "under_review",
          "approved",
          "rejected",
          "needs_info"
        ],
        "title": "RegistrationRequestStatus",
        "type": "string"
      },
      "RegistrationRequestType": {
        "description": "Registration request type (resident or company)",
        "enum": [
          "resident",
          "company"
        ],
        "title": "RegistrationRequestType",
        "type": "string"
      },
      "RejectRegistrationResult": {
        "properties": {
          "reason": {
            "type": "string"
          },
          "rejected_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/RegistrationRequestStatus"
          }
        },
        "required": [
          "request_id",
          "status",
          "reason",
          "rejected_at"
        ],
        "title": "RejectRegistrationResult",
        "type": "object"
      },
      "RequestInfoResult": {
        "properties": {
          "message": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/RegistrationRequestStatus"
          }
        },
        "required": [
          "request_id",
          "status",
          "message"
        ],
        "title": "RequestInfoResult",
        "type": "object"
      },
      "RequiredContractsMetaResult": {
        "description": "home#539: metadata-only mirror of RequiredContractsResult (no contract bodies).",
        "properties": {
          "contracts": {
            "items": {
              "$ref": "#/components/schemas/RegistrationContractMeta"
            },
            "type": "array"
          },
          "entity_type": {
            "$ref": "#/components/schemas/EntityType"
          }
        },
        "required": [
          "contracts",
          "entity_type"
        ],
        "title": "RequiredContractsMetaResult",
        "type": "object"
      },
      "CurrentDocument": {
        "description": "home#1009: one document of the contract pack in force, exactly as sign_contract signs it.",
        "properties": {
          "content": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "section": {
            "type": "string"
          },
          "sha256": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "section",
          "name",
          "version",
          "required",
          "sha256",
          "content"
        ],
        "title": "CurrentDocument",
        "type": "object"
      },
      "CurrentDocumentsResult": {
        "description": "home#1009: the documents a Digital Resident accepts and, for a company type, its formation set.",
        "properties": {
          "company_type": {
            "type": "string"
          },
          "documents": {
            "items": {
              "$ref": "#/components/schemas/CurrentDocument"
            },
            "type": "array"
          }
        },
        "required": [
          "documents"
        ],
        "title": "CurrentDocumentsResult",
        "type": "object"
      },
      "CompanySignedDocument": {
        "description": "home#1009: one document signed for a company, carrying no storage identifier.",
        "properties": {
          "content_withheld": {
            "type": "boolean"
          },
          "contract_key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "receipt_id": {
            "type": "string"
          },
          "signed_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "signed_content": {
            "type": "string"
          },
          "signer": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "version",
          "signed_at",
          "receipt_id",
          "content_withheld"
        ],
        "title": "CompanySignedDocument",
        "type": "object"
      },
      "CompanySignedDocumentsResult": {
        "description": "home#1009: the documents signed for one company, by that company's parties.",
        "properties": {
          "company_id": {
            "type": "string"
          },
          "documents": {
            "items": {
              "$ref": "#/components/schemas/CompanySignedDocument"
            },
            "type": "array"
          }
        },
        "required": [
          "company_id",
          "documents"
        ],
        "title": "CompanySignedDocumentsResult",
        "type": "object"
      },
      "CompanyCertificateView": {
        "description": "home#1009: the certificate of incorporation as composed lines, as on the PDF.",
        "properties": {
          "certifying_sentence": {
            "type": "string"
          },
          "company_name": {
            "type": "string"
          },
          "given_line": {
            "type": "string"
          },
          "heading": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "number_label": {
            "type": "string"
          },
          "of_a": {
            "type": "string"
          },
          "registrar_line": {
            "type": "string"
          },
          "seal_data_uri": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "verify_line": {
            "type": "string"
          },
          "verify_qr_caption": {
            "type": "string"
          },
          "verify_qr_data_uri": {
            "type": "string"
          },
          "zone_name": {
            "type": "string"
          }
        },
        "required": [
          "title",
          "of_a",
          "heading",
          "number_label",
          "number",
          "registrar_line",
          "company_name",
          "certifying_sentence",
          "given_line",
          "zone_name"
        ],
        "title": "CompanyCertificateView",
        "type": "object"
      },
      "CompanyCertificatePdf": {
        "description": "home#1009: the certificate of incorporation as a PDF file (standard base64).",
        "properties": {
          "base64": {
            "type": "string"
          },
          "content_type": {
            "type": "string"
          },
          "filename": {
            "type": "string"
          }
        },
        "required": [
          "filename",
          "content_type",
          "base64"
        ],
        "title": "CompanyCertificatePdf",
        "type": "object"
      },
      "CompanyCertificateResult": {
        "description": "home#1009: a company's certificate of incorporation, in the form asked for.",
        "properties": {
          "company_id": {
            "type": "string"
          },
          "pdf": {
            "$ref": "#/components/schemas/CompanyCertificatePdf"
          },
          "verify_url": {
            "type": "string"
          },
          "view": {
            "$ref": "#/components/schemas/CompanyCertificateView"
          }
        },
        "required": [
          "company_id"
        ],
        "title": "CompanyCertificateResult",
        "type": "object"
      },
      "ResidentSource": {
        "description": "Digital Resident provenance \u2014 the CLASS of how the DR entered the system (home#475). Decoupled from `partner_id` (the reseller-ownership axis): `source` records the class, the specific partner identity lives in `partner_id` -> PartnerConfig. No per-partner variant (e.g. \"binance\") \u2014 that would grow the enum forever; `partner` covers all integrators.",
        "enum": [
          "direct",
          "admin",
          "partner"
        ],
        "title": "ResidentSource",
        "type": "string"
      },
      "ResidentType": {
        "description": "Digital Resident type \u2014 how the DR is used. External companies are a DR type, not a parallel actor (home#475). `personal` is a normal individual; `external_company` is a company outside the freezone represented BY a DR (user_id=None, reached only via a Proxy act-as); `freezone_company` is a company incorporated inside; `partner_created` is auto-created via a partner flow. Optional/None on legacy rows.",
        "enum": [
          "personal",
          "external_company",
          "freezone_company",
          "partner_created"
        ],
        "title": "ResidentType",
        "type": "string"
      },
      "RiskTier": {
        "description": "AML/KYC risk tier (session 67, D-025 forward-compat per D-024 invariant 6). Populated by M2 ComplianceReview (#345) from iDenfy AML risk score per Compliance WP \u00a73.B (70-100 Low / 41-69 Medium / 0-40 High; PEP is a separate screening flag). Drives scheduled-refresh cadence per WP \u00a73.C (Low=annual, Medium=biannual, High/PEP=quarterly). No M1 logic reads this; ships Option-None on every row so M2 doesn't backfill.",
        "enum": [
          "low",
          "medium",
          "high",
          "pep"
        ],
        "title": "RiskTier",
        "type": "string"
      },
      "TotpEnrollBegin": {
        "properties": {
          "account": {
            "type": "string"
          },
          "issuer": {
            "type": "string"
          },
          "otpauth_url": {
            "type": "string"
          },
          "secret": {
            "type": "string"
          }
        },
        "required": [
          "secret",
          "otpauth_url",
          "issuer",
          "account"
        ],
        "title": "TotpEnrollBegin",
        "type": "object"
      },
      "TotpEnrollConfirm": {
        "properties": {
          "backup_codes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "backup_codes"
        ],
        "title": "TotpEnrollConfirm",
        "type": "object"
      },
      "TotpVerifyResult": {
        "properties": {
          "counter": {
            "type": "integer"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "counter"
        ],
        "title": "TotpVerifyResult",
        "type": "object"
      },
      "UserAuditLog": {
        "description": "UserAuditLog \u2014 typed append-only observation of every audited action. Session 49 seed of FREEZONE.md principle 4 (\"typed actors\") audit trail requirement.  Append-only by SERVICE SHAPE, not just convention: UserAuditLogService declares `log` + `list_for_*` only. No `update_*`, no `delete_*`. Corrections of a bad row are an ORTHOGONAL new entity (future `UserAuditLogCorrection`) \u2014 never a mutation of the original, never a `supersedes` pointer on this entity.  Session 50 adds an optional typed `visibility: VisibilityDecision?` sub-record populated ONLY for `action = view_document` rows. Non-visibility audit rows (the session-49 4 wired sites: sign_contract, renew_subscription, verify_kyc, grant_bonus) leave `visibility = None`. A plain `audience_computation: str` at top level was rejected in session 49 because it would either (a) overload JSON on every visibility row, or (b) remain dead weight on every non-visibility row forever. The typed sub-record is the right shape.  Deliberately NO `supersedes?` field: carrying it would contradict the append-only stance and invite future correction workflows that belong in a separate entity.  Timing: `log()` is called AFTER the action resolves (success OR recoverable failure). A handler that crashes mid-action leaves no audit row. Audit-before would leave phantom rows for actions that never happened; audit-after captures what actually happened. Rust panics surface through tracing already. [rootobject]",
        "properties": {
          "action": {
            "$ref": "#/components/schemas/AuditAction"
          },
          "allowed": {
            "type": "boolean"
          },
          "context": {
            "type": "string"
          },
          "created_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "decided_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "sid": {
            "type": "string"
          },
          "subject_id": {
            "type": "string"
          },
          "target_ref": {
            "type": "string"
          },
          "target_type": {
            "$ref": "#/components/schemas/AuditTargetType"
          },
          "visibility": {
            "$ref": "#/components/schemas/VisibilityDecision"
          }
        },
        "required": [
          "sid",
          "subject_id",
          "action",
          "target_ref",
          "target_type",
          "allowed",
          "decided_at",
          "context",
          "created_at",
          "created_by"
        ],
        "title": "UserAuditLog",
        "type": "object"
      },
      "UserAuditLogError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "UserAuditLogError",
        "type": "object"
      },
      "UserAuditLogListResult": {
        "properties": {
          "audit_logs": {
            "items": {
              "$ref": "#/components/schemas/UserAuditLog"
            },
            "type": "array"
          }
        },
        "required": [
          "audit_logs"
        ],
        "title": "UserAuditLogListResult",
        "type": "object"
      },
      "UserAuditLogResult": {
        "properties": {
          "audit_log": {
            "$ref": "#/components/schemas/UserAuditLog"
          }
        },
        "required": [
          "audit_log"
        ],
        "title": "UserAuditLogResult",
        "type": "object"
      },
      "VisibilityDecision": {
        "description": "Typed visibility decision sub-record attached to UserAuditLog rows whose action is \"view_document\". Session 50 adds this to record WHY can_view returned the answer it did \u2014 which audience row was consulted, which of the subject's CompanyRole rows matched, which classification tiers intersected, what as_of_epoch was used, whether the answer came from the kind's projection rather than a stored row (and by which rule version). Redundancy between `projection_applied: bool` and `audience_computation: str` is intentional: the bool is the fast filter (\"was this a projected answer?\"); the string is the lookup key for session-51+ reprojection sweeps (\"which rule version?\").",
        "properties": {
          "as_of_epoch": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          },
          "audience_computation": {
            "type": "string"
          },
          "audience_sid": {
            "type": "string"
          },
          "classification_intersected": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "matched_role_sids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "projection_applied": {
            "type": "boolean"
          }
        },
        "required": [
          "audience_sid",
          "matched_role_sids",
          "classification_intersected",
          "as_of_epoch",
          "projection_applied",
          "audience_computation"
        ],
        "title": "VisibilityDecision",
        "type": "object"
      },
      "StrandedRenewalResult": {
        "properties": {
          "resident_id": {
            "type": "string"
          },
          "already_completed": {
            "type": "boolean"
          },
          "plan": {
            "type": "string"
          },
          "subscription_end": {
            "type": "integer",
            "format": "uint64",
            "minimum": 0
          },
          "months": {
            "type": "integer",
            "format": "uint64",
            "minimum": 0
          },
          "linked_transaction_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "resident_id",
          "already_completed",
          "plan",
          "subscription_end",
          "months",
          "linked_transaction_ids"
        ],
        "title": "StrandedRenewalResult",
        "type": "object"
      },
      "StrandedActivationResult": {
        "properties": {
          "already_active": {
            "type": "boolean"
          },
          "linked_transaction_id": {
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "resident_id": {
            "type": "string"
          },
          "retired": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "subscription_end": {
            "format": "uint64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "resident_id",
          "already_active",
          "plan",
          "subscription_end",
          "retired",
          "linked_transaction_id"
        ],
        "title": "StrandedActivationResult",
        "type": "object"
      },
      "CompanyBillingOverview": {
        "properties": {
          "companies": {
            "items": {
              "$ref": "#/components/schemas/CompanyBillingRow"
            },
            "type": "array"
          },
          "currency": {
            "type": "string"
          },
          "observed_at": {
            "type": "integer"
          },
          "page": {
            "type": "integer"
          },
          "page_size": {
            "type": "integer"
          },
          "schema_version": {
            "type": "string"
          },
          "total": {
            "type": "integer"
          },
          "wallet_balance_credits": {
            "type": "number"
          }
        },
        "required": [
          "schema_version",
          "currency",
          "wallet_balance_credits",
          "observed_at",
          "page",
          "page_size",
          "total",
          "companies"
        ],
        "type": "object"
      },
      "CompanyBillingRow": {
        "properties": {
          "auto_renewal": {
            "type": "boolean"
          },
          "renewal_held": {
            "type": "boolean"
          },
          "renewal_hold_since": {
            "type": [
              "integer",
              "null"
            ]
          },
          "renewal_revision": {
            "type": "integer",
            "format": "uint64",
            "minimum": 0
          },
          "company_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "next_billing_at": {
            "type": [
              "integer",
              "null"
            ]
          },
          "paid_through": {
            "type": [
              "integer",
              "null"
            ]
          },
          "period_days": {
            "type": [
              "integer",
              "null"
            ]
          },
          "plan": {
            "type": [
              "string",
              "null"
            ]
          },
          "renewal_cost_credits": {
            "type": [
              "number",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/CompanyStatus"
          },
          "unavailable_fields": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "company_id",
          "name",
          "status",
          "auto_renewal",
          "renewal_held",
          "renewal_hold_since",
          "renewal_revision",
          "plan",
          "period_days",
          "renewal_cost_credits",
          "paid_through",
          "next_billing_at",
          "unavailable_fields"
        ],
        "type": "object"
      },
      "CompanyRenewalHold": {
        "properties": {
          "since": {
            "type": "integer",
            "format": "uint64",
            "minimum": 0
          }
        },
        "required": [
          "since"
        ],
        "title": "CompanyRenewalHold",
        "type": "object"
      },
      "CompanyRenewalHoldResult": {
        "properties": {
          "company": {
            "$ref": "#/components/schemas/FreeZoneCompany"
          },
          "request_id": {
            "type": "string"
          },
          "held": {
            "type": "boolean"
          },
          "effective_at": {
            "type": "integer",
            "format": "uint64",
            "minimum": 0
          },
          "charged_credits": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          }
        },
        "required": [
          "company",
          "request_id",
          "held",
          "effective_at",
          "charged_credits",
          "currency"
        ],
        "title": "CompanyRenewalHoldResult",
        "type": "object"
      },
      "CompanyRenewalHoldHistoryEntry": {
        "properties": {
          "request_id": {
            "type": "string"
          },
          "held": {
            "type": "boolean"
          },
          "effective_at": {
            "type": "integer",
            "format": "uint64",
            "minimum": 0
          },
          "reason": {
            "type": "string"
          },
          "charged_credits": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          }
        },
        "required": [
          "request_id",
          "held",
          "effective_at",
          "reason",
          "charged_credits",
          "currency"
        ],
        "title": "CompanyRenewalHoldHistoryEntry",
        "type": "object"
      },
      "CompanyRenewalHoldHistory": {
        "properties": {
          "company_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "held": {
            "type": "boolean"
          },
          "current_since": {
            "type": [
              "integer",
              "null"
            ]
          },
          "paid_through": {
            "type": [
              "integer",
              "null"
            ]
          },
          "resume_charge_credits": {
            "type": "number"
          },
          "resume_period_days": {
            "type": [
              "integer",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "held_period_fees_accrue": {
            "type": "boolean"
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyRenewalHoldHistoryEntry"
            }
          }
        },
        "required": [
          "company_id",
          "held",
          "current_since",
          "paid_through",
          "resume_charge_credits",
          "resume_period_days",
          "currency",
          "held_period_fees_accrue",
          "entries"
        ],
        "title": "CompanyRenewalHoldHistory",
        "type": "object"
      },
      "LicencePublicationAssignmentResult": {
        "properties": {
          "company_id": {
            "type": "string"
          },
          "package_id": {
            "type": "string"
          },
          "deploy_commit": {
            "type": "string"
          },
          "manifest_digest": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "revision": {
            "type": "string"
          },
          "assigned_at": {
            "type": "integer",
            "format": "uint64",
            "minimum": 0
          },
          "assigned_by": {
            "type": "string"
          },
          "updated_at": {
            "type": "integer",
            "format": "uint64",
            "minimum": 0
          },
          "updated_by": {
            "type": "string"
          }
        },
        "required": [
          "company_id",
          "package_id",
          "deploy_commit",
          "manifest_digest",
          "enabled",
          "revision",
          "assigned_at",
          "assigned_by",
          "updated_at",
          "updated_by"
        ],
        "title": "LicencePublicationAssignmentResult",
        "type": "object"
      },
      "LicencePublicationReferenceResult": {
        "properties": {
          "package_id": {
            "type": "string"
          },
          "deploy_commit": {
            "type": "string"
          },
          "manifest_digest": {
            "type": "string"
          },
          "installed_at": {
            "type": "integer",
            "format": "uint64",
            "minimum": 0
          },
          "available": {
            "type": "boolean"
          }
        },
        "required": [
          "package_id",
          "deploy_commit",
          "manifest_digest",
          "installed_at",
          "available"
        ],
        "title": "LicencePublicationReferenceResult",
        "type": "object"
      },
      "LicencePublicationsResult": {
        "properties": {
          "publications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LicencePublicationReferenceResult"
            }
          }
        },
        "required": [
          "publications"
        ],
        "title": "LicencePublicationsResult",
        "type": "object"
      },
      "LicenceShareResult": {
        "properties": {
          "id": {
            "type": "string"
          },
          "company_id": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "created_at": {
            "type": "integer",
            "format": "uint64",
            "minimum": 0
          },
          "created_by": {
            "type": "string"
          },
          "expires_at": {
            "type": "integer",
            "format": "uint64",
            "minimum": 0
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "integer",
                "format": "uint64",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "consumed_at": {
            "anyOf": [
              {
                "type": "integer",
                "format": "uint64",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "company_id",
          "scope",
          "mode",
          "created_at",
          "created_by",
          "expires_at"
        ],
        "title": "LicenceShareResult",
        "type": "object"
      },
      "LicenceShareCreatedResult": {
        "properties": {
          "share": {
            "$ref": "#/components/schemas/LicenceShareResult"
          },
          "token": {
            "type": "string"
          }
        },
        "required": [
          "share",
          "token"
        ],
        "title": "LicenceShareCreatedResult",
        "type": "object"
      },
      "LicenceSharesResult": {
        "properties": {
          "shares": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LicenceShareResult"
            }
          }
        },
        "required": [
          "shares"
        ],
        "title": "LicenceSharesResult",
        "type": "object"
      },
      "PreparedPartnerSignature": {
        "description": "home#1007: a document as a partner's customer would sign it now. No storage id.",
        "properties": {
          "content": {
            "type": "string"
          },
          "content_sha256": {
            "type": "string"
          },
          "contract_version": {
            "type": "string"
          },
          "document_key": {
            "type": "string"
          },
          "signer_resident_id": {
            "type": "string"
          },
          "valid_on": {
            "type": "string"
          }
        },
        "required": [
          "document_key",
          "contract_version",
          "content",
          "content_sha256",
          "signer_resident_id",
          "valid_on"
        ],
        "title": "PreparedPartnerSignature",
        "type": "object"
      },
      "PartnerSignatureAuthentication": {
        "additionalProperties": false,
        "description": "home#1007: how a partner authenticated its customer before the customer signed.",
        "properties": {
          "authenticated_at": {
            "type": "string"
          },
          "ip_address": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "user_agent": {
            "type": "string"
          }
        },
        "required": [
          "method",
          "authenticated_at",
          "ip_address",
          "user_agent"
        ],
        "title": "PartnerSignatureAuthentication",
        "type": "object"
      },
      "PartnerSignatureClaim": {
        "additionalProperties": false,
        "description": "home#1007: the evidence a partner attests for its customer's signature. No other field is accepted; timestamps are RFC 3339.",
        "properties": {
          "authentication": {
            "$ref": "#/components/schemas/PartnerSignatureAuthentication"
          },
          "consent_text": {
            "type": "string"
          },
          "content_sha256": {
            "type": "string"
          },
          "contract_version": {
            "type": "string"
          },
          "document_key": {
            "type": "string"
          },
          "identity_evidence_ref": {
            "type": "string"
          },
          "signed_at": {
            "type": "string"
          },
          "signer_resident_id": {
            "type": "string"
          }
        },
        "required": [
          "document_key",
          "contract_version",
          "content_sha256",
          "signer_resident_id",
          "identity_evidence_ref",
          "consent_text",
          "signed_at",
          "authentication"
        ],
        "title": "PartnerSignatureClaim",
        "type": "object"
      },
      "RecordedPartnerSignature": {
        "description": "home#1007: a recorded partner-attested signature. No storage id.",
        "properties": {
          "content_sha256": {
            "type": "string"
          },
          "contract_version": {
            "type": "string"
          },
          "document_key": {
            "type": "string"
          },
          "receipt_id": {
            "type": "string"
          },
          "replayed": {
            "type": "boolean"
          },
          "signed_at": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        "required": [
          "receipt_id",
          "signed_at",
          "document_key",
          "contract_version",
          "content_sha256",
          "replayed"
        ],
        "title": "RecordedPartnerSignature",
        "type": "object"
      },
      "PreviewDraftSignatureResult": {
        "type": "object",
        "title": "PreviewDraftSignatureResult",
        "properties": {
          "document_key": {
            "type": "string"
          },
          "contract_version": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "content_sha256": {
            "type": "string"
          },
          "valid_on": {
            "type": "string"
          }
        },
        "required": [
          "document_key",
          "contract_version",
          "content",
          "content_sha256",
          "valid_on"
        ]
      },
      "ResidentSignedDocument": {
        "properties": {
          "content_sha256": {
            "type": "string"
          },
          "content_withheld": {
            "type": "boolean"
          },
          "document_key": {
            "type": "string"
          },
          "receipt_id": {
            "type": "string"
          },
          "signed_at": {
            "type": "string"
          },
          "signed_content": {
            "type": "string"
          },
          "signer": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "document_key",
          "version",
          "signed_at",
          "receipt_id",
          "signer",
          "subject",
          "content_sha256",
          "content_withheld"
        ],
        "type": "object"
      },
      "ResidentSignedDocumentsResult": {
        "properties": {
          "documents": {
            "items": {
              "$ref": "#/components/schemas/ResidentSignedDocument"
            },
            "type": "array"
          },
          "resident_id": {
            "type": "string"
          }
        },
        "required": [
          "resident_id",
          "documents"
        ],
        "type": "object"
      },
      "AdminInspectionRecord": {
        "type": "object",
        "properties": {
          "entity_type": {
            "type": "string"
          },
          "handle": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "public_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "resident_kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "relationship": {
            "type": [
              "string",
              "null"
            ]
          },
          "relationship_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "valid_from": {
            "type": [
              "string",
              "null"
            ]
          },
          "valid_until": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "entity_type",
          "handle",
          "display_name",
          "status",
          "source"
        ]
      },
      "AdminInspectionDocument": {
        "type": "object",
        "properties": {
          "document_ref": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "provenance": {
            "type": "string"
          },
          "subject_name": {
            "type": "string"
          },
          "receipt_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "type": [
              "string",
              "null"
            ]
          },
          "signed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "signer_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "can_view": {
            "type": "boolean"
          },
          "can_download": {
            "type": "boolean"
          }
        },
        "required": [
          "document_ref",
          "title",
          "kind",
          "status",
          "provenance",
          "subject_name",
          "can_view",
          "can_download"
        ]
      },
      "AdminInspectionResult": {
        "type": "object",
        "properties": {
          "subject": {
            "$ref": "#/components/schemas/AdminInspectionRecord"
          },
          "related": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdminInspectionRecord"
            }
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdminInspectionDocument"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "subject",
          "related",
          "documents",
          "warnings",
          "total",
          "offset",
          "limit"
        ]
      },
      "AdminInspectionDocumentBody": {
        "type": "object",
        "properties": {
          "document_ref": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "provenance": {
            "type": "string"
          },
          "content_type": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "filename": {
            "type": "string"
          }
        },
        "required": [
          "document_ref",
          "title",
          "provenance",
          "content_type",
          "content",
          "filename"
        ]
      },
      "RegistrationPriceSnapshot": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number"
          },
          "setup_fee": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "inputs_sha256": {
            "type": "string"
          }
        },
        "required": [
          "total",
          "setup_fee",
          "currency",
          "inputs_sha256"
        ]
      }
    }
  },
  "info": {
    "description": "API key management for resellers",
    "title": "ApiKeyService",
    "version": "1.0.0"
  },
  "methods": [
    {
      "description": "Admin-only fulfilment of explicit, completed legacy subscription debits after a lapsed term. Each debit must match the selected plan price. Refuses refunded, consumed, or unreconciled payments. Writes a prepared audit before restoring the fixed subscription window and a completion audit afterwards. Retries never grant more time; no wallet or transaction is changed.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CreditError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "creditservice.complete_stranded_renewal",
      "params": [
        {
          "name": "admin_email",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "plan",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "transaction_ids",
          "required": true,
          "schema": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        {
          "name": "reason",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/StrandedRenewalResult"
        }
      },
      "summary": "complete_stranded_renewal"
    },
    {
      "description": "Generate API key",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ApiKeyError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "apikeyservice.generate",
      "params": [
        {
          "name": "client_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "client_secret",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "access_password",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ApiKeyResult"
        }
      },
      "summary": "generate"
    },
    {
      "description": "Register a new user",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/RegistrationError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "authservice.register",
      "params": [
        {
          "name": "email",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "password",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "first_name",
          "required": false,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "last_name",
          "required": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/AuthResult"
        }
      },
      "summary": "register"
    },
    {
      "description": "Login user and return JWT token",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/AuthError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "authservice.login",
      "params": [
        {
          "name": "email",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "password",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/AuthResult"
        }
      },
      "summary": "login"
    },
    {
      "description": "Refresh JWT token",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/AuthError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "authservice.refresh_token",
      "params": [
        {
          "name": "token",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/AuthResult"
        }
      },
      "summary": "refresh_token"
    },
    {
      "description": "Send email verification",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/EmailError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "authservice.send_verification_email",
      "params": [
        {
          "name": "email",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/VerifyEmailResult"
        }
      },
      "summary": "send_verification_email"
    },
    {
      "description": "Verify email with token",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/EmailError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "authservice.verify_email",
      "params": [
        {
          "name": "token",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/VerifyEmailResult"
        }
      },
      "summary": "verify_email"
    },
    {
      "description": "Change password",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/AuthError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "authservice.change_password",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "old_password",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "new_password",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ChangePasswordResult"
        }
      },
      "summary": "change_password"
    },
    {
      "description": "Upload document",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/BusinessDocumentError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "businessdocumentservice.upload_document",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "document_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/BusinessDocumentType"
          }
        },
        {
          "name": "name",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "description",
          "required": false,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "file_url",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "uploaded_by",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/BusinessDocumentResult"
        }
      },
      "summary": "upload_document"
    },
    {
      "description": "Generate official document",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/BusinessDocumentError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "businessdocumentservice.generate_official_document",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "document_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/BusinessDocumentType"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/BusinessDocumentResult"
        }
      },
      "summary": "generate_official_document"
    },
    {
      "description": "Get document",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/BusinessDocumentError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "businessdocumentservice.get_document",
      "params": [
        {
          "name": "document_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/BusinessDocumentDetailResult"
        }
      },
      "summary": "get_document"
    },
    {
      "description": "List documents for a company",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/BusinessDocumentError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "businessdocumentservice.list_documents",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "document_type",
          "required": false,
          "schema": {
            "$ref": "#/components/schemas/BusinessDocumentType"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/BusinessDocumentListResult"
        }
      },
      "summary": "list_documents"
    },
    {
      "description": "Delete document (non-official only)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/BusinessDocumentError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "businessdocumentservice.delete_document",
      "params": [
        {
          "name": "document_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/DeleteBusinessDocumentResult"
        }
      },
      "summary": "delete_document"
    },
    {
      "description": "List companies for user with pagination",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CompanyError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companyservice.list",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "page",
          "required": true,
          "schema": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        },
        {
          "name": "page_size",
          "required": true,
          "schema": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CompaniesListResult"
        }
      },
      "summary": "list"
    },
    {
      "description": "Create a new company",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CompanyError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companyservice.create",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/CreateCompanyData"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CompanyResult"
        }
      },
      "summary": "create"
    },
    {
      "description": "Get company by ID",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CompanyError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companyservice.get",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CompanyResult"
        }
      },
      "summary": "get"
    },
    {
      "description": "Update company",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CompanyError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companyservice.update",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/UpdateCompanyData"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CompanyResult"
        }
      },
      "summary": "update"
    },
    {
      "description": "Get company card (public display info)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CompanyError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companyservice.get_card",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CompanyCardResult"
        }
      },
      "summary": "get_card"
    },
    {
      "description": "home#1009: the company's certificate of incorporation. format is \"view\" (the composed lines, as on the PDF) or \"pdf\" (the file, base64). Readable by whoever may manage the company; a partner acting for its customer, only for a company the customer owns. caller_user_id is server-injected (the audit row).",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CompanyError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companyservice.get_certificate",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "format",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "caller_user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CompanyCertificateResult"
        }
      },
      "summary": "get_certificate"
    },
    {
      "description": "Get company key status",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/KeypairError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companyservice.get_key_status",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/KeyStatusResult"
        }
      },
      "summary": "get_key_status"
    },
    {
      "description": "List company contracts",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ContractError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "contractservice.list_company_contracts",
      "params": [
        {
          "name": "fzc_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ContractsListResult"
        }
      },
      "summary": "list_company_contracts"
    },
    {
      "description": "Get company contract",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ContractError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "contractservice.get_company_contract",
      "params": [
        {
          "name": "fzc_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "contract_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ContractResult"
        }
      },
      "summary": "get_company_contract"
    },
    {
      "description": "Create company contract",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ContractError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "contractservice.create_company_contract",
      "params": [
        {
          "name": "fzc_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/CreateContractData"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ContractResult"
        }
      },
      "summary": "create_company_contract"
    },
    {
      "description": "Update company contract",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ContractError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "contractservice.update_company_contract",
      "params": [
        {
          "name": "fzc_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "contract_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/UpdateContractData"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ContractResult"
        }
      },
      "summary": "update_company_contract"
    },
    {
      "description": "Archive company contract",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ContractError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "contractservice.archive_company_contract",
      "params": [
        {
          "name": "fzc_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "contract_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ContractResult"
        }
      },
      "summary": "archive_company_contract"
    },
    {
      "description": "List contract templates",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ContractError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "contractservice.list_templates",
      "params": [],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TemplatesListResult"
        }
      },
      "summary": "list_templates"
    },
    {
      "description": "Get contract template",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ContractError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "contractservice.get_template",
      "params": [
        {
          "name": "template_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TemplateResult"
        }
      },
      "summary": "get_template"
    },
    {
      "description": "Get required registration contracts",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ContractError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "contractservice.get_required_contracts",
      "params": [
        {
          "name": "entity_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/EntityType"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/RequiredContractsResult"
        }
      },
      "summary": "get_required_contracts"
    },
    {
      "description": "Sign contract",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/SignError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "contractservice.sign_contract",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "contract_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "entity_type",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "entity_name",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "entity_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "operation_id",
          "description": "Canonical nonzero UUID for one signing operation. Identical retries return the original receipt; changed inputs refuse. A fresh UUID starts a new operation. Omission preserves legacy signing.",
          "required": false,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/SignContractResult"
        }
      },
      "summary": "sign_contract"
    },
    {
      "description": "home#1007: a partner acting for one of its customers reads the exact text the customer would sign now. document_key is the registry key (as get_current_documents names it); entity_type is \"company\" (entity_id: the customer's own draft) or \"user\" (no entity_id). The text carries the UTC date, so it is valid on that day only. The caller and its partner are server-derived; any other caller is refused. No storage id in the answer.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ContractError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "contractservice.prepare_partner_signature",
      "params": [
        {
          "name": "document_key",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "entity_type",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "entity_id",
          "required": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/PreparedPartnerSignature"
        }
      },
      "summary": "prepare_partner_signature"
    },
    {
      "description": "home#1007: record the signature the customer made in the partner's application. evidence is signed by the partner: attestation is its Ed25519 signature (hex) over RFC 8785 JSON of {protocol: \"freezone-partner-signature/v1\", partner_id, command: \"sign\", attestation_key_id, payload: evidence}. Every check runs before the one write, and any failure writes nothing: the attestation, the version in force, the SHA-256 of the text the server renders now, the customer's own resident and identity evidence, bounded fields and fresh timestamps. The same attestation again returns the first receipt with replayed = true. No storage id. home#1006: a customer's acceptance of the Terms of Service (document_key terms_of_service, entity_type user) is recorded this way first: until it is, every other call the partner makes for the customer, but get_current_documents and prepare_partner_signature, is refused with -32003 \"Terms of Service must be accepted before this action\".",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ContractError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "contractservice.record_partner_signature",
      "params": [
        {
          "name": "document_key",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "entity_type",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "entity_id",
          "required": false,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "evidence",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/PartnerSignatureClaim"
          }
        },
        {
          "name": "attestation_key_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "attestation",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/RecordedPartnerSignature"
        }
      },
      "summary": "record_partner_signature"
    },
    {
      "description": "Get contract signatures for user",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ContractError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "contractservice.get_signatures",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/SignaturesListResult"
        }
      },
      "summary": "get_signatures"
    },
    {
      "description": "Complete a residency that was PAID FOR but never activated. Admin-only. Refuses unless a subscription payment is still outstanding in full: a refunded or partly refunded debit, or one already spent on an earlier completion, is rejected. A residency already granted (Active or Suspended) is not an error \u2014 the call is a clean no-op returning already_active, so it is safe to re-run. Requires a stated reason and writes an audit row naming the transaction relied on.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CreditError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "creditservice.complete_stranded_activation",
      "params": [
        {
          "name": "admin_email",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "plan",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "reason",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "retire_resident_ids",
          "required": true,
          "schema": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/StrandedActivationResult"
        }
      },
      "summary": "complete_stranded_activation"
    },
    {
      "description": "Get user's credit balance (creates if not exists)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CreditError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "creditservice.get_balance",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CreditBalanceResult"
        }
      },
      "summary": "get_balance"
    },
    {
      "description": "Top up credits from a confirmed payment",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CreditError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "creditservice.top_up",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "amount",
          "required": true,
          "schema": {
            "type": "number"
          }
        },
        {
          "name": "payment_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CreditTransactionResult"
        }
      },
      "summary": "top_up"
    },
    {
      "description": "Approve or reject a pending manual bank-transfer wallet top-up. Admin-only, audited, and idempotent; approval credits the linked wallet exactly once.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CreditError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "creditservice.resolve_bank_transfer",
      "params": [
        {
          "name": "payment_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "approved",
          "required": true,
          "schema": {
            "type": "boolean"
          }
        },
        {
          "name": "admin_email",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "transaction_reference",
          "required": false,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "reason",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/PaymentConfirmResult"
        }
      },
      "summary": "resolve_bank_transfer"
    },
    {
      "description": "Deduct credits for a service (KYC, subscription, company registration)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CreditError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "creditservice.deduct",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "amount",
          "required": true,
          "schema": {
            "type": "number"
          }
        },
        {
          "name": "description",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "reference_type",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "reference_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CreditTransactionResult"
        }
      },
      "summary": "deduct"
    },
    {
      "description": "The admin console's deduction from a user's wallet. Always recorded under the reference type admin_adjustment (a caller naming another is refused), never triggers the user's auto top-up, issues the customer no invoice (a correction is not a purchase), and is audited against the administrator. Admin-tier: a non-admin caller is refused before dispatch; admin_email is additionally checked against FREEZONE_ADMIN_EMAILS.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CreditError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "creditservice.admin_deduct",
      "params": [
        {
          "name": "admin_email",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "amount",
          "required": true,
          "schema": {
            "type": "number"
          }
        },
        {
          "name": "description",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "reference_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CreditTransactionResult"
        }
      },
      "summary": "Deduct credits from a user's wallet (admin-tier)."
    },
    {
      "description": "Add bonus credits (welcome bonus, promotions)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CreditError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "creditservice.add_bonus",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "amount",
          "required": true,
          "schema": {
            "type": "number"
          }
        },
        {
          "name": "description",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CreditTransactionResult"
        }
      },
      "summary": "add_bonus"
    },
    {
      "description": "Remove credit granted but never earned, linked to the provider refund(s) that returned the cash. Admin-only.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CreditError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "creditservice.refund_payment",
      "params": [
        {
          "name": "payment_sid",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "cash_amount",
          "required": false,
          "schema": {
            "type": "number"
          },
          "summary": "Cash to return at the provider. Omitted = the whole payment. Never more than was taken."
        },
        {
          "name": "credit_amount",
          "required": false,
          "schema": {
            "type": "number"
          },
          "summary": "Credit to reverse. Omitted = what this payment granted, clamped to the balance. 0 = leave the wallet alone."
        },
        {
          "name": "dry_run",
          "required": false,
          "schema": {
            "type": "boolean"
          },
          "summary": "Report what would happen and change nothing. Same validation and amount resolution as a real call; only the mutating steps are skipped."
        },
        {
          "name": "description",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CreditTransactionResult"
        }
      },
      "summary": "Refund a payment in one operation: the cash at the provider, then the linked credit clawback, clamped to the balance present. Cash moves first. Refuses a row with no stored provider refund handle. Admin-only (ADMIN_BONUS_SECRET)."
    },
    {
      "description": "Remove credit granted but never earned, linked to the provider refund(s) that returned the cash. Admin-only.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CreditError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "creditservice.remove_credit",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "amount",
          "required": true,
          "schema": {
            "type": "number"
          }
        },
        {
          "name": "description",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "reference_type",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "reference_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CreditTransactionResult"
        }
      },
      "summary": "refund"
    },
    {
      "description": "Refund credits (e.g., failed KYC)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CreditError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "creditservice.refund",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "amount",
          "required": true,
          "schema": {
            "type": "number"
          }
        },
        {
          "name": "description",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "reference_type",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "reference_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CreditTransactionResult"
        }
      },
      "summary": "refund"
    },
    {
      "description": "List credit transactions for a user",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CreditError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "creditservice.list_transactions",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "page",
          "required": true,
          "schema": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        },
        {
          "name": "page_size",
          "required": true,
          "schema": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CreditTransactionsListResult"
        }
      },
      "summary": "list_transactions"
    },
    {
      "description": "Get credit pricing (costs for services)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CreditError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "creditservice.get_pricing",
      "params": [],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CreditPricingResult"
        }
      },
      "summary": "get_pricing"
    },
    {
      "description": "Verify document signature",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/VerifyError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "documentservice.verify",
      "params": [
        {
          "name": "signature",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "signer_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "signer_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/EntityType"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/VerifyResult"
        }
      },
      "summary": "verify"
    },
    {
      "description": "Get key status",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/KeypairError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "documentservice.get_key_status",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/KeyStatusResult"
        }
      },
      "summary": "get_key_status"
    },
    {
      "description": "List expenses for company",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/InvoiceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "expenseservice.list",
      "params": [
        {
          "name": "fzc_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ExpensesListResult"
        }
      },
      "summary": "list"
    },
    {
      "description": "Create expense",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/InvoiceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "expenseservice.create",
      "params": [
        {
          "name": "fzc_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/CreateExpenseData"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ExpenseResult"
        }
      },
      "summary": "create"
    },
    {
      "description": "Get expense by ID",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/InvoiceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "expenseservice.get",
      "params": [
        {
          "name": "expense_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ExpenseResult"
        }
      },
      "summary": "get"
    },
    {
      "description": "Update expense",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/InvoiceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "expenseservice.update",
      "params": [
        {
          "name": "expense_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/UpdateExpenseData"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ExpenseResult"
        }
      },
      "summary": "update"
    },
    {
      "description": "Delete expense",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/InvoiceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "expenseservice.delete",
      "params": [
        {
          "name": "fzc_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "expense_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/DeleteResult"
        }
      },
      "summary": "delete"
    },
    {
      "description": "Submit expense for approval",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/InvoiceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "expenseservice.submit",
      "params": [
        {
          "name": "expense_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ExpenseResult"
        }
      },
      "summary": "submit"
    },
    {
      "description": "Approve expense",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/InvoiceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "expenseservice.approve",
      "params": [
        {
          "name": "expense_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "approved_by",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ExpenseResult"
        }
      },
      "summary": "approve"
    },
    {
      "description": "Reject expense",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/InvoiceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "expenseservice.reject",
      "params": [
        {
          "name": "expense_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "rejected_by",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "reason",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ExpenseResult"
        }
      },
      "summary": "reject"
    },
    {
      "description": "Create a new proposal",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/GovernanceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "governanceservice.create_proposal",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "title",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "description",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "category",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/ProposalCategory"
          }
        },
        {
          "name": "voting_days",
          "required": true,
          "schema": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        },
        {
          "name": "quorum_percentage",
          "required": true,
          "schema": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        },
        {
          "name": "passing_threshold",
          "required": true,
          "schema": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        },
        {
          "name": "allow_abstention",
          "required": true,
          "schema": {
            "type": "boolean"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ProposalResult"
        }
      },
      "summary": "create_proposal"
    },
    {
      "description": "Get proposal details",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/GovernanceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "governanceservice.get_proposal",
      "params": [
        {
          "name": "proposal_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ProposalDetailResult"
        }
      },
      "summary": "get_proposal"
    },
    {
      "description": "List proposals for a company",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/GovernanceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "governanceservice.list_proposals",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "status",
          "required": false,
          "schema": {
            "$ref": "#/components/schemas/ProposalStatus"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ProposalListResult"
        }
      },
      "summary": "list_proposals"
    },
    {
      "description": "Cast a vote on a proposal",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/GovernanceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "governanceservice.cast_vote",
      "params": [
        {
          "name": "proposal_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "voter_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "vote_value",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/VoteValue"
          }
        },
        {
          "name": "comment",
          "required": false,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "password",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/VoteResult"
        }
      },
      "summary": "cast_vote"
    },
    {
      "description": "Get voting power for a shareholder",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/GovernanceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "governanceservice.get_voting_power",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "resident_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/VotingPowerResult"
        }
      },
      "summary": "get_voting_power"
    },
    {
      "description": "Tally votes and update proposal status",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/GovernanceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "governanceservice.tally_votes",
      "params": [
        {
          "name": "proposal_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TallyResult"
        }
      },
      "summary": "tally_votes"
    },
    {
      "description": "Execute a passed proposal (create resolution)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/GovernanceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "governanceservice.execute_proposal",
      "params": [
        {
          "name": "proposal_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "executor_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "notes",
          "required": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ResolutionResult"
        }
      },
      "summary": "execute_proposal"
    },
    {
      "description": "List resolutions for a company",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/GovernanceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "governanceservice.list_resolutions",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ResolutionListResult"
        }
      },
      "summary": "list_resolutions"
    },
    {
      "description": "List invoices for company",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/InvoiceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "invoiceservice.list",
      "params": [
        {
          "name": "fzc_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/InvoicesListResult"
        }
      },
      "summary": "list"
    },
    {
      "description": "Create invoice",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/InvoiceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "invoiceservice.create",
      "params": [
        {
          "name": "fzc_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/CreateInvoiceData"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/InvoiceResult"
        }
      },
      "summary": "create"
    },
    {
      "description": "Get invoice by ID",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/InvoiceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "invoiceservice.get",
      "params": [
        {
          "name": "invoice_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/InvoiceResult"
        }
      },
      "summary": "get"
    },
    {
      "description": "Update invoice",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/InvoiceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "invoiceservice.update",
      "params": [
        {
          "name": "invoice_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/UpdateInvoiceData"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/InvoiceResult"
        }
      },
      "summary": "update"
    },
    {
      "description": "Delete invoice",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/InvoiceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "invoiceservice.delete",
      "params": [
        {
          "name": "fzc_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "invoice_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/DeleteResult"
        }
      },
      "summary": "delete"
    },
    {
      "description": "Verify signature",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/VerifyError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "keypairservice.verify_signature",
      "params": [
        {
          "name": "signature",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "signer_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "signer_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/EntityType"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/VerifyResult"
        }
      },
      "summary": "verify_signature"
    },
    {
      "description": "Start KYC verification session",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/KycError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "kycservice.start_verification",
      "params": [
        {
          "name": "resident_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "public_key",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "callback_url",
          "required": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/KycSessionResult"
        }
      },
      "summary": "start_verification"
    },
    {
      "description": "Check KYC status",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/KycError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "kycservice.check_status",
      "params": [
        {
          "name": "session_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/KycStatusResult"
        }
      },
      "summary": "check_status"
    },
    {
      "description": "The admin console's KYC status check for a user. status is the status of the user's latest KYC session; verified and verified_at are the user's own KYC flag, which a manual confirmation sets with no session completing. Admin-tier: a non-admin caller is refused before dispatch; admin_email is additionally checked against FREEZONE_ADMIN_EMAILS.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/KycError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "kycservice.admin_check_status",
      "params": [
        {
          "name": "admin_email",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/KycUserStatusResult"
        }
      },
      "summary": "A user's latest KYC session status and KYC flag (admin-tier)."
    },
    {
      "description": "Handle iDenfy webhook",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/WebhookError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "kycservice.handle_idenfy_webhook",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/IdenfyWebhookData"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/WebhookResult"
        }
      },
      "summary": "handle_idenfy_webhook"
    },
    {
      "description": "List user messages with filtering",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/MessageError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "messageservice.list_user_messages",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "category",
          "required": false,
          "schema": {
            "$ref": "#/components/schemas/MessageCategory"
          }
        },
        {
          "name": "is_read",
          "required": false,
          "schema": {
            "type": "boolean"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/MessagesListResult"
        }
      },
      "summary": "list_user_messages"
    },
    {
      "description": "Get user message",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/MessageError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "messageservice.get_user_message",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "message_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/MessageResult"
        }
      },
      "summary": "get_user_message"
    },
    {
      "description": "Get unread count",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/MessageError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "messageservice.get_unread_count",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/UnreadCountResult"
        }
      },
      "summary": "get_unread_count"
    },
    {
      "description": "Mark message as read",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/MessageError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "messageservice.mark_as_read",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "message_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/MarkReadResult"
        }
      },
      "summary": "mark_as_read"
    },
    {
      "description": "Mark message as unread",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/MessageError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "messageservice.mark_as_unread",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "message_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/MarkReadResult"
        }
      },
      "summary": "mark_as_unread"
    },
    {
      "description": "Mark all as read",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/MessageError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "messageservice.mark_all_read",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/MarkReadResult"
        }
      },
      "summary": "mark_all_read"
    },
    {
      "description": "Mark all as unread",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/MessageError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "messageservice.mark_all_unread",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/MarkReadResult"
        }
      },
      "summary": "mark_all_unread"
    },
    {
      "description": "Delete message",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/MessageError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "messageservice.delete_message",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "message_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/DeleteResult"
        }
      },
      "summary": "delete_message"
    },
    {
      "description": "Create system message (admin)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/MessageError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "messageservice.create_system_message",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "title",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "body",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "category",
          "required": false,
          "schema": {
            "$ref": "#/components/schemas/MessageCategory"
          }
        },
        {
          "name": "action_url",
          "required": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/MessageResult"
        }
      },
      "summary": "create_system_message"
    },
    {
      "description": "List company messages",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/MessageError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "messageservice.list_company_messages",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/MessagesListResult"
        }
      },
      "summary": "list_company_messages"
    },
    {
      "description": "Create company message",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/MessageError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "messageservice.create_company_message",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "title",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "body",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "category",
          "required": false,
          "schema": {
            "$ref": "#/components/schemas/MessageCategory"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/MessageResult"
        }
      },
      "summary": "create_company_message"
    },
    {
      "description": "Mark company message as read",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/MessageError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "messageservice.mark_company_read",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "message_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/MarkReadResult"
        }
      },
      "summary": "mark_company_read"
    },
    {
      "description": "Mark company message as unread",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/MessageError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "messageservice.mark_company_unread",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "message_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/MarkReadResult"
        }
      },
      "summary": "mark_company_unread"
    },
    {
      "description": "Mark all company messages read",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/MessageError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "messageservice.mark_all_company_read",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/MarkReadResult"
        }
      },
      "summary": "mark_all_company_read"
    },
    {
      "description": "Mark all company messages unread",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/MessageError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "messageservice.mark_all_company_unread",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/MarkReadResult"
        }
      },
      "summary": "mark_all_company_unread"
    },
    {
      "description": "Get crypto wallet address for payment",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/PaymentError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "paymentservice.get_payment_wallet",
      "params": [
        {
          "name": "resident_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "payment_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/PaymentType"
          }
        },
        {
          "name": "amount",
          "required": true,
          "schema": {
            "type": "number"
          }
        },
        {
          "name": "currency",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/PaymentWalletResult"
        }
      },
      "summary": "get_payment_wallet"
    },
    {
      "description": "Confirm payment",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/PaymentError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "paymentservice.confirm_payment",
      "params": [
        {
          "name": "payment_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "sender_address",
          "required": false,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "transaction_hash",
          "required": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/PaymentConfirmResult"
        }
      },
      "summary": "confirm_payment"
    },
    {
      "description": "Initiate ClickPesa payment",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/PaymentError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "paymentservice.initiate_clickpesa",
      "params": [
        {
          "name": "entity_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "entity_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/EntityType"
          }
        },
        {
          "name": "amount",
          "required": true,
          "schema": {
            "type": "number"
          }
        },
        {
          "name": "currency",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "description",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "payment_purpose",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "subscription_plan",
          "required": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ClickPesaResult"
        }
      },
      "summary": "initiate_clickpesa"
    },
    {
      "description": "Handle ClickPesa webhook",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/WebhookError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "paymentservice.handle_payment_webhook",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/ClickPesaWebhookData"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/WebhookResult"
        }
      },
      "summary": "handle_payment_webhook"
    },
    {
      "description": "Initiate subscription renewal payment",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/PaymentError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "paymentservice.initiate_renewal",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ClickPesaResult"
        }
      },
      "summary": "initiate_renewal"
    },
    {
      "description": "Get subscription status for a user",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/PaymentError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "paymentservice.get_subscription_status",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/SubscriptionInfo"
        }
      },
      "summary": "get_subscription_status"
    },
    {
      "description": "Calculate company registration pricing",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/PricingError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "pricingservice.calculate_company_pricing",
      "params": [
        {
          "name": "company_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/CompanyType"
          }
        },
        {
          "name": "shareholder_count",
          "required": true,
          "schema": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        },
        {
          "name": "subscription_plan",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/CompanySubscriptionPlan"
          }
        },
        {
          "name": "early_bird",
          "required": true,
          "schema": {
            "type": "boolean"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/PricingResult"
        }
      },
      "summary": "calculate_company_pricing"
    },
    {
      "description": "Get all pricing configurations (for display)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/PricingError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "pricingservice.get_all_pricing",
      "params": [],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/AllPricingConfig"
        }
      },
      "summary": "get_all_pricing"
    },
    {
      "description": "Get shareholder fee rate for a company type and count",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/PricingError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "pricingservice.get_shareholder_fee_rate",
      "params": [
        {
          "name": "company_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/CompanyType"
          }
        },
        {
          "name": "shareholder_count",
          "required": true,
          "schema": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ShareholderFeeRateResult"
        }
      },
      "summary": "get_shareholder_fee_rate"
    },
    {
      "description": "Get key history for an entity",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/KeypairError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "publickeyhistoryservice.get_history",
      "params": [
        {
          "name": "entity_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/EntityType"
          }
        },
        {
          "name": "entity_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/PublicKeyHistoryResult"
        }
      },
      "summary": "get_history"
    },
    {
      "description": "Get specific historical key by version",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/KeypairError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "publickeyhistoryservice.get_by_version",
      "params": [
        {
          "name": "entity_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/EntityType"
          }
        },
        {
          "name": "entity_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "version",
          "required": true,
          "schema": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/PublicKeyHistory"
        }
      },
      "summary": "get_by_version"
    },
    {
      "description": "Execute one durable intent-keyed partner registration. Partner identity, wallet and discount profile are derived from the authenticated partner principal; no amount is accepted from the caller.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/RegistrationError"
              }
            },
            "type": "object"
          },
          "message": "Partner registration intent refused"
        }
      ],
      "name": "registrationrequestservice.execute_partner_intent",
      "params": [
        {
          "name": "input",
          "required": true,
          "schema": {
            "type": "object",
            "required": [
              "intent_id",
              "attestation_key_id",
              "request_type",
              "client_email",
              "client_name",
              "attestation",
              "signed_contract_ids"
            ],
            "properties": {
              "intent_id": {
                "type": "string"
              },
              "attestation_key_id": {
                "type": "string",
                "description": "Partner key id selecting PartnerConfig.attestation_public_keys"
              },
              "request_type": {
                "type": "string",
                "enum": [
                  "resident",
                  "company"
                ],
                "description": "A new company intent from a partner principal is refused: a company is registered through a draft its customer signs. A company intent already recorded is still answered"
              },
              "client_email": {
                "type": "string"
              },
              "client_name": {
                "type": "string"
              },
              "attestation": {
                "type": "string"
              },
              "signed_contract_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "company_type": {
                "$ref": "#/components/schemas/CompanyType"
              },
              "shareholders": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ShareholderData"
                }
              },
              "subscription_plan": {
                "$ref": "#/components/schemas/CompanySubscriptionPlan"
              },
              "auto_renewal": {
                "type": "boolean"
              },
              "kyc_artifact_encrypted": {
                "type": "string",
                "description": "The partner's encrypted identity evidence for the subject, retained by the register: base64 of an age file sealed to the ZDFZ record key kyc_artifact_key_id names, or hex(nonce):hex(ciphertext) under the partner's shared artifact key it names"
              },
              "kyc_artifact_key_id": {
                "type": "string",
                "description": "Key id of the key protecting kyc_artifact_encrypted: one of ZDFZ's record keys ([kyc_record_keys], the record sealed with age X25519) or one of the partner's shared artifact keys (PartnerConfig.artifact_keys, AES-256-GCM)"
              },
              "customer_ref": {
                "type": "string",
                "description": "The partner's own reference for the customer a resident registration is for; the resident is then that customer's and active. Resident registrations only"
              },
              "first_name": {
                "type": "string",
                "description": "With customer_ref only, and then required: the person's first name; client_name is first_name and last_name joined by one space"
              },
              "last_name": {
                "type": "string",
                "description": "With customer_ref only, and then required: the person's last name"
              }
            }
          }
        }
      ],
      "result": {
        "description": "The recorded or replayed intent outcome",
        "name": "result",
        "schema": {
          "type": "object",
          "required": [
            "intent_id",
            "state",
            "request_id",
            "amount",
            "currency",
            "replayed"
          ],
          "properties": {
            "intent_id": {
              "type": "string"
            },
            "state": {
              "type": "string",
              "enum": [
                "pending",
                "debited",
                "completed",
                "refused",
                "compensating",
                "compensated"
              ]
            },
            "request_id": {
              "type": "string"
            },
            "amount": {
              "type": "number"
            },
            "currency": {
              "type": "string"
            },
            "debit_transaction_id": {
              "type": "string"
            },
            "resident_id": {
              "type": "string"
            },
            "company_id": {
              "type": "string"
            },
            "replayed": {
              "type": "boolean"
            }
          }
        }
      },
      "summary": "execute_partner_intent"
    },
    {
      "description": "Attach an explicit owner roster to an existing partner-created company as a durable, attested, zero-price intent. Partner identity is derived from the authenticated principal; no storage SID or billing field is accepted.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/RegistrationError"
              }
            },
            "type": "object"
          },
          "message": "Partner owner attachment refused"
        }
      ],
      "name": "registrationrequestservice.attach_partner_company_owners",
      "params": [
        {
          "name": "input",
          "required": true,
          "schema": {
            "type": "object",
            "required": [
              "attachment_id",
              "company_id",
              "owners",
              "attestation_key_id",
              "attestation"
            ],
            "properties": {
              "attachment_id": {
                "type": "string"
              },
              "company_id": {
                "type": "string",
                "description": "Formatted company id; never an internal SID"
              },
              "owners": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "resident_id",
                    "units"
                  ],
                  "properties": {
                    "resident_id": {
                      "type": "string",
                      "description": "Formatted resident id; never an internal SID"
                    },
                    "units": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    }
                  }
                }
              },
              "attestation_key_id": {
                "type": "string"
              },
              "attestation": {
                "type": "string"
              }
            }
          }
        }
      ],
      "result": {
        "description": "The recorded or replayed attachment outcome",
        "name": "result",
        "schema": {
          "type": "object",
          "required": [
            "attachment_id",
            "state",
            "company_id",
            "owners",
            "replayed"
          ],
          "properties": {
            "attachment_id": {
              "type": "string"
            },
            "state": {
              "type": "string",
              "enum": [
                "pending",
                "cap_table_applied",
                "completed",
                "refused"
              ]
            },
            "company_id": {
              "type": "string"
            },
            "owners": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "resident_id",
                  "units"
                ],
                "properties": {
                  "resident_id": {
                    "type": "string"
                  },
                  "units": {
                    "type": "number"
                  }
                }
              }
            },
            "replayed": {
              "type": "boolean"
            }
          }
        }
      },
      "summary": "attach_partner_company_owners"
    },
    {
      "description": "Attest the owners of one of the authenticated partner's existing companies (freezone-partner-owner-attachment/v2). The company is named by its opaque public id (a sequential company id is refused) and each owner by the partner's own customer reference, which must resolve to a Digital Resident made on the partner's attested identity. With supersede_legacy, an owner written by the legacy API is replaced: its ownership roles are closed (never deleted) and its cap-table rows kept as history; an owner a partner registration made is never superseded. Refused when the owners outnumber the company type's holder limit, when an owner's residency is not active, or when the company is not active or suspended. Signed as RFC 8785 JCS of {protocol, partner_id, command: attest_owners, attestation_key_id, payload: input without attestation_key_id and attestation}. On completion the first owner listed holds the company's record, like the customer who creates a new company through the gateway; the company stays attributed to the partner and is renewed from the partner's wallet. Idempotent on attachment_id; no pricing, debit, subscription, credential or notification effect; exposes no storage or sequential id.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/RegistrationError"
              }
            },
            "type": "object"
          },
          "message": "Partner owner statement refused"
        }
      ],
      "name": "registrationrequestservice.attest_partner_company_owners",
      "params": [
        {
          "name": "input",
          "required": true,
          "schema": {
            "type": "object",
            "required": [
              "attachment_id",
              "company",
              "owners",
              "supersede_legacy",
              "attestation_key_id",
              "attestation"
            ],
            "additionalProperties": false,
            "properties": {
              "attachment_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "company": {
                "type": "string",
                "description": "The company's opaque public id (or its signed form); never a sequential id or an internal SID"
              },
              "owners": {
                "type": "array",
                "minItems": 1,
                "items": {
                  "type": "object",
                  "required": [
                    "customer_ref",
                    "units"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "customer_ref": {
                      "type": "string",
                      "description": "The partner's own customer reference; the customer's identity must already be attested"
                    },
                    "units": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 9007199254740991
                    }
                  }
                }
              },
              "supersede_legacy": {
                "type": "boolean",
                "description": "Replace an owner the legacy API wrote; refused when false and the company has one"
              },
              "attestation_key_id": {
                "type": "string"
              },
              "attestation": {
                "type": "string",
                "description": "Ed25519 signature over the canonical bytes, hex-encoded"
              }
            }
          }
        }
      ],
      "result": {
        "description": "The recorded or replayed statement outcome",
        "name": "result",
        "schema": {
          "type": "object",
          "required": [
            "attachment_id",
            "company",
            "state",
            "replayed"
          ],
          "properties": {
            "attachment_id": {
              "type": "string"
            },
            "company": {
              "type": "string"
            },
            "state": {
              "type": "string",
              "enum": [
                "pending",
                "cap_table_applied",
                "completed",
                "refused"
              ]
            },
            "replayed": {
              "type": "boolean"
            }
          }
        }
      },
      "summary": "attest_partner_company_owners"
    },
    {
      "description": "Create the no-login user for one of the authenticated partner's customers, or find the one that exists. Keyed on the partner's own customer reference and scoped to the authenticated partner. Returns that reference and whether this call created the customer; exposes no storage SID.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "type": "object"
          },
          "message": "Partner customer refused"
        }
      ],
      "name": "registrationrequestservice.ensure_partner_customer",
      "params": [
        {
          "name": "customer_ref",
          "required": true,
          "schema": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9._:-]+$"
          }
        }
      ],
      "result": {
        "description": "The partner's customer reference and whether this call created the customer",
        "name": "result",
        "schema": {
          "type": "object",
          "required": [
            "customer_ref",
            "created"
          ],
          "properties": {
            "customer_ref": {
              "type": "string"
            },
            "created": {
              "type": "boolean"
            }
          }
        }
      },
      "summary": "ensure_partner_customer"
    },
    {
      "description": "Resolve a formatted Digital Resident identifier only when it belongs to the authenticated partner. This read creates no entity and exposes no storage SID.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "type": "object"
          },
          "message": "Partner resident reference refused"
        }
      ],
      "name": "registrationrequestservice.get_partner_resident_reference",
      "params": [
        {
          "name": "resident_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "The verified partner-owned resident reference",
        "name": "result",
        "schema": {
          "type": "object",
          "required": [
            "resident"
          ],
          "properties": {
            "resident": {
              "type": "object",
              "required": [
                "resident_id",
                "first_name",
                "last_name",
                "email"
              ],
              "properties": {
                "resident_id": {
                  "type": "string"
                },
                "first_name": {
                  "type": "string"
                },
                "last_name": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "summary": "get_partner_resident_reference"
    },
    {
      "description": "Resolve a formatted Freezone Company identifier only when it belongs to the authenticated partner. This read creates no entity and exposes no storage SID.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "type": "object"
          },
          "message": "Partner company reference refused"
        }
      ],
      "name": "registrationrequestservice.get_partner_company_reference",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "The verified partner-owned company reference",
        "name": "result",
        "schema": {
          "type": "object",
          "required": [
            "company"
          ],
          "properties": {
            "company": {
              "type": "object",
              "required": [
                "company_id",
                "name",
                "company_type"
              ],
              "properties": {
                "company_id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "company_type": {
                  "$ref": "#/components/schemas/CompanyType"
                },
                "email": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "summary": "get_partner_company_reference"
    },
    {
      "description": "Return an immutable closed UTC-month wallet statement and a freshly observed funding view for the authenticated partner. The request cannot select a partner, wallet, discount, forecast, or top-up amount and has no ledger, subscription, registration, notification, or email effect.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "type": "object"
          },
          "message": "Partner wallet statement refused"
        }
      ],
      "name": "registrationrequestservice.get_partner_wallet_statement",
      "params": [
        {
          "name": "year",
          "required": true,
          "schema": {
            "type": "integer",
            "minimum": 1970,
            "maximum": 2105
          }
        },
        {
          "name": "month",
          "required": true,
          "schema": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12
          }
        }
      ],
      "result": {
        "description": "The immutable period statement and current funding observation",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/PartnerWalletStatementResult"
        }
      },
      "summary": "get_partner_wallet_statement"
    },
    {
      "description": "Get registration status",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/RegistrationError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "registrationservice.get_status",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "entity_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/EntityType"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/RegistrationStatusResult"
        }
      },
      "summary": "get_status"
    },
    {
      "description": "Update registration status",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/RegistrationError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "registrationservice.update_status",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "entity_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/EntityType"
          }
        },
        {
          "name": "status",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/RegistrationFlowStatus"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/RegistrationStatusResult"
        }
      },
      "summary": "update_status"
    },
    {
      "description": "Check if resident payment is complete",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/RegistrationError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "registrationservice.check_payment_complete",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/PaymentCompleteResult"
        }
      },
      "summary": "check_payment_complete"
    },
    {
      "description": "Check if user KYC is complete",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/RegistrationError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "registrationservice.check_kyc_complete",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/KycCompleteResult"
        }
      },
      "summary": "check_kyc_complete"
    },
    {
      "description": "Activate resident if all requirements met",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/RegistrationError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "registrationservice.activate_if_complete",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ActivateResult"
        }
      },
      "summary": "activate_if_complete"
    },
    {
      "description": "Confirm KYC (internal)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/KycError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "registrationservice.confirm_kyc",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "resident_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/KycConfirmData"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/KycConfirmResult"
        }
      },
      "summary": "confirm_kyc"
    },
    {
      "description": "Generate balance sheet",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ReportError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "reportservice.generate_balance_sheet",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "as_of_date",
          "required": true,
          "schema": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        {
          "name": "generated_by",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/FinancialReportResult"
        }
      },
      "summary": "generate_balance_sheet"
    },
    {
      "description": "Generate income statement",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ReportError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "reportservice.generate_income_statement",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "period_start",
          "required": true,
          "schema": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        {
          "name": "period_end",
          "required": true,
          "schema": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        {
          "name": "generated_by",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/FinancialReportResult"
        }
      },
      "summary": "generate_income_statement"
    },
    {
      "description": "Generate cash flow statement",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ReportError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "reportservice.generate_cash_flow",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "period_start",
          "required": true,
          "schema": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        {
          "name": "period_end",
          "required": true,
          "schema": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        {
          "name": "generated_by",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/FinancialReportResult"
        }
      },
      "summary": "generate_cash_flow"
    },
    {
      "description": "Generate trial balance",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ReportError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "reportservice.generate_trial_balance",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "as_of_date",
          "required": true,
          "schema": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        {
          "name": "generated_by",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/FinancialReportResult"
        }
      },
      "summary": "generate_trial_balance"
    },
    {
      "description": "Get report",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ReportError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "reportservice.get_report",
      "params": [
        {
          "name": "report_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/FinancialReportDetailResult"
        }
      },
      "summary": "get_report"
    },
    {
      "description": "List reports for a company",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ReportError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "reportservice.list_reports",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "report_type",
          "required": false,
          "schema": {
            "$ref": "#/components/schemas/FinancialReportType"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/FinancialReportListResult"
        }
      },
      "summary": "list_reports"
    },
    {
      "description": "List residents with pagination",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ResidentError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "residentservice.list",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "page",
          "required": true,
          "schema": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        },
        {
          "name": "page_size",
          "required": true,
          "schema": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ResidentsListResult"
        }
      },
      "summary": "list"
    },
    {
      "description": "Create a new resident",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ResidentError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "residentservice.create",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/CreateResidentData"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ResidentResult"
        }
      },
      "summary": "create"
    },
    {
      "description": "Get resident by ID",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ResidentError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "residentservice.get",
      "params": [
        {
          "name": "resident_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ResidentResult"
        }
      },
      "summary": "get"
    },
    {
      "description": "Update resident",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ResidentError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "residentservice.update",
      "params": [
        {
          "name": "resident_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/UpdateResidentData"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ResidentResult"
        }
      },
      "summary": "update"
    },
    {
      "description": "Delete resident",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ResidentError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "residentservice.delete",
      "params": [
        {
          "name": "resident_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/DeleteResult"
        }
      },
      "summary": "delete"
    },
    {
      "description": "Update subscription",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ResidentError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "residentservice.update_subscription",
      "params": [
        {
          "name": "resident_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "plan",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "auto_renewal",
          "required": true,
          "schema": {
            "type": "boolean"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/SubscriptionResult"
        }
      },
      "summary": "update_subscription"
    },
    {
      "description": "Get resident card (public display info)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ResidentError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "residentservice.get_card",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ResidentCardResult"
        }
      },
      "summary": "get_card"
    },
    {
      "description": "Invite someone to become a shareholder",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ShareholderError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "shareholderservice.invite_shareholder",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "inviter_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "invitee_email",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "proposed_units",
          "required": true,
          "schema": {
            "type": "number"
          }
        },
        {
          "name": "message",
          "required": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/InviteResult"
        }
      },
      "summary": "invite_shareholder"
    },
    {
      "description": "Accept shareholder invite",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ShareholderError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "shareholderservice.accept_invite",
      "params": [
        {
          "name": "invite_token",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "resident_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/AcceptInviteResult"
        }
      },
      "summary": "accept_invite"
    },
    {
      "description": "Reject shareholder invite",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ShareholderError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "shareholderservice.reject_invite",
      "params": [
        {
          "name": "invite_token",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/RejectInviteResult"
        }
      },
      "summary": "reject_invite"
    },
    {
      "description": "List pending invites for a company",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ShareholderError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "shareholderservice.list_invites",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/InviteListResult"
        }
      },
      "summary": "list_invites"
    },
    {
      "description": "Initiate share transfer",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ShareholderError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "shareholderservice.initiate_transfer",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "from_resident_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "to_resident_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "units",
          "required": true,
          "schema": {
            "type": "number"
          }
        },
        {
          "name": "reason",
          "required": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TransferResult"
        }
      },
      "summary": "initiate_transfer"
    },
    {
      "description": "Approve share transfer (by recipient)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ShareholderError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "shareholderservice.approve_transfer",
      "params": [
        {
          "name": "transfer_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "to_signature",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TransferResult"
        }
      },
      "summary": "approve_transfer"
    },
    {
      "description": "Complete share transfer",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ShareholderError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "shareholderservice.complete_transfer",
      "params": [
        {
          "name": "transfer_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TransferResult"
        }
      },
      "summary": "complete_transfer"
    },
    {
      "description": "Cancel share transfer",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ShareholderError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "shareholderservice.cancel_transfer",
      "params": [
        {
          "name": "transfer_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TransferResult"
        }
      },
      "summary": "cancel_transfer"
    },
    {
      "description": "List share transfers for a company",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ShareholderError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "shareholderservice.list_transfers",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "status",
          "required": false,
          "schema": {
            "$ref": "#/components/schemas/ShareTransferStatus"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TransferListResult"
        }
      },
      "summary": "list_transfers"
    },
    {
      "description": "Initiate dividend distribution",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ShareholderError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "shareholderservice.initiate_dividend",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "total_amount",
          "required": true,
          "schema": {
            "type": "number"
          }
        },
        {
          "name": "currency",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "source_account_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "distribution_date",
          "required": true,
          "schema": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        {
          "name": "initiated_by",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/DividendResult"
        }
      },
      "summary": "initiate_dividend"
    },
    {
      "description": "Execute dividend distribution",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ShareholderError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "shareholderservice.execute_dividend",
      "params": [
        {
          "name": "dividend_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/DividendResult"
        }
      },
      "summary": "execute_dividend"
    },
    {
      "description": "List dividend distributions for a company",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ShareholderError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "shareholderservice.list_dividends",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/DividendListResult"
        }
      },
      "summary": "list_dividends"
    },
    {
      "description": "Create tax filing",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TaxError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "taxservice.create_filing",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "filing_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/TaxFilingPeriod"
          }
        },
        {
          "name": "period_start",
          "required": true,
          "schema": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        },
        {
          "name": "period_end",
          "required": true,
          "schema": {
            "description": "UTC timestamp in format YYYY-MM-DD HH:MM:SS",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TaxFilingResult"
        }
      },
      "summary": "create_filing"
    },
    {
      "description": "Get tax filing",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TaxError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "taxservice.get_filing",
      "params": [
        {
          "name": "filing_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TaxFilingDetailResult"
        }
      },
      "summary": "get_filing"
    },
    {
      "description": "Update tax filing (draft only)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TaxError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "taxservice.update_filing",
      "params": [
        {
          "name": "filing_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "gross_revenue",
          "required": true,
          "schema": {
            "type": "number"
          }
        },
        {
          "name": "cost_of_goods_sold",
          "required": true,
          "schema": {
            "type": "number"
          }
        },
        {
          "name": "operating_expenses",
          "required": true,
          "schema": {
            "type": "number"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TaxFilingResult"
        }
      },
      "summary": "update_filing"
    },
    {
      "description": "Submit tax filing",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TaxError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "taxservice.submit_filing",
      "params": [
        {
          "name": "filing_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "submitted_by",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "password",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TaxFilingResult"
        }
      },
      "summary": "submit_filing"
    },
    {
      "description": "List tax filings for a company",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TaxError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "taxservice.list_filings",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "status",
          "required": false,
          "schema": {
            "$ref": "#/components/schemas/TaxFilingStatus"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TaxFilingListResult"
        }
      },
      "summary": "list_filings"
    },
    {
      "description": "Get upcoming filing deadlines",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TaxError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "taxservice.get_deadlines",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TaxDeadlineResult"
        }
      },
      "summary": "get_deadlines"
    },
    {
      "description": "Generate tax document",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TaxError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "taxservice.generate_document",
      "params": [
        {
          "name": "filing_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "document_type",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TaxDocumentResult"
        }
      },
      "summary": "generate_document"
    },
    {
      "description": "List tax documents for a filing",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TaxError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "taxservice.list_documents",
      "params": [
        {
          "name": "filing_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TaxDocumentListResult"
        }
      },
      "summary": "list_documents"
    },
    {
      "description": "Initiate internal fund transfer",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TreasuryOperationsError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "treasuryoperationsservice.initiate_transfer",
      "params": [
        {
          "name": "from_account_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "to_account_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "amount",
          "required": true,
          "schema": {
            "type": "number"
          }
        },
        {
          "name": "currency",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "reference",
          "required": false,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "initiated_by",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/FundTransferResult"
        }
      },
      "summary": "initiate_transfer"
    },
    {
      "description": "Initiate external fund transfer",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TreasuryOperationsError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "treasuryoperationsservice.initiate_external_transfer",
      "params": [
        {
          "name": "from_account_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "to_address",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "to_name",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "amount",
          "required": true,
          "schema": {
            "type": "number"
          }
        },
        {
          "name": "currency",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "reference",
          "required": false,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "initiated_by",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/FundTransferResult"
        }
      },
      "summary": "initiate_external_transfer"
    },
    {
      "description": "Approve fund transfer",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TreasuryOperationsError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "treasuryoperationsservice.approve_transfer",
      "params": [
        {
          "name": "transfer_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "approved_by",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/FundTransferResult"
        }
      },
      "summary": "approve_transfer"
    },
    {
      "description": "Cancel fund transfer",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TreasuryOperationsError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "treasuryoperationsservice.cancel_transfer",
      "params": [
        {
          "name": "transfer_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/FundTransferResult"
        }
      },
      "summary": "cancel_transfer"
    },
    {
      "description": "List fund transfers for an account",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TreasuryOperationsError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "treasuryoperationsservice.list_transfers",
      "params": [
        {
          "name": "account_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "status",
          "required": false,
          "schema": {
            "$ref": "#/components/schemas/FundTransferStatus"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/FundTransferListResult"
        }
      },
      "summary": "list_transfers"
    },
    {
      "description": "Get exchange rate quote",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TreasuryOperationsError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "treasuryoperationsservice.get_exchange_quote",
      "params": [
        {
          "name": "from_currency",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "to_currency",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "amount",
          "required": true,
          "schema": {
            "type": "number"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ExchangeQuoteResult"
        }
      },
      "summary": "get_exchange_quote"
    },
    {
      "description": "Execute currency exchange",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TreasuryOperationsError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "treasuryoperationsservice.execute_exchange",
      "params": [
        {
          "name": "owner_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/EntityType"
          }
        },
        {
          "name": "owner_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "from_account_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "to_account_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "from_amount",
          "required": true,
          "schema": {
            "type": "number"
          }
        },
        {
          "name": "from_currency",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "exchange_rate",
          "required": true,
          "schema": {
            "type": "number"
          }
        },
        {
          "name": "initiated_by",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ExchangeResult"
        }
      },
      "summary": "execute_exchange"
    },
    {
      "description": "List exchange transactions",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TreasuryOperationsError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "treasuryoperationsservice.list_exchanges",
      "params": [
        {
          "name": "owner_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/EntityType"
          }
        },
        {
          "name": "owner_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ExchangeListResult"
        }
      },
      "summary": "list_exchanges"
    },
    {
      "description": "Get the caller's PBZ application/account overview. Freezone never moves money.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/BankingError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "bankingservice.get_overview",
      "params": [
        {
          "name": "caller_user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/BankingOverview"
        }
      },
      "summary": "get_overview"
    },
    {
      "description": "Submit a privacy-minimal PBZ account-opening application.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/BankingError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "bankingservice.submit_pbz_application",
      "params": [
        {
          "name": "caller_user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "application",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/PbzApplicationInput"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/BankingOverview"
        }
      },
      "summary": "submit_pbz_application"
    },
    {
      "description": "Advance the synthetic PBZ application for presentation/testing only.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/BankingError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "bankingservice.set_mock_application_status",
      "params": [
        {
          "name": "caller_user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "status",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/PbzApplicationStatus"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/BankingOverview"
        }
      },
      "summary": "set_mock_application_status"
    },
    {
      "description": "Refresh read-only PBZ balance and recent transactions.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/BankingError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "bankingservice.refresh_account_information",
      "params": [
        {
          "name": "caller_user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/BankingOverview"
        }
      },
      "summary": "refresh_account_information"
    },
    {
      "description": "Discard the caller's own PBZ application so the flow can be started again from the beginning. Affects only the calling resident.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/BankingError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "bankingservice.reset_mock_application",
      "params": [
        {
          "name": "caller_user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/BankingOverview"
        }
      },
      "summary": "reset_mock_application"
    },
    {
      "description": "List company treasury accounts",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TreasuryError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "treasuryservice.list_company_accounts",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TreasuryAccountsResult"
        }
      },
      "summary": "list_company_accounts"
    },
    {
      "description": "Get company treasury account",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TreasuryError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "treasuryservice.get_company_account",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "account_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TreasuryAccountResult"
        }
      },
      "summary": "get_company_account"
    },
    {
      "description": "List company treasury transactions",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TreasuryError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "treasuryservice.list_company_transactions",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "account_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TreasuryTransactionsResult"
        }
      },
      "summary": "list_company_transactions"
    },
    {
      "description": "Create company treasury account",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TreasuryError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "treasuryservice.create_company_account",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/CreateTreasuryAccountData"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TreasuryAccountResult"
        }
      },
      "summary": "create_company_account"
    },
    {
      "description": "Update company treasury account",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TreasuryError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "treasuryservice.update_company_account",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "account_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/UpdateTreasuryAccountData"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TreasuryAccountResult"
        }
      },
      "summary": "update_company_account"
    },
    {
      "description": "List resident treasury accounts",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TreasuryError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "treasuryservice.list_resident_accounts",
      "params": [
        {
          "name": "resident_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TreasuryAccountsResult"
        }
      },
      "summary": "list_resident_accounts"
    },
    {
      "description": "Get resident treasury account",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TreasuryError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "treasuryservice.get_resident_account",
      "params": [
        {
          "name": "resident_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "account_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TreasuryAccountResult"
        }
      },
      "summary": "get_resident_account"
    },
    {
      "description": "List resident treasury transactions",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TreasuryError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "treasuryservice.list_resident_transactions",
      "params": [
        {
          "name": "resident_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "account_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TreasuryTransactionsResult"
        }
      },
      "summary": "list_resident_transactions"
    },
    {
      "description": "Create resident treasury account",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TreasuryError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "treasuryservice.create_resident_account",
      "params": [
        {
          "name": "resident_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/CreateTreasuryAccountData"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TreasuryAccountResult"
        }
      },
      "summary": "create_resident_account"
    },
    {
      "description": "Update resident treasury account",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/TreasuryError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "treasuryservice.update_resident_account",
      "params": [
        {
          "name": "resident_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "account_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/UpdateTreasuryAccountData"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TreasuryAccountResult"
        }
      },
      "summary": "update_resident_account"
    },
    {
      "description": "Verify individual (Tier 1: anonymous, Tier 2: member, Tier 3: via link)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/VerificationError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "verificationservice.verify_individual",
      "params": [
        {
          "name": "resident_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "requester_tier",
          "required": true,
          "schema": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        },
        {
          "name": "link_token",
          "required": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/IndividualVerificationResult"
        }
      },
      "summary": "verify_individual"
    },
    {
      "description": "Verify company (Tier 1: anonymous, Tier 2: member, Tier 3: via link)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/VerificationError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "verificationservice.verify_company",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "requester_tier",
          "required": true,
          "schema": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        },
        {
          "name": "link_token",
          "required": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CompanyVerificationResult"
        }
      },
      "summary": "verify_company"
    },
    {
      "description": "Create verification link",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/LinkError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "verificationservice.create_verification_link",
      "params": [
        {
          "name": "entity_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/EntityType"
          }
        },
        {
          "name": "entity_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "label",
          "required": false,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "expires_in_hours",
          "required": true,
          "schema": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        },
        {
          "name": "single_use",
          "required": true,
          "schema": {
            "type": "boolean"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CreateLinkResult"
        }
      },
      "summary": "create_verification_link"
    },
    {
      "description": "Revoke verification link",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/LinkError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "verificationservice.revoke_verification_link",
      "params": [
        {
          "name": "link_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/RevokeResult"
        }
      },
      "summary": "revoke_verification_link"
    },
    {
      "description": "List verification links for user",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/LinkError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "verificationservice.list_verification_links",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/VerificationLinksResult"
        }
      },
      "summary": "list_verification_links"
    },
    {
      "description": "The admin console's list of a user's verification links, answered without their tokens. Admin-tier: a non-admin caller is refused before dispatch; admin_email is additionally checked against FREEZONE_ADMIN_EMAILS.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/LinkError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "verificationservice.admin_list_verification_links",
      "params": [
        {
          "name": "admin_email",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/VerificationLinksResult"
        }
      },
      "summary": "A user's verification links, without tokens (admin-tier)."
    },
    {
      "description": "Delete inactive verification links",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/LinkError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "verificationservice.delete_inactive_links",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/DeleteLinksResult"
        }
      },
      "summary": "delete_inactive_links"
    },
    {
      "description": "Verify by token (public endpoint)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/VerificationError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "verificationservice.verify_by_token",
      "params": [
        {
          "name": "token",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/VerifyByTokenResult"
        }
      },
      "summary": "verify_by_token"
    },
    {
      "description": "List pending registrations with optional filtering",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/AdminRegistrationError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "adminregistrationservice.list_pending_registrations",
      "params": [
        {
          "name": "status",
          "required": false,
          "schema": {
            "$ref": "#/components/schemas/RegistrationRequestStatus"
          }
        },
        {
          "name": "reseller_id",
          "required": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/RegistrationRequestListResult"
        }
      },
      "summary": "list_pending_registrations"
    },
    {
      "description": "Get full registration details with linked KYC, payment, contracts",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/AdminRegistrationError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "adminregistrationservice.get_registration_details",
      "params": [
        {
          "name": "request_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/RegistrationRequestFullDetailResult"
        }
      },
      "summary": "get_registration_details"
    },
    {
      "description": "Automated check that prerequisites are met",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/AdminRegistrationError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "adminregistrationservice.verify_registration_prerequisites",
      "params": [
        {
          "name": "request_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/PrerequisiteCheckResult"
        }
      },
      "summary": "verify_registration_prerequisites"
    },
    {
      "description": "Approve registration and create official record",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/AdminRegistrationError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "adminregistrationservice.approve_registration",
      "params": [
        {
          "name": "request_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "admin_email",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "admin_signature",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ApproveRegistrationResult"
        }
      },
      "summary": "approve_registration"
    },
    {
      "description": "Reject registration with explanation",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/AdminRegistrationError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "adminregistrationservice.reject_registration",
      "params": [
        {
          "name": "request_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "admin_email",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "reason",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/RejectRegistrationResult"
        }
      },
      "summary": "reject_registration"
    },
    {
      "description": "Request additional info from reseller",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/AdminRegistrationError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "adminregistrationservice.request_additional_info",
      "params": [
        {
          "name": "request_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "admin_email",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "message",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/RequestInfoResult"
        }
      },
      "summary": "request_additional_info"
    },
    {
      "description": "Fetch current user state (side-effect-free \u2014 no token rotation).",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/AuthError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "authservice.me",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/UserInfo"
        }
      },
      "summary": "me"
    },
    {
      "description": "Begin TOTP 2FA enrollment \u2014 returns the shared secret + provisioning URI (home#506)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/AuthError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "authservice.user_totp_enroll_begin",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TotpEnrollBegin"
        }
      },
      "summary": "user_totp_enroll_begin"
    },
    {
      "description": "Confirm TOTP enrollment by verifying a code; returns one-time backup codes (shown once)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/AuthError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "authservice.user_totp_enroll_confirm",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "code",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TotpEnrollConfirm"
        }
      },
      "summary": "user_totp_enroll_confirm"
    },
    {
      "description": "Verify a TOTP code for the caller (step-up / re-auth)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/AuthError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "authservice.user_totp_verify",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "code",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/TotpVerifyResult"
        }
      },
      "summary": "user_totp_verify"
    },
    {
      "description": "Disable TOTP 2FA for the caller (requires a fresh TOTP or backup code)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/AuthError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "authservice.user_totp_disable",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "code",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ChangePasswordResult"
        }
      },
      "summary": "user_totp_disable"
    },
    {
      "description": "Complete a 2FA login challenge with a TOTP code or a backup code (home#506)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/AuthError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "authservice.login_mfa",
      "params": [
        {
          "name": "challenge",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "code",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/AuthResult"
        }
      },
      "summary": "login_mfa"
    },
    {
      "description": "Self-service 2FA recovery (home#550): begin re-proofing for a user who lost",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/AuthError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "authservice.begin_2fa_recovery",
      "params": [
        {
          "name": "mfa_challenge",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/Begin2faRecoveryResult"
        }
      },
      "summary": "begin_2fa_recovery"
    },
    {
      "description": "Poll the opaque status of a recovery session by its opaque recovery_id (home#550)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/AuthError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "authservice.poll_2fa_recovery",
      "params": [
        {
          "name": "recovery_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/Poll2faRecoveryResult"
        }
      },
      "summary": "poll_2fa_recovery"
    },
    {
      "description": "List roles held at a company at a given instant.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CompanyRoleError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companyroleservice.list_by_company",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "as_of_epoch",
          "required": true,
          "schema": {
            "type": "integer"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CompanyRoleListResult"
        }
      },
      "summary": "list_by_company"
    },
    {
      "description": "List roles a subject (resident or corporate shareholder) holds across all companies at a given instant.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CompanyRoleError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companyroleservice.list_by_resident",
      "params": [
        {
          "name": "subject_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "as_of_epoch",
          "required": true,
          "schema": {
            "type": "integer"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CompanyRoleListResult"
        }
      },
      "summary": "list_by_resident"
    },
    {
      "description": "Get company encrypted private key blob (client decrypts locally)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/KeypairError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companyservice.get_company_encrypted_key",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/EncryptedKeyResult"
        }
      },
      "summary": "get_company_encrypted_key"
    },
    {
      "description": "Store client-generated company keypair (replaces existing)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/KeypairError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companyservice.store_company_keypair",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "public_key",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "encrypted_private_key",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/KeypairResult"
        }
      },
      "summary": "store_company_keypair"
    },
    {
      "description": "home#539: fetch a SINGLE required registration contract (with body) by its",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ContractError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "contractservice.get_required_contract",
      "params": [
        {
          "name": "entity_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/EntityType"
          }
        },
        {
          "name": "category_str",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/RegistrationContractResult"
        }
      },
      "summary": "get_required_contract"
    },
    {
      "description": "home#539: metadata-only required-contracts list \u2014 same selection as",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ContractError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "contractservice.get_required_contracts_meta",
      "params": [
        {
          "name": "entity_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/EntityType"
          }
        },
        {
          "name": "company_type",
          "required": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/RequiredContractsMetaResult"
        }
      },
      "summary": "get_required_contracts_meta"
    },
    {
      "description": "home#1009: the documents of the contract pack in force, exactly as sign_contract signs them: every registration document (the regulations included, marked not required) and, for a company type, its formation set. Each carries its registry key, version and the SHA-256 of its text. No storage id.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ContractError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "contractservice.get_current_documents",
      "params": [
        {
          "name": "company_type",
          "required": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CurrentDocumentsResult"
        }
      },
      "summary": "get_current_documents"
    },
    {
      "description": "home#1009: the documents signed for a company by its parties (owner, roster, company roles, proxies over the owner), without storage ids. A document carrying a non-public identifier lists with its content withheld. caller_user_id is server-injected.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ContractError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "contractservice.list_company_signed_documents",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "caller_user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CompanySignedDocumentsResult"
        }
      },
      "summary": "list_company_signed_documents"
    },
    {
      "description": "Partner-scoped history with public identifiers and no company prerequisite. Caller identity is injected by the authenticated server.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ContractError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "contractservice.list_resident_signed_documents",
      "params": [
        {
          "name": "caller_user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "caller_partner_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ResidentSignedDocumentsResult"
        }
      },
      "summary": "Read the acting customer\u2019s immutable personal and residency signatures."
    },
    {
      "description": "List every registration contract template known to the freezone \u2014",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ContractError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "contractservice.list_all_contracts",
      "params": [],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/RequiredContractsResult"
        }
      },
      "summary": "list_all_contracts"
    },
    {
      "description": "Get onboarding status (progressive unlock tiers)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CreditError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "creditservice.get_onboarding_status",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/OnboardingStatus"
        }
      },
      "summary": "get_onboarding_status"
    },
    {
      "description": "Initiate a wallet top-up via a specific payment provider",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CreditError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "creditservice.initiate_topup",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "amount",
          "required": true,
          "schema": {
            "type": "number"
          }
        },
        {
          "name": "provider",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ClickPesaResult"
        }
      },
      "summary": "initiate_topup"
    },
    {
      "description": "Read an owned manual bank-transfer top-up by its opaque payment reference",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CreditError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "creditservice.get_bank_transfer_status",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "reference",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/PaymentConfirmResult"
        }
      },
      "summary": "get_bank_transfer_status"
    },
    {
      "description": "Set up auto top-up via Stripe (saves card, sets threshold/amount)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CreditError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "creditservice.setup_auto_topup",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "amount",
          "required": true,
          "schema": {
            "type": "number"
          }
        },
        {
          "name": "threshold",
          "required": true,
          "schema": {
            "type": "number"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/AutoTopupResult"
        }
      },
      "summary": "setup_auto_topup"
    },
    {
      "description": "Get the saved auto top-up configuration for the current user",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CreditError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "creditservice.get_auto_topup",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/AutoTopupResult"
        }
      },
      "summary": "get_auto_topup"
    },
    {
      "description": "Disable auto top-up",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CreditError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "creditservice.disable_auto_topup",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/AutoTopupResult"
        }
      },
      "summary": "disable_auto_topup"
    },
    {
      "description": "Activate resident after credit deduction (keypair generated client-side)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CreditError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "creditservice.activate_resident",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "plan",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "public_key",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "encrypted_private_key",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ActivateResult"
        }
      },
      "summary": "activate_resident"
    },
    {
      "description": "Answer \"may subject_id read document_ref right now?\" from STORED DocumentAudience rows only; for a contract, company invoice or business document no row is stored, so no_audience_row there means nothing stored, not a refusal: ask the document's own read.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/DocumentAudienceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "documentaudienceservice.can_view",
      "params": [
        {
          "name": "subject_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "document_ref",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/DocumentCanViewResult"
        }
      },
      "summary": "can_view"
    },
    {
      "description": "List all DocumentAudience rows for a document_ref, newest first.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/DocumentAudienceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "documentaudienceservice.list_by_document",
      "params": [
        {
          "name": "document_ref",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/DocumentAudienceListResult"
        }
      },
      "summary": "list_by_document"
    },
    {
      "description": "Submit a client-signed document (signature created in WASM, server verifies with stored public key)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/SignError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "documentservice.submit_signed",
      "params": [
        {
          "name": "entity_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/EntityType"
          }
        },
        {
          "name": "entity_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "document_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/DocumentType"
          }
        },
        {
          "name": "document_hash",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "signature",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/SignResult"
        }
      },
      "summary": "submit_signed"
    },
    {
      "description": "Get dynamic form schema for a company/coop type",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/DraftError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "entitydraftservice.get_form_schema",
      "params": [
        {
          "name": "entity_type",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "company_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/CompanyType"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/FormSchemaResult"
        }
      },
      "summary": "get_form_schema"
    },
    {
      "description": "Creator: create a draft entity",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/DraftError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "entitydraftservice.create_draft",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "entity_type",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "entity_name",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "company_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/CompanyType"
          }
        },
        {
          "name": "template_data",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "shareholders",
          "required": true,
          "schema": {
            "items": {
              "$ref": "#/components/schemas/ShareholderData"
            },
            "type": "array"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/DraftResult"
        }
      },
      "summary": "create_draft"
    },
    {
      "description": "Creator: preview rendered documents before finalizing",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/DraftError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "entitydraftservice.preview_documents",
      "params": [
        {
          "name": "draft_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/DraftDocumentsResult"
        }
      },
      "summary": "preview_documents"
    },
    {
      "description": "Creator: finalize draft and send invitations",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/DraftError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "entitydraftservice.finalize_draft",
      "params": [
        {
          "name": "draft_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/DraftResult"
        }
      },
      "summary": "finalize_draft"
    },
    {
      "description": "Creator: cancel draft",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/DraftError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "entitydraftservice.cancel_draft",
      "params": [
        {
          "name": "draft_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/DraftResult"
        }
      },
      "summary": "cancel_draft"
    },
    {
      "description": "Creator: get draft status with signature progress",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/DraftError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "entitydraftservice.get_draft_status",
      "params": [
        {
          "name": "draft_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/DraftStatusResult"
        }
      },
      "summary": "get_draft_status"
    },
    {
      "description": "Creator: list drafts for user",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/DraftError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "entitydraftservice.list_drafts",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/DraftListResult"
        }
      },
      "summary": "list_drafts"
    },
    {
      "description": "Invitee: get my pending invitations",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/DraftError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "entitydraftservice.get_my_invitations",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/InvitationListResult"
        }
      },
      "summary": "get_my_invitations"
    },
    {
      "description": "Invitee: get invitation documents for review",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/DraftError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "entitydraftservice.get_invitation_documents",
      "params": [
        {
          "name": "invitation_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/DraftDocumentsResult"
        }
      },
      "summary": "get_invitation_documents"
    },
    {
      "description": "Invitee: accept invitation and sign",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/DraftError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "entitydraftservice.accept_invitation",
      "params": [
        {
          "name": "invitation_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/InvitationResult"
        }
      },
      "summary": "accept_invitation"
    },
    {
      "description": "Invitee: decline invitation",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/DraftError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "entitydraftservice.decline_invitation",
      "params": [
        {
          "name": "invitation_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "reason",
          "required": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/InvitationResult"
        }
      },
      "summary": "decline_invitation"
    },
    {
      "description": "Check if all signatures collected, trigger payment + activation",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/DraftError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "entitydraftservice.check_completion",
      "params": [
        {
          "name": "draft_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/DraftCompletionResult"
        }
      },
      "summary": "check_completion"
    },
    {
      "description": "Creator: pay for entity after all signatures collected",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/DraftError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "entitydraftservice.pay_and_activate",
      "params": [
        {
          "name": "draft_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "subscription_plan",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/CompanySubscriptionPlan"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/DraftActivationResult"
        }
      },
      "summary": "pay_and_activate"
    },
    {
      "description": "Render the invoice email the sender is about to send (home#641 Slice B).",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/InvoiceError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "invoiceservice.preview_invoice_email",
      "params": [
        {
          "name": "invoice_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "sender_user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/PreviewInvoiceEmailResult"
        }
      },
      "summary": "preview_invoice_email"
    },
    {
      "description": "Store client-generated keypair (public key + encrypted private key blob)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/KeypairError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "keypairservice.store_client_keypair",
      "params": [
        {
          "name": "entity_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/EntityType"
          }
        },
        {
          "name": "entity_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "public_key",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "encrypted_private_key",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/KeypairResult"
        }
      },
      "summary": "store_client_keypair"
    },
    {
      "description": "Get encrypted private key blob (client decrypts locally)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/KeypairError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "keypairservice.get_encrypted_private_key",
      "params": [
        {
          "name": "entity_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/EntityType"
          }
        },
        {
          "name": "entity_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/EncryptedKeyResult"
        }
      },
      "summary": "get_encrypted_private_key"
    },
    {
      "description": "Renew a company's subscription. Debits the caller's credit wallet for",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/PaymentError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "paymentservice.initiate_company_renewal",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "plan",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/SubscriptionInfo"
        }
      },
      "summary": "initiate_company_renewal"
    },
    {
      "description": "Submit a new registration request. #931 RPC extension: a verified legacy",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/RegistrationRequestError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "registrationrequestservice.submit_registration_request",
      "params": [
        {
          "name": "reseller_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "request_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/RegistrationRequestType"
          }
        },
        {
          "name": "client_email",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "client_name",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "kyc_session_id",
          "required": false,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "payment_id",
          "required": false,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "signed_contract_ids",
          "required": true,
          "schema": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        {
          "name": "reseller_signature",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/RegistrationRequestResult"
        }
      },
      "summary": "submit_registration_request"
    },
    {
      "description": "Check status of a registration request",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/RegistrationRequestError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "registrationrequestservice.get_registration_request_status",
      "params": [
        {
          "name": "request_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/RegistrationRequestDetailResult"
        }
      },
      "summary": "get_registration_request_status"
    },
    {
      "description": "List all requests for a reseller",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/RegistrationRequestError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "registrationrequestservice.list_registration_requests",
      "params": [
        {
          "name": "reseller_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/RegistrationRequestListResult"
        }
      },
      "summary": "list_registration_requests"
    },
    {
      "description": "Update a registration request (before approval, e.g., after needs_info)",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/RegistrationRequestError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "registrationrequestservice.update_registration_request",
      "params": [
        {
          "name": "request_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "client_email",
          "required": false,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "client_name",
          "required": false,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "kyc_session_id",
          "required": false,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "payment_id",
          "required": false,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "signed_contract_ids",
          "required": false,
          "schema": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/RegistrationRequestDetailResult"
        }
      },
      "summary": "update_registration_request"
    },
    {
      "description": "home#473 \u2014 owner-only: flip the subject-side anonymity flag on the caller's OWN DR.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/ResidentError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "residentservice.set_anonymity",
      "params": [
        {
          "name": "resident_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "enabled",
          "required": true,
          "schema": {
            "type": "boolean"
          }
        },
        {
          "name": "caller_user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/ResidentResult"
        }
      },
      "summary": "set_anonymity"
    },
    {
      "description": "Append a new audit row. No update, no delete \u2014 audit is append-only by construction.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/UserAuditLogError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "userauditlogservice.log",
      "params": [
        {
          "name": "subject_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "action",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/AuditAction"
          }
        },
        {
          "name": "target_ref",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "target_type",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/AuditTargetType"
          }
        },
        {
          "name": "allowed",
          "required": true,
          "schema": {
            "type": "boolean"
          }
        },
        {
          "name": "context",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/UserAuditLogResult"
        }
      },
      "summary": "log"
    },
    {
      "description": "List rows for a subject (\"what did this actor do?\"). Newest first, capped at `limit`.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/UserAuditLogError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "userauditlogservice.list_for_subject",
      "params": [
        {
          "name": "subject_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "limit",
          "required": true,
          "schema": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/UserAuditLogListResult"
        }
      },
      "summary": "list_for_subject"
    },
    {
      "description": "List rows for a target (\"who touched this entity?\"). Newest first, capped at `limit`.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/UserAuditLogError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "userauditlogservice.list_for_target",
      "params": [
        {
          "name": "target_ref",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "limit",
          "required": true,
          "schema": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/UserAuditLogListResult"
        }
      },
      "summary": "list_for_target"
    },
    {
      "description": "home#472 \u2014 owner-only: produce the server-signed opaque verify URL for the",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/VerificationError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "verificationservice.public_verify_url",
      "params": [
        {
          "name": "entity_type",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "caller_user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/PublicVerifyUrlResult"
        }
      },
      "summary": "public_verify_url"
    },
    {
      "description": "home#656 \u2014 the verify address of the caller's OWN Digital Resident: its proof of residency. No id: keyed on the server-injected caller. A partner reaches it only while acting for its own customer.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/VerificationError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "verificationservice.get_resident_verify_url",
      "params": [
        {
          "name": "caller_user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/OwnVerifyUrlResult"
        }
      },
      "summary": "get_resident_verify_url"
    },
    {
      "description": "home#656 \u2014 the verify address of a company the caller may manage, named by its public id (the owner or an act-as proxy; the owner only when a partner acts for a customer).",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/VerificationError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "verificationservice.get_company_verify_url",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "caller_user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/OwnVerifyUrlResult"
        }
      },
      "summary": "get_company_verify_url"
    },
    {
      "name": "adminregistrationservice.stop_company_renewal",
      "description": "Internal administrator action. Requires an allowlisted administrator and a reason. Stops renewal without changing registration, paid dates or wallet. Repeating the request completes an unfinished audit and adds no financial effect.",
      "params": [
        {
          "name": "admin_email",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "reason",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CompanyResult"
        }
      }
    },
    {
      "description": "Read-only company renewal costs and estimated daily billing dates for the authenticated partner wallet. No caller-selected wallet.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CompanyError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companyservice.get_billing_overview",
      "params": [
        {
          "name": "page",
          "required": true,
          "schema": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer"
          }
        },
        {
          "name": "page_size",
          "required": true,
          "schema": {
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CompanyBillingOverview"
        }
      },
      "summary": "get_billing_overview"
    },
    {
      "description": "Place a registered company on an audited billing hold or resume it. request_id makes retries idempotent; max_charge caps an expired-resume wallet debit.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CompanyError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companyservice.set_renewal_hold",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "held",
          "required": true,
          "schema": {
            "type": "boolean"
          }
        },
        {
          "name": "expected_revision",
          "required": true,
          "schema": {
            "type": "integer",
            "format": "uint64",
            "minimum": 0
          }
        },
        {
          "name": "request_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "reason",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "max_charge",
          "required": true,
          "schema": {
            "type": "number",
            "minimum": 0
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CompanyRenewalHoldResult"
        }
      },
      "summary": "set_renewal_hold"
    },
    {
      "description": "Admin-tier hold/resume. A non-admin caller is refused before dispatch; admin_email is additionally checked against FREEZONE_ADMIN_EMAILS. Holding is reversible and leaves the registration intact, unlike void_registration which supersedes and refunds.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CompanyError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companyservice.admin_set_renewal_hold",
      "params": [
        {
          "name": "admin_email",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "held",
          "required": true,
          "schema": {
            "type": "boolean"
          }
        },
        {
          "name": "expected_revision",
          "required": true,
          "schema": {
            "type": "integer",
            "format": "uint64",
            "minimum": 0
          }
        },
        {
          "name": "request_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "reason",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "max_charge",
          "required": true,
          "schema": {
            "type": "number",
            "minimum": 0
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CompanyRenewalHoldResult"
        }
      },
      "summary": "Registrar hold/resume for a company the caller does not own (admin-tier)."
    },
    {
      "description": "Return successful audited billing hold and resume transitions for a company the caller manages.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CompanyError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companyservice.get_renewal_hold_history",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/CompanyRenewalHoldHistory"
        }
      },
      "summary": "get_renewal_hold_history"
    },
    {
      "description": "Get an assigned private licence publication after company reader authorization.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CompanyError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companylicenceservice.get_assignment",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "caller_user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "act_as_resident_id",
          "required": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/LicencePublicationAssignmentResult"
        }
      },
      "summary": "get_assignment"
    },
    {
      "description": "Read the authoritative publication assignment as an authenticated administrator.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CompanyError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companylicenceservice.get_assignment_admin",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "admin_email",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/LicencePublicationAssignmentResult"
        }
      },
      "summary": "get_assignment_admin"
    },
    {
      "description": "List backend-imported immutable licence publication packages and their current availability.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CompanyError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companylicenceservice.list_publications",
      "params": [
        {
          "name": "admin_email",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/LicencePublicationsResult"
        }
      },
      "summary": "list_publications"
    },
    {
      "description": "Assign or update an imported commit-and-manifest-bound publication using an opaque revision precondition.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CompanyError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companylicenceservice.assign",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "deploy_commit",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "manifest_digest",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "expected_revision",
          "required": false,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "admin_email",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/LicencePublicationAssignmentResult"
        }
      },
      "summary": "assign"
    },
    {
      "description": "Disable a company publication using its current opaque revision.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CompanyError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companylicenceservice.disable",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "expected_revision",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "admin_email",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/LicencePublicationAssignmentResult"
        }
      },
      "summary": "disable"
    },
    {
      "description": "Create a bounded reusable or one-time full-record share for digital_asset, exchange, or both.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CompanyError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companylicenceservice.create_share",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "scope",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "mode",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "ttl_seconds",
          "required": true,
          "schema": {
            "type": "integer",
            "format": "uint64",
            "minimum": 0
          }
        },
        {
          "name": "caller_user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "act_as_resident_id",
          "required": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/LicenceShareCreatedResult"
        }
      },
      "summary": "create_share"
    },
    {
      "description": "List protected shares for a company the caller manages; token digests are never returned.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CompanyError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companylicenceservice.list_shares",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "caller_user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "act_as_resident_id",
          "required": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/LicenceSharesResult"
        }
      },
      "summary": "list_shares"
    },
    {
      "description": "Revoke a protected share for a company the caller manages.",
      "errors": [
        {
          "code": -32000,
          "data": {
            "properties": {
              "error": {
                "$ref": "#/components/schemas/CompanyError"
              }
            },
            "type": "object"
          },
          "message": "Error variant 0"
        }
      ],
      "name": "companylicenceservice.revoke_share",
      "params": [
        {
          "name": "company_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "share_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "caller_user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "act_as_resident_id",
          "required": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "description": "Method result",
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/LicenceShareResult"
        }
      },
      "summary": "revoke_share"
    },
    {
      "name": "contractservice.preview_draft_signature",
      "description": "Owner-only read of the exact text a persisted draft's applicable document would store when signed on valid_on (UTC). No signature is recorded.",
      "summary": "preview_draft_signature",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "draft_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "document_key",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "result": {
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/PreviewDraftSignatureResult"
        }
      }
    },
    {
      "name": "contractservice.sign_reviewed_draft_contract",
      "description": "Owner-only signing of a draft document whose rendered content, contract version and UTC day still match the reviewed preview. A mismatch requires a fresh review and records no signature.",
      "summary": "sign_reviewed_draft_contract",
      "params": [
        {
          "name": "user_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "draft_id",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "document_key",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "expected_content_sha256",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "expected_contract_version",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "expected_valid_on",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "operation_id",
          "description": "Canonical nonzero UUID for one signing operation. Identical retries return the original receipt; changed inputs refuse. A fresh UUID starts a new operation. Omission preserves legacy signing.",
          "required": false,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "result": {
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/SignContractResult"
        }
      }
    },
    {
      "name": "adminservice.get_inspection",
      "summary": "get_inspection",
      "description": "Admin listener and listed administrator required. Reads the complete authoritative subject inventory; missing, withheld, unresolved and read errors are distinct. Stored versions are never replaced by current templates. Certificate content is generated from current records.",
      "params": [
        {
          "name": "admin_email",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "entity_type",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "handle",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "offset",
          "required": false,
          "schema": {
            "type": "integer",
            "minimum": 0
          }
        },
        {
          "name": "limit",
          "required": false,
          "schema": {
            "type": "integer",
            "minimum": 0
          }
        }
      ],
      "result": {
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/AdminInspectionResult"
        }
      }
    },
    {
      "name": "adminservice.get_inspection_document",
      "summary": "get_inspection_document",
      "description": "Admin listener and listed administrator required. Reads the complete authoritative subject inventory; missing, withheld, unresolved and read errors are distinct. Stored versions are never replaced by current templates. Certificate content is generated from current records.",
      "params": [
        {
          "name": "admin_email",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "entity_type",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "handle",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "document_ref",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "format",
          "required": true,
          "schema": {
            "type": "string",
            "enum": [
              "view",
              "pdf"
            ]
          }
        }
      ],
      "result": {
        "name": "result",
        "schema": {
          "$ref": "#/components/schemas/AdminInspectionDocumentBody"
        }
      }
    }
  ],
  "openrpc": "1.3.2"
}
