{
  "openapi": "3.1.0",
  "info": {
    "title": "Utleggsappen API",
    "description": "The API behind [Utleggsappen](https://utleggsappen.no): expenses, drives, per diems, reports, approvals and accounting exports. Base URL `https://api.utlegg.app`. Guides, examples and the full conventions: [docs.utlegg.app](https://docs.utlegg.app/api-og-utvikling/api-og-autentisering).\n\nSend `Prefer: contract=next` on every request to get the answers this reference documents.\n\n**Authentication.** `Authorization: Bearer <token>`, where the token is a personal access token (`ua_…`, created in the web app under Settings → Developer), a service account token (`uas_…`, machine to machine for an organization) or a signed-in user's JWT.\n\n**Lists.** A page is `{ items, hasMore, nextCursor }`: pass `nextCursor` back as `cursor`, set the page size with `limit`, and add `count=true` for `total`. Filter with each list's flat parameters (`…From`/`…To` for ranges) or `filter=` (a subset of AIP-160).\n\n**Errors.** RFC 9457 `application/problem+json` with a stable `errorCode` (all codes: `GET /error-codes`) and a `traceId`.\n\n**Limits.** A `429` or `503` carries `Retry-After`: wait at least that many seconds before retrying. Where an organization's rate limit applies, answers carry `RateLimit-Policy` and `RateLimit`.\n\n**Help.** Questions and issues: [support@utleggsappen.no](mailto:support@utleggsappen.no). Include the `traceId` (or the `traceresponse` header) of the request in question.",
    "termsOfService": "https://utleggsappen.no/vilkar",
    "contact": {
      "name": "Utleggsappen support",
      "url": "https://utleggsappen.no",
      "email": "support@utleggsappen.no"
    },
    "version": "4.0.36"
  },
  "paths": {
    "/auth/refresh": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Refresh an access token",
        "operationId": "AuthController_refresh",
        "requestBody": {
          "description": "The body (Nest's `RefreshDto`).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "The answer (Nest's `TokensDto`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokensResponse"
                }
              }
            }
          }
        },
        "x-public-api": true
      }
    },
    "/auth/logout": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Log out",
        "operationId": "AuthController_logout",
        "requestBody": {
          "description": "Nest's `LogoutDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LogoutDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/auth/exchange-code": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Exchange a one-time login redirect code for its tokens",
        "operationId": "AuthController_exchangeCode",
        "requestBody": {
          "description": "Nest's `ExchangeCodeDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExchangeCodeDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "The exchange's answer (Nest's `ExchangeCode{Success,Unverified}ResponseDto`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExchangeCodeResponse"
                }
              }
            }
          }
        },
        "x-public-api": true
      }
    },
    "/auth/verify/phone/request": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Send a verification code to a phone",
        "operationId": "AuthController_requestPhoneVerification",
        "requestBody": {
          "description": "`RequestPhoneVerificationDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestPhoneVerificationDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "x-public-api": true
      }
    },
    "/auth/verify/phone/confirm": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Confirm a phone verification code and sign in",
        "operationId": "AuthController_confirmPhoneVerification",
        "requestBody": {
          "description": "`ConfirmPhoneVerificationDto` (`device`: best effort, as on `/auth/refresh`).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmPhoneVerificationDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "The answer (Nest's `TokensDto`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokensResponse"
                }
              }
            }
          }
        },
        "x-public-api": true
      }
    },
    "/auth/provider": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "The SSO providers of an email domain",
        "operationId": "AuthController_getOrganizationAuthProvider",
        "parameters": [
          {
            "in": "query",
            "name": "domain",
            "description": "An email address or a bare domain.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Nest's `ReturnProviderDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderResponse"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "x-public-api": true
      }
    },
    "/users/{id}/devices": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "A user's installations",
        "operationId": "DevicesController_list",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "userId",
            "description": "`userId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "installationId",
            "description": "`installationId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "platform",
            "description": "`platform` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "IOS",
                  "ANDROID",
                  "WEB",
                  "OTHER"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "appVersion",
            "description": "`appVersion` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "appVersionContains",
            "description": "`appVersion` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "appVersionIsNull",
            "description": "`appVersion` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "appBuild",
            "description": "`appBuild` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "appBuildContains",
            "description": "`appBuild` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "appBuildIsNull",
            "description": "`appBuild` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "osVersion",
            "description": "`osVersion` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "osVersionContains",
            "description": "`osVersion` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "osVersionIsNull",
            "description": "`osVersion` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "deviceModel",
            "description": "`deviceModel` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "deviceModelContains",
            "description": "`deviceModel` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "deviceModelIsNull",
            "description": "`deviceModel` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "firstSeenAtFrom",
            "description": "`firstSeenAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "firstSeenAtTo",
            "description": "`firstSeenAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "lastSeenAtFrom",
            "description": "`lastSeenAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "lastSeenAtTo",
            "description": "`lastSeenAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "revokedAtFrom",
            "description": "`revokedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "revokedAtTo",
            "description": "`revokedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "revokedAtIsNull",
            "description": "`revokedAt` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "pushEnabled",
            "description": "`pushEnabled` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "isSignedIn",
            "description": "`isSignedIn` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "lastSeen",
                "firstSeen",
                "platform",
                "appVersion"
              ],
              "default": "lastSeen"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100,
              "default": 50
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_DeviceListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "userId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": true,
            "facet": false,
            "searchable": false
          },
          {
            "name": "installationId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "platform",
            "type": "enum",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [
              "IOS",
              "ANDROID",
              "WEB",
              "OTHER"
            ],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "appVersion",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "appBuild",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "osVersion",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "deviceModel",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "firstSeenAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "lastSeenAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "revokedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "pushEnabled",
            "type": "bool",
            "ops": [
              "=",
              "!=",
              ":*"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "isSignedIn",
            "type": "bool",
            "ops": [
              "=",
              "!=",
              ":*"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "Device",
          "maxLimit": 100,
          "defaultLimit": 50,
          "defaultSort": "lastSeen",
          "sorts": [
            {
              "name": "lastSeen",
              "keys": [
                {
                  "field": "lastSeenAt",
                  "column": "lastSeenAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "firstSeen",
              "keys": [
                {
                  "field": "firstSeenAt",
                  "column": "firstSeenAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "platform",
              "keys": [
                {
                  "field": "platform",
                  "column": "platform",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "appVersion",
              "keys": [
                {
                  "field": "appVersion",
                  "column": "appVersion",
                  "direction": "asc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "userId",
              "field": "userId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "installationId",
              "field": "installationId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "platform",
              "field": "platform",
              "op": "eq",
              "type": "enum"
            },
            {
              "name": "appVersion",
              "field": "appVersion",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "appVersionContains",
              "field": "appVersion",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "appVersionIsNull",
              "field": "appVersion",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "appBuild",
              "field": "appBuild",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "appBuildContains",
              "field": "appBuild",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "appBuildIsNull",
              "field": "appBuild",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "osVersion",
              "field": "osVersion",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "osVersionContains",
              "field": "osVersion",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "osVersionIsNull",
              "field": "osVersion",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "deviceModel",
              "field": "deviceModel",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "deviceModelContains",
              "field": "deviceModel",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "deviceModelIsNull",
              "field": "deviceModel",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "firstSeenAtFrom",
              "field": "firstSeenAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "firstSeenAtTo",
              "field": "firstSeenAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "lastSeenAtFrom",
              "field": "lastSeenAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "lastSeenAtTo",
              "field": "lastSeenAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "revokedAtFrom",
              "field": "revokedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "revokedAtTo",
              "field": "revokedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "revokedAtIsNull",
              "field": "revokedAt",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "pushEnabled",
              "field": "pushEnabled",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "isSignedIn",
              "field": "isSignedIn",
              "op": "eq",
              "type": "bool"
            }
          ],
          "extras": []
        },
        "x-public-api": true
      }
    },
    "/users/me/devices/{installationId}": {
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Sign out one of your installations",
        "operationId": "DevicesController_revoke",
        "parameters": [
          {
            "in": "path",
            "name": "installationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/.well-known/oauth-protected-resource": {
      "get": {
        "tags": [
          "MCP"
        ],
        "summary": "Protected resource metadata",
        "operationId": "McpOAuthController_protectedResourceRoot",
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`GET /.well-known/oauth-protected-resource[/mcp]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProtectedResourceMetadata"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "x-public-api": true,
        "parameters": [
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/.well-known/oauth-protected-resource/mcp": {
      "get": {
        "tags": [
          "MCP"
        ],
        "summary": "Protected resource metadata",
        "operationId": "McpOAuthController_protectedResourcePath",
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`GET /.well-known/oauth-protected-resource[/mcp]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProtectedResourceMetadata"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "x-public-api": true,
        "parameters": [
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/.well-known/oauth-authorization-server": {
      "get": {
        "tags": [
          "MCP"
        ],
        "summary": "Authorization server metadata",
        "operationId": "McpOAuthController_authorizationServer",
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`GET /.well-known/oauth-authorization-server` (RFC 8414).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthorizationServerMetadata"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "x-public-api": true,
        "parameters": [
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/oauth/authorize": {
      "get": {
        "tags": [
          "MCP"
        ],
        "summary": "Start an MCP authorization",
        "operationId": "McpOAuthController_authorize",
        "x-public-api": true
      }
    },
    "/oauth/authorize/deny": {
      "get": {
        "tags": [
          "MCP"
        ],
        "summary": "Deny an MCP authorization",
        "operationId": "McpOAuthController_denyAuthorization",
        "x-public-api": true
      }
    },
    "/oauth/authorize/callback": {
      "get": {
        "tags": [
          "MCP"
        ],
        "summary": "Complete an MCP authorization",
        "operationId": "McpOAuthController_authorizationCallback",
        "x-public-api": true
      }
    },
    "/oauth/token": {
      "post": {
        "tags": [
          "MCP"
        ],
        "summary": "Issue MCP tokens",
        "operationId": "McpOAuthController_token",
        "requestBody": {
          "content": {
            "application/octet-stream": {}
          },
          "required": true
        },
        "x-public-api": true
      }
    },
    "/oauth/revoke": {
      "post": {
        "tags": [
          "MCP"
        ],
        "summary": "Revoke an MCP grant",
        "operationId": "McpOAuthController_revoke",
        "requestBody": {
          "content": {
            "application/octet-stream": {}
          },
          "required": true
        },
        "x-public-api": true
      }
    },
    "/auth/sso/start": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "Start an organization's single sign-on",
        "operationId": "SsoController_start",
        "x-public-api": true
      }
    },
    "/auth/oidc/callback": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "An organization's single sign-on callback",
        "operationId": "SsoController_callback",
        "x-public-api": true
      }
    },
    "/.well-known/jwks.json": {
      "get": {
        "tags": [
          "JWKS"
        ],
        "summary": "The access-token signing keys",
        "operationId": "JwksController_getJwks",
        "responses": {
          "200": {
            "description": "`GET /.well-known/jwks.json`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Jwks"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "x-public-api": true,
        "parameters": [
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/invitations/accept": {
      "post": {
        "tags": [
          "Invitations"
        ],
        "summary": "Accept an invitation",
        "operationId": "InvitationsController_acceptInviteByToken",
        "requestBody": {
          "description": "`AcceptInviteTokenDto`: `{ token }`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptInviteTokenDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "The answer to a redemption (Nest's `AcceptInviteResponseDto` without its English\n `message`, SPINE 26.4): the org's handle (where the client goes next) and the\n membership the invitation made or raised.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationAccepted"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/users": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "List users",
        "operationId": "UsersController_findAll",
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "roleFrom",
            "description": "`role` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "roleTo",
            "description": "`role` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "email",
            "description": "`email` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "givenName",
            "description": "`givenName` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "givenNameContains",
            "description": "`givenName` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "givenNameIsNull",
            "description": "`givenName` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "familyName",
            "description": "`familyName` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "familyNameContains",
            "description": "`familyName` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "familyNameIsNull",
            "description": "`familyName` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "fullName",
            "description": "`fullName` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "fullNameContains",
            "description": "`fullName` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "fullNameIsNull",
            "description": "`fullName` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "isBlocked",
            "description": "`isBlocked` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtFrom",
            "description": "`createdAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtTo",
            "description": "`createdAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtFrom",
            "description": "`updatedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtTo",
            "description": "`updatedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "deletedAtFrom",
            "description": "`deletedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "deletedAtTo",
            "description": "`deletedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "deletedAtIsNull",
            "description": "`deletedAt` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "emailContains",
            "description": "`emailContains` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "idDesc",
                "fullName",
                "fullNameDesc",
                "givenName",
                "givenNameDesc",
                "familyName",
                "familyNameDesc",
                "role",
                "roleDesc",
                "created",
                "createdAsc",
                "updated",
                "updatedAsc",
                "deleted",
                "deletedAsc"
              ],
              "default": "id"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000,
              "default": 100
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "includeDeleted",
            "description": "List closed users too (platform operators' restore screen).",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_UserListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": true,
            "facet": false,
            "searchable": false
          },
          {
            "name": "role",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "email",
            "type": "text",
            "ops": [
              "=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "givenName",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "familyName",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "fullName",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "isBlocked",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "updatedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "deletedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "emailContains",
            "type": "text",
            "ops": [
              "=",
              ":*"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "User",
          "maxLimit": 1000,
          "defaultLimit": 100,
          "defaultSort": "id",
          "sorts": [
            {
              "name": "id",
              "keys": [
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "idDesc",
              "keys": [
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "fullName",
              "keys": [
                {
                  "field": "fullName",
                  "column": "fullName",
                  "direction": "asc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "fullNameDesc",
              "keys": [
                {
                  "field": "fullName",
                  "column": "fullName",
                  "direction": "desc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "givenName",
              "keys": [
                {
                  "field": "givenName",
                  "column": "givenName",
                  "direction": "asc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "givenNameDesc",
              "keys": [
                {
                  "field": "givenName",
                  "column": "givenName",
                  "direction": "desc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "familyName",
              "keys": [
                {
                  "field": "familyName",
                  "column": "familyName",
                  "direction": "asc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "familyNameDesc",
              "keys": [
                {
                  "field": "familyName",
                  "column": "familyName",
                  "direction": "desc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "role",
              "keys": [
                {
                  "field": "role",
                  "column": "role",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "roleDesc",
              "keys": [
                {
                  "field": "role",
                  "column": "role",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "created",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "createdAsc",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "updated",
              "keys": [
                {
                  "field": "updatedAt",
                  "column": "updatedAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "updatedAsc",
              "keys": [
                {
                  "field": "updatedAt",
                  "column": "updatedAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "deleted",
              "keys": [
                {
                  "field": "deletedAt",
                  "column": "deletedAt",
                  "direction": "desc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "deletedAsc",
              "keys": [
                {
                  "field": "deletedAt",
                  "column": "deletedAt",
                  "direction": "asc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "roleFrom",
              "field": "role",
              "op": "from",
              "type": "int"
            },
            {
              "name": "roleTo",
              "field": "role",
              "op": "to",
              "type": "int"
            },
            {
              "name": "email",
              "field": "email",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "givenName",
              "field": "givenName",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "givenNameContains",
              "field": "givenName",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "givenNameIsNull",
              "field": "givenName",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "familyName",
              "field": "familyName",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "familyNameContains",
              "field": "familyName",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "familyNameIsNull",
              "field": "familyName",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "fullName",
              "field": "fullName",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "fullNameContains",
              "field": "fullName",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "fullNameIsNull",
              "field": "fullName",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "isBlocked",
              "field": "isBlocked",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "createdAtFrom",
              "field": "createdAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "createdAtTo",
              "field": "createdAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "updatedAtFrom",
              "field": "updatedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "updatedAtTo",
              "field": "updatedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "deletedAtFrom",
              "field": "deletedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "deletedAtTo",
              "field": "deletedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "deletedAtIsNull",
              "field": "deletedAt",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "emailContains",
              "field": "emailContains",
              "op": "eq",
              "type": "text"
            }
          ],
          "extras": [
            "includeDeleted"
          ]
        },
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Create a user",
        "operationId": "UsersController_create",
        "requestBody": {
          "description": "Nest's `CreateUserDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A summary-level user (SPINE 26.1: depth 0; a user as other people see it): the names,\n the e-mail and the avatar, never the phone or the address (a membership's detail adds\n them for those who may read it: identity's `AccountDetailUser`). Built only by\n [`user_summary`] (its loaders [`user_summaries_on`], [`account_summaries_on`]).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/users/{id}/block": {
      "patch": {
        "tags": [
          "Users"
        ],
        "summary": "Block a user",
        "operationId": "UsersController_block",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level user (SPINE 26.1: depth 0; a user as other people see it): the names,\n the e-mail and the avatar, never the phone or the address (a membership's detail adds\n them for those who may read it: identity's `AccountDetailUser`). Built only by\n [`user_summary`] (its loaders [`user_summaries_on`], [`account_summaries_on`]).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/users/{id}/unblock": {
      "patch": {
        "tags": [
          "Users"
        ],
        "summary": "Unblock a user",
        "operationId": "UsersController_unblock",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level user (SPINE 26.1: depth 0; a user as other people see it): the names,\n the e-mail and the avatar, never the phone or the address (a membership's detail adds\n them for those who may read it: identity's `AccountDetailUser`). Built only by\n [`user_summary`] (its loaders [`user_summaries_on`], [`account_summaries_on`]).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/users/{id}/restore": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Restore a closed user",
        "operationId": "UsersController_restore",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "The restore's answer: the platform tier the user held at the close, which the restore\n did not re-grant (`null`: none).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRestored"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/users/{id}/role": {
      "patch": {
        "tags": [
          "Users"
        ],
        "summary": "Change a user's role",
        "operationId": "UsersController_updateRole",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`UpdateUserRoleDto`: Nest's `UserRole` (0 ROOT, 1 ADMIN, 2 SUPPORT, 3 ENTERPRISE,\n 4 USER).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserRoleDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level user (SPINE 26.1: depth 0; a user as other people see it): the names,\n the e-mail and the avatar, never the phone or the address (a membership's detail adds\n them for those who may read it: identity's `AccountDetailUser`). Built only by\n [`user_summary`] (its loaders [`user_summaries_on`], [`account_summaries_on`]).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/users/me": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Your profile",
        "operationId": "UsersController_findCurrent",
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "The caller's own profile (`GET /users/me`, SPINE 26.9: a singleton, one plain type):\n the identity, their live payment cards and push tokens, their live, unblocked\n memberships of live orgs (each a [`MyAccount`]), their live\n enterprise seats, the receipt inbox the apps show (the personal one first, else the\n oldest active one) and the support widget's identity hashes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MyProfile"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true,
        "parameters": [
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/users/{id}": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "A user's profile",
        "operationId": "UsersController_findOne",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A user (`GET /users/{id}`): the identity, its live payment cards and its memberships\n (removed and blocked ones included, as the operator's restore screen reads them).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Delete your user",
        "operationId": "UsersController_remove",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "patch": {
        "tags": [
          "Users"
        ],
        "summary": "Update your profile",
        "operationId": "UsersController_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The body of `PATCH /users/:id`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUser"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level user (SPINE 26.1: depth 0; a user as other people see it): the names,\n the e-mail and the avatar, never the phone or the address (a membership's detail adds\n them for those who may read it: identity's `AccountDetailUser`). Built only by\n [`user_summary`] (its loaders [`user_summaries_on`], [`account_summaries_on`]).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/users/{id}/email-verification": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Send a new link that verifies your e-mail address",
        "description": "Mails a single-use link (valid 24 hours) to the user's current address; any earlier link stops working. A changed address gets its link with the change. At most one link a minute and five an hour (429 with Retry-After). 422 `email_already_verified` when the address is verified, `email_not_set` when there is none.",
        "operationId": "EmailVerificationController_resend",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/users/{id}/personal": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Turn your personal org on (created once, restored after)",
        "operationId": "UsersController_activatePersonal",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "The caller's own profile (`GET /users/me`, SPINE 26.9: a singleton, one plain type):\n the identity, their live payment cards and push tokens, their live, unblocked\n memberships of live orgs (each a [`MyAccount`]), their live\n enterprise seats, the receipt inbox the apps show (the personal one first, else the\n oldest active one) and the support widget's identity hashes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MyProfile"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Turn your personal org off",
        "operationId": "UsersController_deactivatePersonal",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "The caller's own profile (`GET /users/me`, SPINE 26.9: a singleton, one plain type):\n the identity, their live payment cards and push tokens, their live, unblocked\n memberships of live orgs (each a [`MyAccount`]), their live\n enterprise seats, the receipt inbox the apps show (the personal one first, else the\n oldest active one) and the support widget's identity hashes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MyProfile"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/users/{id}/profile-picture": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "The profile picture's upload intent (SPINE 26.10 item 5): then POST /uploads/{id}:confirm",
        "operationId": "UsersController_uploadProfilePicture",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The intent's body: the picture the client is about to upload.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfilePictureUploadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "The intent's 201: where the bytes go.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfilePictureUpload"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Remove the profile picture",
        "operationId": "UsersController_deleteProfilePicture",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/users/{id}/paymentcard": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Add a payment card",
        "operationId": "UsersController_addPaymentCard",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The body of `POST /users/:id/paymentcard`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddPaymentCard"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A payment card (a value object the user owns; Prisma's field order).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentCard"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/users/{id}/paymentcard/{paymentCardId}": {
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Remove a payment card",
        "operationId": "UsersController_removePaymentCard",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "paymentCardId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "patch": {
        "tags": [
          "Users"
        ],
        "summary": "Update a payment card",
        "operationId": "UsersController_updatePaymentCard",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "paymentCardId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The body of `PATCH /users/:id/paymentcard/:paymentCardId`: only what is given changes.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePaymentCard"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A payment card (a value object the user owns; Prisma's field order).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentCard"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/users/{id}/push-token": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Register a push token",
        "operationId": "UsersController_addPushToken",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The body of `POST /users/:id/push-token`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddPushToken"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A registered push token (a value object the user owns).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PushToken"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/users/{id}/push-token/{pushToken}": {
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Remove a push token",
        "operationId": "UsersController_removePushToken",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "pushToken",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/accounts/{id}": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "summary": "A membership",
        "operationId": "AccountsController_findOne",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A membership (`GET /accounts/{id}`; a removed one of a live org still reads).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Accounts"
        ],
        "summary": "Remove a membership",
        "operationId": "AccountsController_remove",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "x-public-api": true,
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Accounts"
        ],
        "summary": "Update a membership",
        "operationId": "AccountsController_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The body of `PATCH /accounts/:id`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAccount"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level account (a membership, SPINE 26.1: depth 0): its own scalars, the ids\n of the accounts it reports to, and its user's [`UserSummary`] (the field an embedding\n response cannot render without). A removed membership still embeds (`deletedAt` set):\n a report or a review names the account it was written by; a field-version conflict names\n it as `changedBy` (SPINE 26.10 item 3). Built only by [`account_summaries_on`]. The body is empty (no Content-Type) when the caller may not read the resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/accounts/{id}/payout": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "summary": "A membership's payout details: names, bank account, phone and address (the member, the org's admins, a reader of one of the member's reports; audited)",
        "operationId": "AccountPayoutController_find",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A membership's payout details (`GET /accounts/{id}/payout`, SPINE 26.12.4): a singleton\n sub-resource of the account (AIP-156), read-only projections of the member's user row.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payout"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/payouts": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "summary": "The payout details of up to 100 of an org's memberships the caller may read (audited per membership)",
        "operationId": "AccountPayoutController_batchGet",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "description": "The org whose memberships' payouts are read (exactly one).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "accountId",
            "description": "The memberships, repeated (1 to 100 ids); those the caller may not read are left out.",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A batch read's answer: the payouts the caller may read, by account id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayoutBatch"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/accounts": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "summary": "List memberships",
        "operationId": "AccountsController_findAll",
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "`organizationId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "organizationIdIsNull",
            "description": "`organizationId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "userId",
            "description": "`userId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "userIdIsNull",
            "description": "`userId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "roleFrom",
            "description": "`role` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "roleTo",
            "description": "`role` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "digestFrom",
            "description": "`digest` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "digestTo",
            "description": "`digest` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "isNotificationsEnabled",
            "description": "`isNotificationsEnabled` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "isBlocked",
            "description": "`isBlocked` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "employeeNumber",
            "description": "`employeeNumber` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "employeeNumberContains",
            "description": "`employeeNumber` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "employeeNumberIsNull",
            "description": "`employeeNumber` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "externalId",
            "description": "`externalId` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "externalIdContains",
            "description": "`externalId` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "externalIdIsNull",
            "description": "`externalId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "externalIdSource",
            "description": "`externalIdSource` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "SCIM",
                  "API",
                  "SSO_CLAIM"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "externalIdSourceIsNull",
            "description": "`externalIdSource` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "billingType",
            "description": "`billingType` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "PERIODIC",
                  "PER_REPORT"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "billingTypeIsNull",
            "description": "`billingType` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "baseCurrency",
            "description": "`baseCurrency` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "baseCurrencyContains",
            "description": "`baseCurrency` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "baseCurrencyIsNull",
            "description": "`baseCurrency` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdBy",
            "description": "`createdBy` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdByIsNull",
            "description": "`createdBy` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtFrom",
            "description": "`createdAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtTo",
            "description": "`createdAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtFrom",
            "description": "`updatedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtTo",
            "description": "`updatedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "created",
                "createdDesc",
                "updated",
                "updatedDesc",
                "name"
              ],
              "default": "id"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000,
              "default": 1000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "include",
            "description": "Side-load related resources into `included` (SPINE 26.12.2): repeat for several; a dotted path follows a relation of the resource before it (at most 3 segments, 8 paths counting the prefixes they load). A list includes to-one relations only.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "payout",
                  "organization"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "The envelope of a list whose item declares relations (SPINE 26.12.2): [`ListPage`]'s\n members and the side-loads, `{ items, hasMore, nextCursor?, total?, included? }`. Its\n schema keeps `ListPage`'s name: a route answers one or the other for an item, never\n both.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_AccountListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-relations": [
          {
            "name": "payout",
            "kind": "toOne",
            "via": "id",
            "target": "payout"
          },
          {
            "name": "organization",
            "kind": "toOne",
            "via": "organizationId",
            "target": "organization"
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "organizationId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "userId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": true,
            "facet": false,
            "searchable": false
          },
          {
            "name": "role",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "digest",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "isNotificationsEnabled",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "isBlocked",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "employeeNumber",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "externalId",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "externalIdSource",
            "type": "enum",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [
              "SCIM",
              "API",
              "SSO_CLAIM"
            ],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "billingType",
            "type": "enum",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [
              "PERIODIC",
              "PER_REPORT"
            ],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "baseCurrency",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdBy",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "updatedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "Account",
          "maxLimit": 10000,
          "defaultLimit": 1000,
          "defaultSort": "id",
          "sorts": [
            {
              "name": "id",
              "keys": [
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "created",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "createdDesc",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "updated",
              "keys": [
                {
                  "field": "updatedAt",
                  "column": "updatedAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "updatedDesc",
              "keys": [
                {
                  "field": "updatedAt",
                  "column": "updatedAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "name",
              "keys": [
                {
                  "field": "user.fullName",
                  "column": "user.fullName",
                  "direction": "asc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "organizationId",
              "field": "organizationId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "organizationIdIsNull",
              "field": "organizationId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "userId",
              "field": "userId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "userIdIsNull",
              "field": "userId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "roleFrom",
              "field": "role",
              "op": "from",
              "type": "int"
            },
            {
              "name": "roleTo",
              "field": "role",
              "op": "to",
              "type": "int"
            },
            {
              "name": "digestFrom",
              "field": "digest",
              "op": "from",
              "type": "int"
            },
            {
              "name": "digestTo",
              "field": "digest",
              "op": "to",
              "type": "int"
            },
            {
              "name": "isNotificationsEnabled",
              "field": "isNotificationsEnabled",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "isBlocked",
              "field": "isBlocked",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "employeeNumber",
              "field": "employeeNumber",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "employeeNumberContains",
              "field": "employeeNumber",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "employeeNumberIsNull",
              "field": "employeeNumber",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "externalId",
              "field": "externalId",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "externalIdContains",
              "field": "externalId",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "externalIdIsNull",
              "field": "externalId",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "externalIdSource",
              "field": "externalIdSource",
              "op": "eq",
              "type": "enum"
            },
            {
              "name": "externalIdSourceIsNull",
              "field": "externalIdSource",
              "op": "isNull",
              "type": "enum"
            },
            {
              "name": "billingType",
              "field": "billingType",
              "op": "eq",
              "type": "enum"
            },
            {
              "name": "billingTypeIsNull",
              "field": "billingType",
              "op": "isNull",
              "type": "enum"
            },
            {
              "name": "baseCurrency",
              "field": "baseCurrency",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "baseCurrencyContains",
              "field": "baseCurrency",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "baseCurrencyIsNull",
              "field": "baseCurrency",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "createdBy",
              "field": "createdBy",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "createdByIsNull",
              "field": "createdBy",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "createdAtFrom",
              "field": "createdAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "createdAtTo",
              "field": "createdAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "updatedAtFrom",
              "field": "updatedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "updatedAtTo",
              "field": "updatedAt",
              "op": "to",
              "type": "timestamp"
            }
          ],
          "extras": []
        },
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Accounts"
        ],
        "summary": "Add an existing user to an org",
        "operationId": "AccountsController_create",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "Nest's `CreateAccountDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAccountDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A summary-level account (a membership, SPINE 26.1: depth 0): its own scalars, the ids\n of the accounts it reports to, and its user's [`UserSummary`] (the field an embedding\n response cannot render without). A removed membership still embeds (`deletedAt` set):\n a report or a review names the account it was written by; a field-version conflict names\n it as `changedBy` (SPINE 26.10 item 3). Built only by [`account_summaries_on`]. The body is empty (no Content-Type) when the caller may not read the resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/accounts/test-notification": {
      "post": {
        "tags": [
          "Accounts"
        ],
        "summary": "Send a test notification to a membership",
        "operationId": "AccountsController_testNotification",
        "requestBody": {
          "description": "Nest's `NotifyAccountDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotifyAccountDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/accounts/provision": {
      "post": {
        "tags": [
          "Accounts"
        ],
        "summary": "Provision a user and a membership",
        "operationId": "AccountsController_provision",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The body of `POST /accounts/provision` (`ProvisionAccountDto`).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProvisionAccountDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A summary-level account (a membership, SPINE 26.1: depth 0): its own scalars, the ids\n of the accounts it reports to, and its user's [`UserSummary`] (the field an embedding\n response cannot render without). A removed membership still embeds (`deletedAt` set):\n a report or a review names the account it was written by; a field-version conflict names\n it as `changedBy` (SPINE 26.10 item 3). Built only by [`account_summaries_on`]. The body is empty (no Content-Type) when the caller may not read the resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/accounts/{id}/restore": {
      "post": {
        "tags": [
          "Accounts"
        ],
        "summary": "Restore a removed membership",
        "operationId": "AccountsController_restore",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /accounts/:id/restore` (no body).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreAccount"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level account (a membership, SPINE 26.1: depth 0): its own scalars, the ids\n of the accounts it reports to, and its user's [`UserSummary`] (the field an embedding\n response cannot render without). A removed membership still embeds (`deletedAt` set):\n a report or a review names the account it was written by; a field-version conflict names\n it as `changedBy` (SPINE 26.10 item 3). Built only by [`account_summaries_on`]. The body is empty (no Content-Type) when the caller may not read the resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/accounts/{id}/block": {
      "post": {
        "tags": [
          "Accounts"
        ],
        "summary": "Block a membership",
        "operationId": "AccountsController_block",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /accounts/:id/block` (no body).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BlockAccount"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level account (a membership, SPINE 26.1: depth 0): its own scalars, the ids\n of the accounts it reports to, and its user's [`UserSummary`] (the field an embedding\n response cannot render without). A removed membership still embeds (`deletedAt` set):\n a report or a review names the account it was written by; a field-version conflict names\n it as `changedBy` (SPINE 26.10 item 3). Built only by [`account_summaries_on`]. The body is empty (no Content-Type) when the caller may not read the resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/accounts/{id}/unblock": {
      "post": {
        "tags": [
          "Accounts"
        ],
        "summary": "Unblock a membership",
        "operationId": "AccountsController_unblock",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /accounts/:id/unblock` (no body).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnblockAccount"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level account (a membership, SPINE 26.1: depth 0): its own scalars, the ids\n of the accounts it reports to, and its user's [`UserSummary`] (the field an embedding\n response cannot render without). A removed membership still embeds (`deletedAt` set):\n a report or a review names the account it was written by; a field-version conflict names\n it as `changedBy` (SPINE 26.10 item 3). Built only by [`account_summaries_on`]. The body is empty (no Content-Type) when the caller may not read the resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/accounts/{id}/assign-subordinates": {
      "post": {
        "tags": [
          "Accounts"
        ],
        "summary": "Make accounts report to this manager",
        "operationId": "AccountsController_assignSubordinates",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /accounts/:id/assign-subordinates`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignSubordinates"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level account (a membership, SPINE 26.1: depth 0): its own scalars, the ids\n of the accounts it reports to, and its user's [`UserSummary`] (the field an embedding\n response cannot render without). A removed membership still embeds (`deletedAt` set):\n a report or a review names the account it was written by; a field-version conflict names\n it as `changedBy` (SPINE 26.10 item 3). Built only by [`account_summaries_on`]. The body is empty (no Content-Type) when the caller may not read the resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/accounts/{id}/unassign-subordinates": {
      "post": {
        "tags": [
          "Accounts"
        ],
        "summary": "Stop accounts reporting to this manager",
        "operationId": "AccountsController_unassignSubordinates",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /accounts/:id/unassign-subordinates` (the same body).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnassignSubordinates"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level account (a membership, SPINE 26.1: depth 0): its own scalars, the ids\n of the accounts it reports to, and its user's [`UserSummary`] (the field an embedding\n response cannot render without). A removed membership still embeds (`deletedAt` set):\n a report or a review names the account it was written by; a field-version conflict names\n it as `changedBy` (SPINE 26.10 item 3). Built only by [`account_summaries_on`]. The body is empty (no Content-Type) when the caller may not read the resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/departments": {
      "get": {
        "tags": [
          "Departments"
        ],
        "summary": "List departments",
        "operationId": "DepartmentsController_findAll",
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "`organizationId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "title",
            "description": "`title` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "titleContains",
            "description": "`title` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "accountingCode",
            "description": "`accountingCode` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "accountingCodeContains",
            "description": "`accountingCode` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "accountingCodeIsNull",
            "description": "`accountingCode` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "accountingDescription",
            "description": "`accountingDescription` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "accountingDescriptionContains",
            "description": "`accountingDescription` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "accountingDescriptionIsNull",
            "description": "`accountingDescription` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "description",
            "description": "`description` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "descriptionContains",
            "description": "`description` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "descriptionIsNull",
            "description": "`description` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "isPublic",
            "description": "`isPublic` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "managedByIntegrationId",
            "description": "`managedByIntegrationId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "managedByIntegrationIdIsNull",
            "description": "`managedByIntegrationId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtFrom",
            "description": "`createdAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtTo",
            "description": "`createdAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtFrom",
            "description": "`updatedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtTo",
            "description": "`updatedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "titleOrCodeContains",
            "description": "`titleOrCodeContains` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "title",
                "titleDesc",
                "updated",
                "updatedAsc"
              ],
              "default": "id"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000,
              "default": 1000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "include",
            "description": "Side-load related resources into `included` (SPINE 26.12.2): repeat for several; a dotted path follows a relation of the resource before it (at most 3 segments, 8 paths counting the prefixes they load). A list includes to-one relations only.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "organization"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "The envelope of a list whose item declares relations (SPINE 26.12.2): [`ListPage`]'s\n members and the side-loads, `{ items, hasMore, nextCursor?, total?, included? }`. Its\n schema keeps `ListPage`'s name: a route answers one or the other for an item, never\n both.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_DepartmentListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-relations": [
          {
            "name": "organization",
            "kind": "toOne",
            "via": "organizationId",
            "target": "organization"
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "organizationId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "title",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "accountingCode",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "accountingDescription",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "description",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "isPublic",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "managedByIntegrationId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "updatedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "titleOrCodeContains",
            "type": "text",
            "ops": [
              "=",
              ":*"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "Department",
          "maxLimit": 10000,
          "defaultLimit": 1000,
          "defaultSort": "id",
          "sorts": [
            {
              "name": "id",
              "keys": [
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "title",
              "keys": [
                {
                  "field": "title",
                  "column": "title",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "titleDesc",
              "keys": [
                {
                  "field": "title",
                  "column": "title",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "updated",
              "keys": [
                {
                  "field": "updatedAt",
                  "column": "updatedAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "updatedAsc",
              "keys": [
                {
                  "field": "updatedAt",
                  "column": "updatedAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "organizationId",
              "field": "organizationId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "title",
              "field": "title",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "titleContains",
              "field": "title",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "accountingCode",
              "field": "accountingCode",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "accountingCodeContains",
              "field": "accountingCode",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "accountingCodeIsNull",
              "field": "accountingCode",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "accountingDescription",
              "field": "accountingDescription",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "accountingDescriptionContains",
              "field": "accountingDescription",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "accountingDescriptionIsNull",
              "field": "accountingDescription",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "description",
              "field": "description",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "descriptionContains",
              "field": "description",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "descriptionIsNull",
              "field": "description",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "isPublic",
              "field": "isPublic",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "managedByIntegrationId",
              "field": "managedByIntegrationId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "managedByIntegrationIdIsNull",
              "field": "managedByIntegrationId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "createdAtFrom",
              "field": "createdAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "createdAtTo",
              "field": "createdAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "updatedAtFrom",
              "field": "updatedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "updatedAtTo",
              "field": "updatedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "titleOrCodeContains",
              "field": "titleOrCodeContains",
              "op": "eq",
              "type": "text"
            }
          ],
          "extras": []
        },
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Departments"
        ],
        "summary": "Create a department",
        "operationId": "DepartmentsController_create",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /departments`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDepartmentDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A summary-level department (SPINE 26.1: depth 0).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepartmentSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/departments/{id}": {
      "get": {
        "tags": [
          "Departments"
        ],
        "summary": "Get a department",
        "operationId": "DepartmentsController_findOne",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A department (`GET /departments/{id}`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepartmentDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Departments"
        ],
        "summary": "Delete a department",
        "operationId": "DepartmentsController_remove",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "x-public-api": true,
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Departments"
        ],
        "summary": "Update a department",
        "operationId": "DepartmentsController_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`PATCH /departments/{id}`: every field optional; `organizationId` is not accepted\n (a department's tenant is fixed at create, and an unknown key is ignored).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDepartmentDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level department (SPINE 26.1: depth 0).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepartmentSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/departments/{id}/members": {
      "get": {
        "tags": [
          "Departments"
        ],
        "summary": "List a department's members, paged",
        "operationId": "DepartmentsController_findMembers",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "accountId",
            "description": "`accountId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "roleFrom",
            "description": "`role` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "roleTo",
            "description": "`role` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "search",
            "description": "`search` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "name"
              ],
              "default": "name"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 500,
              "default": 50
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_DepartmentMemberListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": [
          {
            "name": "accountId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "role",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "search",
            "type": "text",
            "ops": [
              "=",
              ":*"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "DepartmentMember",
          "maxLimit": 500,
          "defaultLimit": 50,
          "defaultSort": "name",
          "sorts": [
            {
              "name": "name",
              "keys": [
                {
                  "field": "account.user.fullName",
                  "column": "account.user.fullName",
                  "direction": "asc",
                  "nullsFirst": false
                },
                {
                  "field": "accountId",
                  "column": "accountId",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            }
          ],
          "params": [
            {
              "name": "accountId",
              "field": "accountId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "roleFrom",
              "field": "role",
              "op": "from",
              "type": "int"
            },
            {
              "name": "roleTo",
              "field": "role",
              "op": "to",
              "type": "int"
            },
            {
              "name": "search",
              "field": "search",
              "op": "eq",
              "type": "text"
            }
          ],
          "extras": []
        },
        "x-public-api": true
      }
    },
    "/departments/{id}/accounts/connect": {
      "post": {
        "tags": [
          "Departments"
        ],
        "summary": "Add members to a department",
        "operationId": "DepartmentsController_connectAccounts",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`{ accountIds }` for connect and disconnect.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectOrDisconnectAccountsDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level department (SPINE 26.1: depth 0).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepartmentSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/departments/{id}/accounts/disconnect": {
      "post": {
        "tags": [
          "Departments"
        ],
        "summary": "Remove members from a department",
        "operationId": "DepartmentsController_disconnectAccounts",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`{ accountIds }` for connect and disconnect.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectOrDisconnectAccountsDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level department (SPINE 26.1: depth 0).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepartmentSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/departments/{id}/projects/connect": {
      "post": {
        "tags": [
          "Departments"
        ],
        "summary": "Link projects to a department",
        "operationId": "DepartmentsController_connectProjects",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`{ projectIds }` for connect and disconnect (`ConnectProjectsDto`: at most 500 ids, each\n a `z.uuid()`).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectProjectsDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level department (SPINE 26.1: depth 0).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepartmentSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/departments/{id}/projects/disconnect": {
      "post": {
        "tags": [
          "Departments"
        ],
        "summary": "Unlink projects from a department",
        "operationId": "DepartmentsController_disconnectProjects",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`{ projectIds }` for connect and disconnect (`ConnectProjectsDto`: at most 500 ids, each\n a `z.uuid()`).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectProjectsDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level department (SPINE 26.1: depth 0).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepartmentSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/departments/{id}/accounts/{accountId}": {
      "patch": {
        "tags": [
          "Departments"
        ],
        "summary": "Change a member's department role",
        "operationId": "DepartmentsController_updateDepartmentAssignmentRole",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "accountId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`PATCH /departments/{id}/accounts/{accountId}`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDepartmentAssignmentRoleDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level department (SPINE 26.1: depth 0).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepartmentSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/organizations/{organizationId}/access-grants": {
      "get": {
        "tags": [
          "Access grants"
        ],
        "summary": "Every access grant this organization has issued",
        "operationId": "TenantAccessGrantsController_list",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_AccessGrantListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Access grants"
        ],
        "summary": "Grant a practitioner scoped access to this organization",
        "operationId": "TenantAccessGrantsController_issue",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`IssueTenantAccessGrantDto`: the tenant is the path's, never the body's.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IssueTenantAccessGrantDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "An access grant as writes answer it (depth 0: the `tenant_access_grants` columns).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessGrantSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/invitations": {
      "get": {
        "tags": [
          "Invitations"
        ],
        "summary": "Your incoming invitations",
        "operationId": "InvitationsController_getInvitationsByUser",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_IncomingInvitation"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Invitations"
        ],
        "summary": "An invitation, by its token",
        "operationId": "InvitationsController_getInvitationByToken",
        "requestBody": {
          "description": "`GetInviteTokenDto` / `RevokeInviteTokenDto`: `{ token }`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteTokenDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "An invitation as its token holder reads it (`POST /invitations`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationDetail"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/invitations/revoke": {
      "post": {
        "tags": [
          "Invitations"
        ],
        "summary": "Withdraw an invitation, by its token",
        "operationId": "InvitationsController_revokeInviteByToken",
        "requestBody": {
          "description": "`GetInviteTokenDto` / `RevokeInviteTokenDto`: `{ token }`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteTokenDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/users/me/access-grants": {
      "get": {
        "tags": [
          "Access grants"
        ],
        "summary": "Your own cross-organization access grants",
        "operationId": "TenantAccessGrantsController_currentUserGrants",
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_AccessGrantListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true,
        "parameters": [
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/organizations/{organizationId}/access-grants/{id}": {
      "delete": {
        "tags": [
          "Access grants"
        ],
        "summary": "Withdraw a practitioner's access",
        "operationId": "TenantAccessGrantsController_revoke",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "x-public-api": true,
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/users/me/permissions": {
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "The caller's own effective access",
        "operationId": "RolesController_currentUserPermissions",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "description": "Narrows the access to one organization (its id or handle).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`EffectiveAccessDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EffectiveAccessDto"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/organizations/{id}/auth-provider": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "The organization's SSO provider",
        "operationId": "OrganizationsController_getAuthProvider",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "description": "`OrganizationAuthProviderDto`.",
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "provider": {
                      "type": "string"
                    },
                    "kind": {
                      "description": "`ENTRA_COMMON` (org-admin editable) or `OIDC` (operator managed).",
                      "type": "string"
                    },
                    "domain": {
                      "description": "The SSO email domain; `null` for an OIDC provider.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "isEnabled": {
                      "type": "boolean"
                    },
                    "createOnLogin": {
                      "type": "boolean"
                    },
                    "entraTenantId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "provider",
                    "kind",
                    "domain",
                    "isEnabled",
                    "createOnLogin",
                    "entraTenantId"
                  ]
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Organizations"
        ],
        "summary": "Remove the organization's SSO provider",
        "operationId": "OrganizationsController_removeAuthProvider",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "x-public-api": true,
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Organizations"
        ],
        "summary": "Set the organization's SSO provider",
        "operationId": "OrganizationsController_upsertAuthProvider",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`UpsertOrganizationAuthProviderDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertOrganizationAuthProviderDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`OrganizationAuthProviderDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationAuthProviderDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/enterprise/{id}": {
      "get": {
        "tags": [
          "Enterprise"
        ],
        "summary": "The enterprise workspace",
        "operationId": "EnterpriseController_findOne",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "An enterprise (`GET /enterprise/{id}`). The columns past the identity are a full-scope\n seat's (an operator's); a SELECTED seat reads them as `null`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnterpriseDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Enterprise"
        ],
        "summary": "Delete the enterprise",
        "operationId": "EnterpriseController_remove",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "patch": {
        "tags": [
          "Enterprise"
        ],
        "summary": "Update the enterprise",
        "operationId": "EnterpriseController_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`UpdateEnterpriseDto`: every field optional. The billing terms (`poCustomerId`,\n `consolidatedBilling`, `billingAnchorDay`) are a platform operator's.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEnterpriseDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level enterprise (konsern; SPINE 26.1): its identity, the fields every caller\n that sees the enterprise at all may see (a SELECTED seat included). Built only by\n identity's `org::enterprise::enterprise_summary`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnterpriseSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/enterprise": {
      "post": {
        "tags": [
          "Enterprise"
        ],
        "summary": "Create an enterprise",
        "operationId": "EnterpriseController_create",
        "requestBody": {
          "description": "`CreateEnterpriseDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEnterpriseDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A summary-level enterprise (konsern; SPINE 26.1): its identity, the fields every caller\n that sees the enterprise at all may see (a SELECTED seat included). Built only by\n identity's `org::enterprise::enterprise_summary`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnterpriseSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/enterprise/{id}/organizations": {
      "get": {
        "tags": [
          "Enterprise"
        ],
        "summary": "The enterprise's member organizations",
        "operationId": "EnterpriseController_findOrganizations",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "handle",
            "description": "`handle` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "handleContains",
            "description": "`handle` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "displayName",
            "description": "`displayName` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "displayNameContains",
            "description": "`displayName` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "legalName",
            "description": "`legalName` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "legalNameContains",
            "description": "`legalName` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "legalNameIsNull",
            "description": "`legalName` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "orgNumber",
            "description": "`orgNumber` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "orgNumberContains",
            "description": "`orgNumber` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "orgNumberIsNull",
            "description": "`orgNumber` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "isPersonal",
            "description": "`isPersonal` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "enterpriseId",
            "description": "`enterpriseId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "enterpriseIdIsNull",
            "description": "`enterpriseId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtFrom",
            "description": "`createdAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtTo",
            "description": "`createdAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtFrom",
            "description": "`updatedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtTo",
            "description": "`updatedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "displayName",
                "displayNameDesc",
                "created",
                "createdAsc"
              ],
              "default": "id"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000,
              "default": 1000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_EnterpriseOrganizationListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "handle",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "displayName",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "legalName",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "orgNumber",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "isPersonal",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "enterpriseId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "updatedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "EnterpriseOrganization",
          "maxLimit": 10000,
          "defaultLimit": 1000,
          "defaultSort": "id",
          "sorts": [
            {
              "name": "id",
              "keys": [
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "displayName",
              "keys": [
                {
                  "field": "displayName",
                  "column": "displayName",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "displayNameDesc",
              "keys": [
                {
                  "field": "displayName",
                  "column": "displayName",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "created",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "createdAsc",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "handle",
              "field": "handle",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "handleContains",
              "field": "handle",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "displayName",
              "field": "displayName",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "displayNameContains",
              "field": "displayName",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "legalName",
              "field": "legalName",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "legalNameContains",
              "field": "legalName",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "legalNameIsNull",
              "field": "legalName",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "orgNumber",
              "field": "orgNumber",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "orgNumberContains",
              "field": "orgNumber",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "orgNumberIsNull",
              "field": "orgNumber",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "isPersonal",
              "field": "isPersonal",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "enterpriseId",
              "field": "enterpriseId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "enterpriseIdIsNull",
              "field": "enterpriseId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "createdAtFrom",
              "field": "createdAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "createdAtTo",
              "field": "createdAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "updatedAtFrom",
              "field": "updatedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "updatedAtTo",
              "field": "updatedAt",
              "op": "to",
              "type": "timestamp"
            }
          ],
          "extras": []
        },
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Enterprise"
        ],
        "summary": "Create an organization in the enterprise",
        "operationId": "EnterpriseController_createOrganization",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`CreateOrganizationDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrganizationDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A summary-level organization (SPINE 26.1; RESPONSE-SHAPES section 3): what every\n embed and every organization write answers. `handle` is the org's URL identity (the\n web apps route by it). Built only by identity's `org::read::organization_summary`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/enterprise/{id}/organizations/{organizationId}": {
      "delete": {
        "tags": [
          "Enterprise"
        ],
        "summary": "Unlink an organization from the enterprise",
        "operationId": "EnterpriseController_removeOrganization",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/enterprise/{enterpriseId}/accounts": {
      "get": {
        "tags": [
          "Enterprise Accounts"
        ],
        "summary": "The enterprise's seats",
        "operationId": "EnterpriseAccountsController_findAll",
        "parameters": [
          {
            "in": "path",
            "name": "enterpriseId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "userId",
            "description": "`userId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "roleFrom",
            "description": "`role` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "roleTo",
            "description": "`role` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "organizationScope",
            "description": "`organizationScope` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ALL",
                  "SELECTED"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtFrom",
            "description": "`createdAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtTo",
            "description": "`createdAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtFrom",
            "description": "`updatedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtTo",
            "description": "`updatedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "created",
                "createdAsc",
                "updated",
                "role"
              ],
              "default": "id"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000,
              "default": 1000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_EnterpriseSeatListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "userId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "role",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "organizationScope",
            "type": "enum",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [
              "ALL",
              "SELECTED"
            ],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "updatedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "EnterpriseSeat",
          "maxLimit": 10000,
          "defaultLimit": 1000,
          "defaultSort": "id",
          "sorts": [
            {
              "name": "id",
              "keys": [
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "created",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "createdAsc",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "updated",
              "keys": [
                {
                  "field": "updatedAt",
                  "column": "updatedAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "role",
              "keys": [
                {
                  "field": "role",
                  "column": "role",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "userId",
              "field": "userId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "roleFrom",
              "field": "role",
              "op": "from",
              "type": "int"
            },
            {
              "name": "roleTo",
              "field": "role",
              "op": "to",
              "type": "int"
            },
            {
              "name": "organizationScope",
              "field": "organizationScope",
              "op": "eq",
              "type": "enum"
            },
            {
              "name": "createdAtFrom",
              "field": "createdAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "createdAtTo",
              "field": "createdAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "updatedAtFrom",
              "field": "updatedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "updatedAtTo",
              "field": "updatedAt",
              "op": "to",
              "type": "timestamp"
            }
          ],
          "extras": []
        },
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Enterprise Accounts"
        ],
        "summary": "Give a user a seat",
        "operationId": "EnterpriseAccountsController_create",
        "parameters": [
          {
            "in": "path",
            "name": "enterpriseId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`CreateEnterpriseAccountDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEnterpriseAccountDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A seat as its writes answer it (depth 0).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnterpriseSeatSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/enterprise/{enterpriseId}/accounts/{accountId}": {
      "get": {
        "tags": [
          "Enterprise Accounts"
        ],
        "summary": "One seat",
        "operationId": "EnterpriseAccountsController_findOne",
        "parameters": [
          {
            "in": "path",
            "name": "enterpriseId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "accountId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A seat (`GET …/accounts/{accountId}`): its user and its live org assignments.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnterpriseSeatDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Enterprise Accounts"
        ],
        "summary": "Remove a seat",
        "operationId": "EnterpriseAccountsController_remove",
        "parameters": [
          {
            "in": "path",
            "name": "enterpriseId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "accountId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "patch": {
        "tags": [
          "Enterprise Accounts"
        ],
        "summary": "Change a seat's role or scope",
        "operationId": "EnterpriseAccountsController_update",
        "parameters": [
          {
            "in": "path",
            "name": "enterpriseId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "accountId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`UpdateEnterpriseAccountDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEnterpriseAccountDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A seat as its writes answer it (depth 0).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnterpriseSeatSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/enterprise/{enterpriseId}/users/search": {
      "get": {
        "tags": [
          "Enterprise Users"
        ],
        "summary": "Search the users of the member orgs your seat reaches",
        "operationId": "EnterpriseUsersController_searchUsers",
        "parameters": [
          {
            "in": "path",
            "name": "enterpriseId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "q",
            "description": "A substring of the name, e-mail or phone number (1 to 256 characters, trimmed).",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "At most this many users (1 to 100, default 20).",
            "schema": {
              "type": "integer"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_EnterpriseUserListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/enterprise/{enterpriseId}/invitations": {
      "get": {
        "tags": [
          "Enterprise Invitations"
        ],
        "summary": "List all invitations for the enterprise",
        "operationId": "EnterpriseInvitationsController_findAll",
        "parameters": [
          {
            "in": "path",
            "name": "enterpriseId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "roleFrom",
            "description": "`role` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "roleTo",
            "description": "`role` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "organizationScope",
            "description": "`organizationScope` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ALL",
                  "SELECTED"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "expiresAtFrom",
            "description": "`expiresAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "expiresAtTo",
            "description": "`expiresAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "expiresAtIsNull",
            "description": "`expiresAt` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtFrom",
            "description": "`createdAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtTo",
            "description": "`createdAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "redeemedAtFrom",
            "description": "`redeemedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "redeemedAtTo",
            "description": "`redeemedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "redeemedAtIsNull",
            "description": "`redeemedAt` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdByUserId",
            "description": "`createdByUserId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdByUserIdIsNull",
            "description": "`createdByUserId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "redeemedByUserId",
            "description": "`redeemedByUserId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "redeemedByUserIdIsNull",
            "description": "`redeemedByUserId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "created",
                "createdAsc",
                "expires"
              ],
              "default": "id"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000,
              "default": 1000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_EnterpriseInvitationListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "role",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "organizationScope",
            "type": "enum",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [
              "ALL",
              "SELECTED"
            ],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "expiresAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "redeemedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdByUserId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "redeemedByUserId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "EnterpriseInvitation",
          "maxLimit": 10000,
          "defaultLimit": 1000,
          "defaultSort": "id",
          "sorts": [
            {
              "name": "id",
              "keys": [
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "created",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "createdAsc",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "expires",
              "keys": [
                {
                  "field": "expiresAt",
                  "column": "expiresAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "roleFrom",
              "field": "role",
              "op": "from",
              "type": "int"
            },
            {
              "name": "roleTo",
              "field": "role",
              "op": "to",
              "type": "int"
            },
            {
              "name": "organizationScope",
              "field": "organizationScope",
              "op": "eq",
              "type": "enum"
            },
            {
              "name": "expiresAtFrom",
              "field": "expiresAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "expiresAtTo",
              "field": "expiresAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "expiresAtIsNull",
              "field": "expiresAt",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "createdAtFrom",
              "field": "createdAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "createdAtTo",
              "field": "createdAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "redeemedAtFrom",
              "field": "redeemedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "redeemedAtTo",
              "field": "redeemedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "redeemedAtIsNull",
              "field": "redeemedAt",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "createdByUserId",
              "field": "createdByUserId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "createdByUserIdIsNull",
              "field": "createdByUserId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "redeemedByUserId",
              "field": "redeemedByUserId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "redeemedByUserIdIsNull",
              "field": "redeemedByUserId",
              "op": "isNull",
              "type": "id"
            }
          ],
          "extras": []
        },
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Enterprise Invitations"
        ],
        "summary": "Create an invitation to join the enterprise",
        "operationId": "EnterpriseInvitationsController_create",
        "parameters": [
          {
            "in": "path",
            "name": "enterpriseId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "An enterprise invitation as its writes answer it (depth 0; never the token or the\n verification budgets).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnterpriseInvitationSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/enterprise/{enterpriseId}/invitations/{invitationId}": {
      "delete": {
        "tags": [
          "Enterprise Invitations"
        ],
        "summary": "Revoke an invitation",
        "operationId": "EnterpriseInvitationsController_revoke",
        "parameters": [
          {
            "in": "path",
            "name": "enterpriseId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "invitationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/enterprise/invitations/{token}": {
      "get": {
        "tags": [
          "Enterprise Invitations"
        ],
        "summary": "Get invitation details by token (for accept page)",
        "operationId": "EnterpriseInvitationsController_findByToken",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "The recipient-safe invitation (`GET /enterprise/invitations/{token}`; Nest's\n `toRecipientSafeInvitation`): no inviter or redeemer, the enterprise's summary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnterpriseInvitationPreview"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "x-public-api": true
      }
    },
    "/enterprise/invitations/{token}/verification": {
      "post": {
        "tags": [
          "Enterprise Invitations"
        ],
        "summary": "Send a confirmation code to the enterprise invitation recipient",
        "operationId": "EnterpriseInvitationsController_requestVerification",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`EnterpriseInvitationVerificationResponseDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnterpriseInvitationVerificationResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/enterprise/invitations/{token}/accept": {
      "post": {
        "tags": [
          "Enterprise Invitations"
        ],
        "summary": "Accept an invitation and join the enterprise",
        "operationId": "EnterpriseInvitationsController_accept",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`AcceptEnterpriseInvitationDto`: `{ code? }` (six digits).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptEnterpriseInvitationDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "An enterprise invitation as its writes answer it (depth 0; never the token or the\n verification budgets).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnterpriseInvitationSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/invitations/email": {
      "post": {
        "tags": [
          "Invitations"
        ],
        "summary": "Invite by e-mail",
        "operationId": "InvitationsController_inviteByEmail",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`InviteByEmailDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteByEmailDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "`InviteResultDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteResultDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/invitations/phone": {
      "post": {
        "tags": [
          "Invitations"
        ],
        "summary": "Invite by phone",
        "operationId": "InvitationsController_inviteByPhone",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`InviteByPhoneDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteByPhoneDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "`InviteResultDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteResultDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/invitations/link": {
      "post": {
        "tags": [
          "Invitations"
        ],
        "summary": "Create an invitation link",
        "operationId": "InvitationsController_inviteByLink",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The invitation options every channel shares (`BaseTokenDto`).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenOptions"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "The link answer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteLink"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/organizations/{id}": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Get an organization by id or handle",
        "operationId": "OrganizationsController_findOne",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The org's id or handle.",
            "required": true,
            "schema": {
              "description": "The org's id or handle.",
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "An organization (`GET /organizations/{id}`): its settings and the parts above.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Organizations"
        ],
        "summary": "Delete the organization",
        "operationId": "OrganizationsController_remove",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "x-public-api": true,
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Organizations"
        ],
        "summary": "Update the organization's settings",
        "operationId": "OrganizationsController_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The body of `PATCH /organizations/{id}`: every field optional; a field sent `null`\n clears it where the column is nullable.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrganizationDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level organization (SPINE 26.1; RESPONSE-SHAPES section 3): what every\n embed and every organization write answers. `handle` is the org's URL identity (the\n web apps route by it). Built only by identity's `org::read::organization_summary`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/permissions": {
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "The permission catalogue",
        "operationId": "RolesController_permissionCatalog",
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_Permission"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true,
        "parameters": [
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/roles-catalog": {
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "The SYSTEM roles",
        "operationId": "RolesController_systemRoleCatalog",
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_RoleListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true,
        "parameters": [
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/roles": {
      "post": {
        "tags": [
          "Roles"
        ],
        "summary": "Create a custom role",
        "operationId": "RolesController_create",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`CreateRoleDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A role as writes answer it and other aggregates embed it (depth 0).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/organizations/{organizationId}/roles": {
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "An organization's custom roles",
        "operationId": "RolesController_list",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_RoleListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/organizations/{organizationId}/member-roles": {
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "The roles an organization's members can hold: the system tiers and its custom roles",
        "operationId": "MemberRolesController_findAll",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_MemberRole"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/roles/{id}": {
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "A custom role",
        "operationId": "RolesController_findOne",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A custom role (`GET /roles/{id}`): the list row and its parent SYSTEM role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Roles"
        ],
        "summary": "Delete a custom role",
        "operationId": "RolesController_remove",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "x-public-api": true,
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Roles"
        ],
        "summary": "Update a custom role",
        "operationId": "RolesController_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`UpdateRoleDto`: the create's fields but `organizationId` and `scope`, all optional.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoleDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A role as writes answer it and other aggregates embed it (depth 0).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/roles/{id}/users": {
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "A role's assignees",
        "operationId": "RolesController_listAssignees",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_RoleAssignee"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/roles/{id}/users/connect": {
      "post": {
        "tags": [
          "Roles"
        ],
        "summary": "Assign a role to users",
        "operationId": "RolesController_connectUsers",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`ConnectUsersToRoleDto`: a non-empty list of distinct ids.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectUsersToRoleDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`{succeeded, failed}`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleAssignmentResult"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/roles/{id}/users/disconnect": {
      "post": {
        "tags": [
          "Roles"
        ],
        "summary": "Unassign a role from users",
        "operationId": "RolesController_disconnectUsers",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`ConnectUsersToRoleDto`: a non-empty list of distinct ids.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectUsersToRoleDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`{succeeded, failed}`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleAssignmentResult"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/organizations": {
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "Create an organization",
        "operationId": "OrganizationsController_create",
        "requestBody": {
          "description": "`CreateOrganizationDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrganizationDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A summary-level organization (SPINE 26.1; RESPONSE-SHAPES section 3): what every\n embed and every organization write answers. `handle` is the org's URL identity (the\n web apps route by it). Built only by identity's `org::read::organization_summary`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/organizations/exists": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Whether an organization number or handle is taken",
        "operationId": "OrganizationsController_exists",
        "parameters": [
          {
            "in": "query",
            "name": "orgnumber",
            "description": "An organization number.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "handle",
            "description": "An organization handle.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/sse/events": {
      "get": {
        "tags": [
          "Sse"
        ],
        "summary": "The caller's stream of UI events",
        "operationId": "SseController_sse",
        "parameters": [
          {
            "in": "query",
            "name": "scopes",
            "description": "A JSON array of UiEventScope: the events to receive",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UiEventScope"
                  }
                }
              }
            },
            "style": "form"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A stream of server-sent events; each event's `data` is this JSON",
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/UiStreamEvent"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/users/me/feature-flags": {
      "get": {
        "tags": [
          "Feature flags"
        ],
        "summary": "Every app-visible flag, evaluated for the caller",
        "operationId": "CurrentUserFeatureFlagsController_current",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "description": "Evaluate for this organization (1-36 characters)",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "userId",
            "description": "Evaluate for this user (1-36 characters)",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`CurrentUserFeatureFlagsDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CurrentUserFeatureFlags"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/organizations/{organizationId}/audit-trail": {
      "get": {
        "tags": [
          "Audit trail"
        ],
        "summary": "Your organization's audit trail",
        "operationId": "AuditTrailController_list",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "category",
            "description": "An audit category",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "actorId",
            "description": "Who acted",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "eventSubjectId",
            "description": "What it was about",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "eventType",
            "description": "The event type",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "from",
            "description": "From this instant",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "to",
            "description": "Before this instant",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The next page",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Entries per page (1-100)",
            "schema": {
              "type": "integer"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_AuditTrailItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/organizations/{organizationId}/audit-trail/export": {
      "get": {
        "tags": [
          "Audit trail"
        ],
        "summary": "Export your organization's audit trail (NDJSON)",
        "operationId": "AuditTrailController_export",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "category",
            "description": "An audit category",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "actorId",
            "description": "Who acted",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "eventSubjectId",
            "description": "What it was about",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "eventType",
            "description": "The event type",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "from",
            "description": "From this instant",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "to",
            "description": "Before this instant",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The next page",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Entries per page (1-100)",
            "schema": {
              "type": "integer"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "202": {
            "description": "Accepted: the operation that runs the work (read it at Location)",
            "headers": {
              "Location": {
                "description": "`/operations/{id}`",
                "style": "simple",
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/projects": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "List an organization's projects",
        "operationId": "ProjectsController_findAll",
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "`organizationId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "title",
            "description": "`title` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "titleContains",
            "description": "`title` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "accountingCode",
            "description": "`accountingCode` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "accountingCodeContains",
            "description": "`accountingCode` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "accountingCodeIsNull",
            "description": "`accountingCode` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "accountingDescription",
            "description": "`accountingDescription` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "accountingDescriptionContains",
            "description": "`accountingDescription` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "accountingDescriptionIsNull",
            "description": "`accountingDescription` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "description",
            "description": "`description` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "descriptionContains",
            "description": "`description` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "descriptionIsNull",
            "description": "`description` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "managedByIntegrationId",
            "description": "`managedByIntegrationId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "managedByIntegrationIdIsNull",
            "description": "`managedByIntegrationId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtFrom",
            "description": "`createdAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtTo",
            "description": "`createdAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtFrom",
            "description": "`updatedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtTo",
            "description": "`updatedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "titleOrCodeContains",
            "description": "`titleOrCodeContains` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "title",
                "titleDesc",
                "updated",
                "updatedAsc"
              ],
              "default": "id"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000,
              "default": 1000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_ProjectListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "organizationId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "title",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "accountingCode",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "accountingDescription",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "description",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "managedByIntegrationId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "updatedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "titleOrCodeContains",
            "type": "text",
            "ops": [
              "=",
              ":*"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "Project",
          "maxLimit": 10000,
          "defaultLimit": 1000,
          "defaultSort": "id",
          "sorts": [
            {
              "name": "id",
              "keys": [
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "title",
              "keys": [
                {
                  "field": "title",
                  "column": "title",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "titleDesc",
              "keys": [
                {
                  "field": "title",
                  "column": "title",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "updated",
              "keys": [
                {
                  "field": "updatedAt",
                  "column": "updatedAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "updatedAsc",
              "keys": [
                {
                  "field": "updatedAt",
                  "column": "updatedAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "organizationId",
              "field": "organizationId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "title",
              "field": "title",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "titleContains",
              "field": "title",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "accountingCode",
              "field": "accountingCode",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "accountingCodeContains",
              "field": "accountingCode",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "accountingCodeIsNull",
              "field": "accountingCode",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "accountingDescription",
              "field": "accountingDescription",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "accountingDescriptionContains",
              "field": "accountingDescription",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "accountingDescriptionIsNull",
              "field": "accountingDescription",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "description",
              "field": "description",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "descriptionContains",
              "field": "description",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "descriptionIsNull",
              "field": "description",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "managedByIntegrationId",
              "field": "managedByIntegrationId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "managedByIntegrationIdIsNull",
              "field": "managedByIntegrationId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "createdAtFrom",
              "field": "createdAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "createdAtTo",
              "field": "createdAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "updatedAtFrom",
              "field": "updatedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "updatedAtTo",
              "field": "updatedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "titleOrCodeContains",
              "field": "titleOrCodeContains",
              "op": "eq",
              "type": "text"
            }
          ],
          "extras": []
        },
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Create a project",
        "operationId": "ProjectsController_create",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`CreateProjectDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A summary-level project (SPINE 26.1: depth 0): a search hit, a facet's label, a\n cross-aggregate embed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/projects/bulk": {
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Create projects in one organization",
        "operationId": "ProjectsController_createMany",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CreateProjectDto"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "202": {
            "description": "Accepted: the operation that runs the work (read it at Location)",
            "headers": {
              "Location": {
                "description": "`/operations/{id}`",
                "style": "simple",
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/projects/{id}": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Get a project",
        "operationId": "ProjectsController_findOne",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A project (`GET /projects/{id}`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Projects"
        ],
        "summary": "Delete a project",
        "operationId": "ProjectsController_remove",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "x-public-api": true,
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Projects"
        ],
        "summary": "Update a project",
        "operationId": "ProjectsController_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`UpdateProjectDto`: `CreateProjectDto` without `organizationId` (a sent one is\n stripped, Q7), every field optional.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level project (SPINE 26.1: depth 0): a search hit, a facet's label, a\n cross-aggregate embed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/projects/{id}/accounts/connect": {
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Assign accounts to a project",
        "operationId": "ProjectsController_connectAccounts",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`ConnectAccountsDto`: 1–500 account ids (`z.uuid()`), and a role (default `USER`).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectAccountsDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level project (SPINE 26.1: depth 0): a search hit, a facet's label, a\n cross-aggregate embed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/projects/{id}/accounts/disconnect": {
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Unassign accounts from a project",
        "operationId": "ProjectsController_disconnectAccounts",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`DisconnectAccountsDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisconnectAccountsDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level project (SPINE 26.1: depth 0): a search hit, a facet's label, a\n cross-aggregate embed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/projects/{id}/accounts/{accountId}": {
      "patch": {
        "tags": [
          "Projects"
        ],
        "summary": "Change an account's role on a project",
        "operationId": "ProjectsController_updateProjectAssignmentRole",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "accountId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`UpdateProjectAssignmentRoleDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectAssignmentRoleDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level project (SPINE 26.1: depth 0): a search hit, a facet's label, a\n cross-aggregate embed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/categories": {
      "get": {
        "tags": [
          "Categories"
        ],
        "summary": "List an organization's categories",
        "operationId": "CategoriesController_findAll",
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "`organizationId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "title",
            "description": "`title` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "titleContains",
            "description": "`title` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "accountingCode",
            "description": "`accountingCode` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "accountingCodeContains",
            "description": "`accountingCode` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "accountingCodeIsNull",
            "description": "`accountingCode` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "altAccountingCode",
            "description": "`altAccountingCode` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "altAccountingCodeContains",
            "description": "`altAccountingCode` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "altAccountingCodeIsNull",
            "description": "`altAccountingCode` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "externalId",
            "description": "`externalId` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "externalIdContains",
            "description": "`externalId` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "externalIdIsNull",
            "description": "`externalId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "description",
            "description": "`description` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "descriptionContains",
            "description": "`description` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "descriptionIsNull",
            "description": "`description` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "guidance",
            "description": "`guidance` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "guidanceContains",
            "description": "`guidance` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "guidanceIsNull",
            "description": "`guidance` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "context",
            "description": "`context` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "contextContains",
            "description": "`context` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "contextIsNull",
            "description": "`context` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "visibility",
            "description": "`visibility` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "VISIBLE",
                  "HIDDEN"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "rateId",
            "description": "`rateId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "rateIdIsNull",
            "description": "`rateId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "managedByIntegrationId",
            "description": "`managedByIntegrationId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "managedByIntegrationIdIsNull",
            "description": "`managedByIntegrationId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "hiddenByIntegrationId",
            "description": "`hiddenByIntegrationId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "hiddenByIntegrationIdIsNull",
            "description": "`hiddenByIntegrationId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "rateCriteria",
            "description": "`rateCriteria` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": []
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "title",
                "titleDesc"
              ],
              "default": "id"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000,
              "default": 1000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_CategoryListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "organizationId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "title",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "accountingCode",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "altAccountingCode",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "externalId",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "description",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "guidance",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "context",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "visibility",
            "type": "enum",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [
              "VISIBLE",
              "HIDDEN"
            ],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "rateId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "managedByIntegrationId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "hiddenByIntegrationId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "rateCriteria",
            "type": "enum",
            "ops": [
              "=",
              "!=",
              ":*"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "Category",
          "maxLimit": 10000,
          "defaultLimit": 1000,
          "defaultSort": "id",
          "sorts": [
            {
              "name": "id",
              "keys": [
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "title",
              "keys": [
                {
                  "field": "title",
                  "column": "title",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "titleDesc",
              "keys": [
                {
                  "field": "title",
                  "column": "title",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "organizationId",
              "field": "organizationId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "title",
              "field": "title",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "titleContains",
              "field": "title",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "accountingCode",
              "field": "accountingCode",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "accountingCodeContains",
              "field": "accountingCode",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "accountingCodeIsNull",
              "field": "accountingCode",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "altAccountingCode",
              "field": "altAccountingCode",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "altAccountingCodeContains",
              "field": "altAccountingCode",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "altAccountingCodeIsNull",
              "field": "altAccountingCode",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "externalId",
              "field": "externalId",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "externalIdContains",
              "field": "externalId",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "externalIdIsNull",
              "field": "externalId",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "description",
              "field": "description",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "descriptionContains",
              "field": "description",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "descriptionIsNull",
              "field": "description",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "guidance",
              "field": "guidance",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "guidanceContains",
              "field": "guidance",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "guidanceIsNull",
              "field": "guidance",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "context",
              "field": "context",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "contextContains",
              "field": "context",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "contextIsNull",
              "field": "context",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "visibility",
              "field": "visibility",
              "op": "eq",
              "type": "enum"
            },
            {
              "name": "rateId",
              "field": "rateId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "rateIdIsNull",
              "field": "rateId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "managedByIntegrationId",
              "field": "managedByIntegrationId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "managedByIntegrationIdIsNull",
              "field": "managedByIntegrationId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "hiddenByIntegrationId",
              "field": "hiddenByIntegrationId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "hiddenByIntegrationIdIsNull",
              "field": "hiddenByIntegrationId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "rateCriteria",
              "field": "rateCriteria",
              "op": "eq",
              "type": "enum"
            }
          ],
          "extras": []
        },
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Categories"
        ],
        "summary": "Create a category",
        "operationId": "CategoriesController_create",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`CreateCategoryDto`. Optional fields are `.nullish()` (an explicit null clears);\n `visibility` is optional but never null; the lengths are the columns' (Nest: a 400\n from the database, `Value too long for field`).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCategoryDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A summary-level category (SPINE 26.1).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategorySummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/categories/{id}": {
      "get": {
        "tags": [
          "Categories"
        ],
        "summary": "Get a category",
        "operationId": "CategoriesController_findOne",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A category (`GET /categories/{id}`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategoryDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Categories"
        ],
        "summary": "Delete a category",
        "operationId": "CategoriesController_remove",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "x-public-api": true,
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Categories"
        ],
        "summary": "Update a category",
        "operationId": "CategoriesController_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`UpdateCategoryDto`: `CreateCategoryDto` without `organizationId`, every field optional.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCategoryDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A summary-level category (SPINE 26.1).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategorySummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/enterprise/{enterpriseId}/categories": {
      "get": {
        "tags": [
          "Enterprise Categories"
        ],
        "summary": "List an enterprise's category templates",
        "operationId": "EnterpriseCategoriesController_findAll",
        "parameters": [
          {
            "in": "path",
            "name": "enterpriseId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "enterpriseId",
            "description": "`enterpriseId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "title",
            "description": "`title` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "titleContains",
            "description": "`title` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "accountingCode",
            "description": "`accountingCode` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "accountingCodeContains",
            "description": "`accountingCode` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "accountingCodeIsNull",
            "description": "`accountingCode` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "altAccountingCode",
            "description": "`altAccountingCode` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "altAccountingCodeContains",
            "description": "`altAccountingCode` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "altAccountingCodeIsNull",
            "description": "`altAccountingCode` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "description",
            "description": "`description` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "descriptionContains",
            "description": "`description` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "descriptionIsNull",
            "description": "`description` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "guidance",
            "description": "`guidance` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "guidanceContains",
            "description": "`guidance` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "guidanceIsNull",
            "description": "`guidance` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "context",
            "description": "`context` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "contextContains",
            "description": "`context` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "contextIsNull",
            "description": "`context` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "visibility",
            "description": "`visibility` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "VISIBLE",
                  "HIDDEN"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "rateId",
            "description": "`rateId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "rateIdIsNull",
            "description": "`rateId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "autoPropagate",
            "description": "`autoPropagate` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "isAccommodationHotel",
            "description": "`isAccommodationHotel` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "isAccommodationCooking",
            "description": "`isAccommodationCooking` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "isAccommodationOther",
            "description": "`isAccommodationOther` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "isAccommodationBreakfast",
            "description": "`isAccommodationBreakfast` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtFrom",
            "description": "`createdAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtTo",
            "description": "`createdAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtFrom",
            "description": "`updatedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtTo",
            "description": "`updatedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "title",
                "accountingCode",
                "created",
                "updated"
              ],
              "default": "id"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000,
              "default": 1000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_EnterpriseCategoryListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "enterpriseId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "title",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "accountingCode",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "altAccountingCode",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "description",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "guidance",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "context",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "visibility",
            "type": "enum",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [
              "VISIBLE",
              "HIDDEN"
            ],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "rateId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "autoPropagate",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "isAccommodationHotel",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "isAccommodationCooking",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "isAccommodationOther",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "isAccommodationBreakfast",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "updatedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "EnterpriseCategory",
          "maxLimit": 10000,
          "defaultLimit": 1000,
          "defaultSort": "id",
          "sorts": [
            {
              "name": "id",
              "keys": [
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "title",
              "keys": [
                {
                  "field": "title",
                  "column": "title",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "accountingCode",
              "keys": [
                {
                  "field": "accountingCode",
                  "column": "accountingCode",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "created",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "updated",
              "keys": [
                {
                  "field": "updatedAt",
                  "column": "updatedAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "enterpriseId",
              "field": "enterpriseId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "title",
              "field": "title",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "titleContains",
              "field": "title",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "accountingCode",
              "field": "accountingCode",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "accountingCodeContains",
              "field": "accountingCode",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "accountingCodeIsNull",
              "field": "accountingCode",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "altAccountingCode",
              "field": "altAccountingCode",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "altAccountingCodeContains",
              "field": "altAccountingCode",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "altAccountingCodeIsNull",
              "field": "altAccountingCode",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "description",
              "field": "description",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "descriptionContains",
              "field": "description",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "descriptionIsNull",
              "field": "description",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "guidance",
              "field": "guidance",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "guidanceContains",
              "field": "guidance",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "guidanceIsNull",
              "field": "guidance",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "context",
              "field": "context",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "contextContains",
              "field": "context",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "contextIsNull",
              "field": "context",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "visibility",
              "field": "visibility",
              "op": "eq",
              "type": "enum"
            },
            {
              "name": "rateId",
              "field": "rateId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "rateIdIsNull",
              "field": "rateId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "autoPropagate",
              "field": "autoPropagate",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "isAccommodationHotel",
              "field": "isAccommodationHotel",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "isAccommodationCooking",
              "field": "isAccommodationCooking",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "isAccommodationOther",
              "field": "isAccommodationOther",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "isAccommodationBreakfast",
              "field": "isAccommodationBreakfast",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "createdAtFrom",
              "field": "createdAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "createdAtTo",
              "field": "createdAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "updatedAtFrom",
              "field": "updatedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "updatedAtTo",
              "field": "updatedAt",
              "op": "to",
              "type": "timestamp"
            }
          ],
          "extras": []
        },
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Enterprise Categories"
        ],
        "summary": "Create an enterprise category template",
        "operationId": "EnterpriseCategoriesController_create",
        "parameters": [
          {
            "in": "path",
            "name": "enterpriseId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`CreateEnterpriseCategoryDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEnterpriseCategoryDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A template's summary: what a create or an update answers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnterpriseCategorySummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/enterprise/{enterpriseId}/categories/{categoryId}": {
      "get": {
        "tags": [
          "Enterprise Categories"
        ],
        "summary": "Get an enterprise category template",
        "operationId": "EnterpriseCategoriesController_findOne",
        "parameters": [
          {
            "in": "path",
            "name": "enterpriseId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "categoryId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A template (`GET /enterprise/{enterpriseId}/categories/{categoryId}`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnterpriseCategoryDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Enterprise Categories"
        ],
        "summary": "Delete an enterprise category template",
        "operationId": "EnterpriseCategoriesController_remove",
        "parameters": [
          {
            "in": "path",
            "name": "enterpriseId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "categoryId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "patch": {
        "tags": [
          "Enterprise Categories"
        ],
        "summary": "Update an enterprise category template",
        "operationId": "EnterpriseCategoriesController_update",
        "parameters": [
          {
            "in": "path",
            "name": "enterpriseId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "categoryId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`UpdateEnterpriseCategoryDto`: absent leaves a field, null clears a nullable one.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEnterpriseCategoryDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A template's summary: what a create or an update answers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnterpriseCategorySummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/organizations/{id}/reset-categories": {
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "Replace an organization's categories with the defaults",
        "operationId": "OrganizationsController_resetCategories",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`OrganizationsController_resetCategories`. No body.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetCategories"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/organizations/{id}/clear-categories": {
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "Delete an organization's categories",
        "operationId": "OrganizationsController_clearCategories",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`OrganizationsController_clearCategories`. No body.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClearCategories"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/advances/{id}/disburse": {
      "post": {
        "tags": [
          "Advances"
        ],
        "summary": "Record an advance disbursement",
        "operationId": "AdvancesController_disburse",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /advances/:id/disburse`: record an utbetaling.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisburseAdvance"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "An advance's own scalars (depth 0; Nest's `AdvanceEntity` row). Amounts are minor\n units of `currency`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdvanceSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/advances/{id}/repay": {
      "post": {
        "tags": [
          "Advances"
        ],
        "summary": "Record an advance repayment",
        "operationId": "AdvancesController_repay",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /advances/:id/repay`: the holder paid money back.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RepayAdvance"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "An advance's own scalars (depth 0; Nest's `AdvanceEntity` row). Amounts are minor\n units of `currency`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdvanceSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/advances/{id}/adjust": {
      "post": {
        "tags": [
          "Advances"
        ],
        "summary": "Post an advance correction",
        "operationId": "AdvancesController_adjust",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /advances/:id/adjust`: a controlled correction (signed, non-zero).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdjustAdvance"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "An advance's own scalars (depth 0; Nest's `AdvanceEntity` row). Amounts are minor\n units of `currency`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdvanceSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/advances/{id}/write-off": {
      "post": {
        "tags": [
          "Advances"
        ],
        "summary": "Write an advance's open balance off",
        "operationId": "AdvancesController_writeOff",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /advances/:id/write-off`: write the whole open balance off.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WriteOffAdvance"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "An advance's own scalars (depth 0; Nest's `AdvanceEntity` row). Amounts are minor\n units of `currency`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdvanceSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/advances/{id}/cancel": {
      "post": {
        "tags": [
          "Advances"
        ],
        "summary": "Cancel an advance with nothing open",
        "operationId": "AdvancesController_cancel",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /advances/:id/cancel` (no body).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelAdvance"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "An advance's own scalars (depth 0; Nest's `AdvanceEntity` row). Amounts are minor\n units of `currency`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdvanceSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{id}/advance": {
      "get": {
        "tags": [
          "Advances"
        ],
        "summary": "The advance a report carries or drew from",
        "operationId": "AdvancesController_findForReport",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The advance a report discloses (`GET /reports/:id/advance`, Nest's\n `AdvanceContextDto`): a computed answer, one plain type.",
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "travelRequestReportId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "grantedAmount": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "format": "int64"
                    },
                    "currency": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "description": "`AdvanceStatus` (the stored column; reads fold it from the ledger).",
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "APPROVED",
                        "DISBURSED",
                        "PARTIALLY_SETTLED",
                        "SETTLED",
                        "WRITTEN_OFF",
                        "CANCELED",
                        null
                      ],
                      "x-enum-open": true
                    },
                    "disbursed": {
                      "type": "boolean"
                    },
                    "settlementAmount": {
                      "type": "integer",
                      "format": "int64"
                    },
                    "outstandingAmount": {
                      "type": "integer",
                      "format": "int64"
                    }
                  },
                  "required": [
                    "travelRequestReportId",
                    "grantedAmount",
                    "currency",
                    "status",
                    "disbursed",
                    "settlementAmount",
                    "outstandingAmount"
                  ]
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/accounts/{accountId}/advances": {
      "get": {
        "tags": [
          "Advances"
        ],
        "summary": "A person's advance saldo and their advances",
        "operationId": "AdvancesController_findForAccount",
        "parameters": [
          {
            "in": "path",
            "name": "accountId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The `advances.nextCursor` of the previous page.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A person's advance saldo and one page of their advances (`GET\n /accounts/:accountId/advances`): a purpose read model (SPINE 26.1), the page in the\n list envelope (26.3).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountAdvances"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/accounts/{accountId}/advances/opening": {
      "post": {
        "tags": [
          "Advances"
        ],
        "summary": "Record an advance carried over from the previous system",
        "operationId": "AdvancesController_recordOpening",
        "parameters": [
          {
            "in": "path",
            "name": "accountId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /accounts/:accountId/advances/opening`: an advance carried over from the\n previous system, minted already disbursed.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpeningAdvance"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "An advance's own scalars (depth 0; Nest's `AdvanceEntity` row). Amounts are minor\n units of `currency`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdvanceSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/wallets": {
      "get": {
        "tags": [
          "Wallets"
        ],
        "summary": "List wallets",
        "operationId": "WalletsController_findAll",
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "`organizationId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "accountId",
            "description": "`accountId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "name",
            "description": "`name` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "nameContains",
            "description": "`name` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "nameIsNull",
            "description": "`name` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "currency",
            "description": "`currency` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "currencyContains",
            "description": "`currency` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "status",
            "description": "`status` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ACTIVE",
                  "CLOSED"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtFrom",
            "description": "`createdAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtTo",
            "description": "`createdAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtFrom",
            "description": "`updatedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtTo",
            "description": "`updatedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "closedAtFrom",
            "description": "`closedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "closedAtTo",
            "description": "`closedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "closedAtIsNull",
            "description": "`closedAt` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "created",
                "createdAsc",
                "updated",
                "updatedAsc"
              ],
              "default": "created"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000,
              "default": 1000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_WalletDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "organizationId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "accountId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": true,
            "facet": false,
            "searchable": false
          },
          {
            "name": "name",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "currency",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "status",
            "type": "enum",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [
              "ACTIVE",
              "CLOSED"
            ],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "updatedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "closedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "Wallet",
          "maxLimit": 1000,
          "defaultLimit": 1000,
          "defaultSort": "created",
          "sorts": [
            {
              "name": "created",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "createdAsc",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "updated",
              "keys": [
                {
                  "field": "updatedAt",
                  "column": "updatedAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "updatedAsc",
              "keys": [
                {
                  "field": "updatedAt",
                  "column": "updatedAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "organizationId",
              "field": "organizationId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "accountId",
              "field": "accountId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "name",
              "field": "name",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "nameContains",
              "field": "name",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "nameIsNull",
              "field": "name",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "currency",
              "field": "currency",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "currencyContains",
              "field": "currency",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "status",
              "field": "status",
              "op": "eq",
              "type": "enum"
            },
            {
              "name": "createdAtFrom",
              "field": "createdAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "createdAtTo",
              "field": "createdAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "updatedAtFrom",
              "field": "updatedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "updatedAtTo",
              "field": "updatedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "closedAtFrom",
              "field": "closedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "closedAtTo",
              "field": "closedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "closedAtIsNull",
              "field": "closedAt",
              "op": "isNull",
              "type": "timestamp"
            }
          ],
          "extras": []
        },
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Wallets"
        ],
        "summary": "Create a wallet",
        "operationId": "WalletsController_create",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /wallets`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWallet"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A wallet's own scalars (SPINE 26.1: depth 0): what its writes answer, and a search hit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/wallets/selectable": {
      "get": {
        "tags": [
          "Wallets"
        ],
        "summary": "Wallets a holder can spend from",
        "operationId": "WalletsController_findSpendable",
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "`organizationId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "accountId",
            "description": "`accountId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "name",
            "description": "`name` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "nameContains",
            "description": "`name` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "nameIsNull",
            "description": "`name` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "currency",
            "description": "`currency` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "currencyContains",
            "description": "`currency` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "status",
            "description": "`status` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ACTIVE",
                  "CLOSED"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtFrom",
            "description": "`createdAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtTo",
            "description": "`createdAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtFrom",
            "description": "`updatedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtTo",
            "description": "`updatedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "closedAtFrom",
            "description": "`closedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "closedAtTo",
            "description": "`closedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "closedAtIsNull",
            "description": "`closedAt` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "created",
                "createdAsc",
                "updated",
                "updatedAsc"
              ],
              "default": "created"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000,
              "default": 1000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_WalletDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "organizationId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "accountId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": true,
            "facet": false,
            "searchable": false
          },
          {
            "name": "name",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "currency",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "status",
            "type": "enum",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [
              "ACTIVE",
              "CLOSED"
            ],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "updatedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "closedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "Wallet",
          "maxLimit": 1000,
          "defaultLimit": 1000,
          "defaultSort": "created",
          "sorts": [
            {
              "name": "created",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "createdAsc",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "updated",
              "keys": [
                {
                  "field": "updatedAt",
                  "column": "updatedAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "updatedAsc",
              "keys": [
                {
                  "field": "updatedAt",
                  "column": "updatedAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "organizationId",
              "field": "organizationId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "accountId",
              "field": "accountId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "name",
              "field": "name",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "nameContains",
              "field": "name",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "nameIsNull",
              "field": "name",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "currency",
              "field": "currency",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "currencyContains",
              "field": "currency",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "status",
              "field": "status",
              "op": "eq",
              "type": "enum"
            },
            {
              "name": "createdAtFrom",
              "field": "createdAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "createdAtTo",
              "field": "createdAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "updatedAtFrom",
              "field": "updatedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "updatedAtTo",
              "field": "updatedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "closedAtFrom",
              "field": "closedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "closedAtTo",
              "field": "closedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "closedAtIsNull",
              "field": "closedAt",
              "op": "isNull",
              "type": "timestamp"
            }
          ],
          "extras": []
        },
        "x-public-api": true
      }
    },
    "/wallets/{id}": {
      "get": {
        "tags": [
          "Wallets"
        ],
        "summary": "Get a wallet with its balance",
        "operationId": "WalletsController_findOne",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A wallet with its holder and its computed balance (`GET /wallets/{id}`; the list rows).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Wallets"
        ],
        "summary": "Delete a wallet",
        "operationId": "WalletsController_remove",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "x-public-api": true,
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Wallets"
        ],
        "summary": "Rename a wallet",
        "operationId": "WalletsController_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`PATCH /wallets/:id`: an absent `name` keeps it, `null` clears it.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWallet"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A wallet's own scalars (SPINE 26.1: depth 0): what its writes answer, and a search hit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/wallets/{id}/activity": {
      "get": {
        "tags": [
          "Wallets"
        ],
        "summary": "A wallet's activity feed",
        "operationId": "WalletsController_activity",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_WalletActivityEntry"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/wallets/{id}/adjust": {
      "post": {
        "tags": [
          "Wallets"
        ],
        "summary": "Post a wallet correction",
        "operationId": "WalletsController_adjust",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /wallets/:id/adjust`: an admin correction (signed minor units).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdjustWallet"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A wallet's own scalars (SPINE 26.1: depth 0): what its writes answer, and a search hit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/wallets/{id}/close": {
      "post": {
        "tags": [
          "Wallets"
        ],
        "summary": "Close a wallet",
        "operationId": "WalletsController_close",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /wallets/:id/close` (no body).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloseWallet"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A wallet's own scalars (SPINE 26.1: depth 0): what its writes answer, and a search hit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/wallets/{id}/credit": {
      "post": {
        "tags": [
          "Wallets"
        ],
        "summary": "Fund a wallet",
        "operationId": "WalletsController_credit",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /wallets/:id/credit`: top up (minor units, at least 1).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditWallet"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A wallet's own scalars (SPINE 26.1: depth 0): what its writes answer, and a search hit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/wallets/{id}/reassign": {
      "post": {
        "tags": [
          "Wallets"
        ],
        "summary": "Move a wallet to another holder",
        "operationId": "WalletsController_reassign",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /wallets/:id/reassign`: move the wallet to another holder in the organization.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReassignWallet"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A wallet's own scalars (SPINE 26.1: depth 0): what its writes answer, and a search hit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/organizations/{id}/report-template": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "The report template an organization renders with",
        "operationId": "OrganizationsController_getReportTemplate",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The report template an organization renders with (a singleton: `GET` and `PUT\n /organizations/{id}/report-template` answer it).",
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "templateId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "templateName": {
                      "type": "string"
                    },
                    "assignedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "templateId",
                    "templateName",
                    "assignedAt"
                  ]
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{id}/transfer": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Transfer a draft report to another organization",
        "operationId": "ReportsController_transfer",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The body (`TransferReportDto`); the caller is the route's, not the client's.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferReport"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "The answer (Nest's `TransferResult`): an action's outcome, 200 (SPINE 26.5).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferResult"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/expenses": {
      "get": {
        "tags": [
          "Expenses"
        ],
        "summary": "A report's expenses",
        "operationId": "ExpensesController_findAll",
        "parameters": [
          {
            "in": "query",
            "name": "costsRevisionFrom",
            "description": "`costsRevision` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "costsRevisionTo",
            "description": "`costsRevision` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "dateFrom",
            "description": "`date` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "dateTo",
            "description": "`date` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "dateIsNull",
            "description": "`date` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "dateHasTime",
            "description": "`dateHasTime` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "dateHasTimeIsNull",
            "description": "`dateHasTime` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "amountFrom",
            "description": "`amount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "amountTo",
            "description": "`amount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "title",
            "description": "`title` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "titleContains",
            "description": "`title` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "titleIsNull",
            "description": "`title` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "merchant",
            "description": "`merchant` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "merchantContains",
            "description": "`merchant` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "merchantIsNull",
            "description": "`merchant` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "description",
            "description": "`description` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "descriptionContains",
            "description": "`description` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "descriptionIsNull",
            "description": "`description` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "departmentId",
            "description": "`departmentId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "departmentIdIsNull",
            "description": "`departmentId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "projectId",
            "description": "`projectId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "projectIdIsNull",
            "description": "`projectId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "categoryId",
            "description": "`categoryId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "categoryIdIsNull",
            "description": "`categoryId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtFrom",
            "description": "`createdAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtTo",
            "description": "`createdAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtFrom",
            "description": "`updatedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtTo",
            "description": "`updatedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "paymentMethod",
            "description": "`paymentMethod` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "CARD",
                  "COMPANY_CARD",
                  "INVOICE",
                  "WALLET"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "paymentMethodIsNull",
            "description": "`paymentMethod` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "paymentCardId",
            "description": "`paymentCardId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "paymentCardIdIsNull",
            "description": "`paymentCardId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "walletId",
            "description": "`walletId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "walletIdIsNull",
            "description": "`walletId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "currency",
            "description": "`currency` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "currencyContains",
            "description": "`currency` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "currencyIsNull",
            "description": "`currency` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "amountInBaseCurrencyFrom",
            "description": "`amountInBaseCurrency` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "amountInBaseCurrencyTo",
            "description": "`amountInBaseCurrency` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "amountInBaseCurrencyIsNull",
            "description": "`amountInBaseCurrency` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "vatAmountFrom",
            "description": "`vatAmount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "vatAmountTo",
            "description": "`vatAmount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "vatAmountIsNull",
            "description": "`vatAmount` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "isVatDeductible",
            "description": "`isVatDeductible` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "isVatDeductibleIsNull",
            "description": "`isVatDeductible` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "`organizationId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "reportStatus",
            "description": "`reportStatus` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": []
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "reportAccountId",
            "description": "`reportAccountId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "date",
                "created",
                "updated"
              ],
              "default": "id"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000,
              "default": 1000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "reportId",
            "description": "The report whose live expenses are listed. Without it, one `organizationId` lists the organization's live expenses across the reports the caller may read",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "include",
            "description": "Side-load related resources into `included` (SPINE 26.12.2): repeat for several; a dotted path follows a relation of the resource before it (at most 3 segments, 8 paths counting the prefixes they load). A list includes to-one relations only.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "category",
                  "project",
                  "department",
                  "department.organization"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "The envelope of a list whose item declares relations (SPINE 26.12.2): [`ListPage`]'s\n members and the side-loads, `{ items, hasMore, nextCursor?, total?, included? }`. Its\n schema keeps `ListPage`'s name: a route answers one or the other for an item, never\n both.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_ExpenseListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-relations": [
          {
            "name": "category",
            "kind": "toOne",
            "via": "categoryId",
            "target": "category"
          },
          {
            "name": "project",
            "kind": "toOne",
            "via": "projectId",
            "target": "project"
          },
          {
            "name": "attachments",
            "kind": "children",
            "back": "expenseId",
            "target": "attachment",
            "maxPerParent": 2000
          },
          {
            "name": "department",
            "kind": "toOne",
            "via": "departmentId",
            "target": "department"
          }
        ],
        "x-filter-fields": [
          {
            "name": "costsRevision",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "date",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "dateHasTime",
            "type": "bool",
            "ops": [
              "=",
              "!=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "amount",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "title",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "merchant",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "description",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "departmentId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "projectId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "categoryId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "updatedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "paymentMethod",
            "type": "enum",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [
              "CARD",
              "COMPANY_CARD",
              "INVOICE",
              "WALLET"
            ],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "paymentCardId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "walletId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "currency",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "amountInBaseCurrency",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "vatAmount",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "isVatDeductible",
            "type": "bool",
            "ops": [
              "=",
              "!=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "organizationId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "reportStatus",
            "type": "enum",
            "ops": [
              "=",
              "!=",
              ":*"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "reportAccountId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":*"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "Expense",
          "maxLimit": 1000,
          "defaultLimit": 1000,
          "defaultSort": "id",
          "sorts": [
            {
              "name": "id",
              "keys": [
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "date",
              "keys": [
                {
                  "field": "date",
                  "column": "date",
                  "direction": "asc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "created",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "updated",
              "keys": [
                {
                  "field": "updatedAt",
                  "column": "updatedAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            }
          ],
          "params": [
            {
              "name": "costsRevisionFrom",
              "field": "costsRevision",
              "op": "from",
              "type": "int"
            },
            {
              "name": "costsRevisionTo",
              "field": "costsRevision",
              "op": "to",
              "type": "int"
            },
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "dateFrom",
              "field": "date",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "dateTo",
              "field": "date",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "dateIsNull",
              "field": "date",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "dateHasTime",
              "field": "dateHasTime",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "dateHasTimeIsNull",
              "field": "dateHasTime",
              "op": "isNull",
              "type": "bool"
            },
            {
              "name": "amountFrom",
              "field": "amount",
              "op": "from",
              "type": "int"
            },
            {
              "name": "amountTo",
              "field": "amount",
              "op": "to",
              "type": "int"
            },
            {
              "name": "title",
              "field": "title",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "titleContains",
              "field": "title",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "titleIsNull",
              "field": "title",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "merchant",
              "field": "merchant",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "merchantContains",
              "field": "merchant",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "merchantIsNull",
              "field": "merchant",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "description",
              "field": "description",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "descriptionContains",
              "field": "description",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "descriptionIsNull",
              "field": "description",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "departmentId",
              "field": "departmentId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "departmentIdIsNull",
              "field": "departmentId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "projectId",
              "field": "projectId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "projectIdIsNull",
              "field": "projectId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "categoryId",
              "field": "categoryId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "categoryIdIsNull",
              "field": "categoryId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "createdAtFrom",
              "field": "createdAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "createdAtTo",
              "field": "createdAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "updatedAtFrom",
              "field": "updatedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "updatedAtTo",
              "field": "updatedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "paymentMethod",
              "field": "paymentMethod",
              "op": "eq",
              "type": "enum"
            },
            {
              "name": "paymentMethodIsNull",
              "field": "paymentMethod",
              "op": "isNull",
              "type": "enum"
            },
            {
              "name": "paymentCardId",
              "field": "paymentCardId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "paymentCardIdIsNull",
              "field": "paymentCardId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "walletId",
              "field": "walletId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "walletIdIsNull",
              "field": "walletId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "currency",
              "field": "currency",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "currencyContains",
              "field": "currency",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "currencyIsNull",
              "field": "currency",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "amountInBaseCurrencyFrom",
              "field": "amountInBaseCurrency",
              "op": "from",
              "type": "int"
            },
            {
              "name": "amountInBaseCurrencyTo",
              "field": "amountInBaseCurrency",
              "op": "to",
              "type": "int"
            },
            {
              "name": "amountInBaseCurrencyIsNull",
              "field": "amountInBaseCurrency",
              "op": "isNull",
              "type": "int"
            },
            {
              "name": "vatAmountFrom",
              "field": "vatAmount",
              "op": "from",
              "type": "int"
            },
            {
              "name": "vatAmountTo",
              "field": "vatAmount",
              "op": "to",
              "type": "int"
            },
            {
              "name": "vatAmountIsNull",
              "field": "vatAmount",
              "op": "isNull",
              "type": "int"
            },
            {
              "name": "isVatDeductible",
              "field": "isVatDeductible",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "isVatDeductibleIsNull",
              "field": "isVatDeductible",
              "op": "isNull",
              "type": "bool"
            },
            {
              "name": "organizationId",
              "field": "organizationId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "reportStatus",
              "field": "reportStatus",
              "op": "eq",
              "type": "enum"
            },
            {
              "name": "reportAccountId",
              "field": "reportAccountId",
              "op": "eq",
              "type": "id"
            }
          ],
          "extras": [
            "reportId"
          ]
        },
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Expenses"
        ],
        "summary": "Create an expense on a report",
        "operationId": "ExpensesController_create",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The body (Nest `CreateExpenseSchema`).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateExpense"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "What an expense write answers (SPINE 26.1 rule 10, 26.2): the expense's one summary\n beside its report's summary after the write, so a client refreshes the report's totals\n and amend state without a refetch.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseWritten"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/expenses/currencies": {
      "get": {
        "tags": [
          "Expenses"
        ],
        "summary": "The currencies an expense can be filed in",
        "operationId": "ExpensesController_getCurrencies",
        "responses": {
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_ExpenseCurrency"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true,
        "parameters": [
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/expenses/exchangerate": {
      "post": {
        "tags": [
          "Expenses"
        ],
        "summary": "An exchange rate",
        "operationId": "ExpensesController_getExchangeRate",
        "requestBody": {
          "description": "The body (Nest `ExchangeRateSchema`).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExchangeRateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "number"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/expenses/fx-quotes": {
      "post": {
        "tags": [
          "Expense FX quotes"
        ],
        "summary": "Preview an exchange rate a line write can apply",
        "operationId": "FxQuotesController_create",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The body (Nest `FxQuoteRequestDto`, a strict object).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FxQuoteRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A quote as issued, previewed and snapshotted (Nest `FxQuote`, `fxQuoteSchema`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FxQuoteDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/expenses/{id}": {
      "get": {
        "tags": [
          "Expenses"
        ],
        "summary": "An expense",
        "operationId": "ExpensesController_findOne",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "include",
            "description": "Side-load related resources into `included` (SPINE 26.12.2): repeat for several; a dotted path follows a relation of the resource before it (at most 3 segments, 8 paths counting the prefixes they load). Children are included whole: a parent with more than the child list's maxLimit refuses the request (422 include_too_large, naming the child list to page instead).",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "category",
                  "project",
                  "attachments",
                  "department",
                  "department.organization"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "An expense at detail level (`GET /expenses/{id}`).",
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseDetail"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-relations": [
          {
            "name": "category",
            "kind": "toOne",
            "via": "categoryId",
            "target": "category"
          },
          {
            "name": "project",
            "kind": "toOne",
            "via": "projectId",
            "target": "project"
          },
          {
            "name": "attachments",
            "kind": "children",
            "back": "expenseId",
            "target": "attachment",
            "maxPerParent": 2000
          },
          {
            "name": "department",
            "kind": "toOne",
            "via": "departmentId",
            "target": "department"
          }
        ],
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Expenses"
        ],
        "summary": "Delete an expense",
        "operationId": "ExpensesController_remove",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-Match",
            "required": false,
            "description": "The version the write was prepared against (`\"<version>\"`, from the row's `version` field; never a read's weak `ETag`): a change since then to a field this write touches answers 409 `edit_conflict`; a disjoint one merges.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-versioned": true,
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          },
          "409": {
            "description": "`edit_conflict`: a field this write changes changed since its `If-Match`; nothing was applied",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/EditConflictProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "patch": {
        "tags": [
          "Expenses"
        ],
        "summary": "Update an expense",
        "operationId": "ExpensesController_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-Match",
            "required": false,
            "description": "The version the write was prepared against (`\"<version>\"`, from the row's `version` field; never a read's weak `ETag`): a change since then to a field this write touches answers 409 `edit_conflict`; a disjoint one merges.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The body (Nest `UpdateExpenseSchema`). `Some(None)` is an explicit `null`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateExpense"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "What an expense write answers (SPINE 26.1 rule 10, 26.2): the expense's one summary\n beside its report's summary after the write, so a client refreshes the report's totals\n and amend state without a refetch.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseWritten"
                }
              }
            }
          },
          "409": {
            "description": "`edit_conflict`: a field this write changes changed since its `If-Match`; nothing was applied",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/EditConflictProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true,
        "x-versioned": true
      }
    },
    "/expenses/{id}/detach": {
      "post": {
        "tags": [
          "Expenses"
        ],
        "summary": "Move an expense to a standalone report of its own",
        "operationId": "ExpensesController_detach",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`ExpensesController_detach` (no body).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DetachExpense"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "What an expense write answers (SPINE 26.1 rule 10, 26.2): the expense's one summary\n beside its report's summary after the write, so a client refreshes the report's totals\n and amend state without a refetch.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseWritten"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/attachments": {
      "get": {
        "tags": [
          "Attachments"
        ],
        "summary": "An expense's receipts",
        "operationId": "AttachmentsController_findAll",
        "parameters": [
          {
            "in": "query",
            "name": "expenseId",
            "description": "The expense whose live receipts are listed (required unless `id` is given)",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "id",
            "description": "The batch get (SPINE 26.12.6): repeat for each receipt, at most 100; a receipt the caller may not read, or that is gone, is left out",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_AttachmentListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Attachments"
        ],
        "summary": "Upload a receipt, or register an upload intent",
        "operationId": "AttachmentsController_uploadAttachment",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "A receipt's upload intent (SPINE 26.10 item 5). A multipart file answers 410 upload_intent_required.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadAttachmentIntentDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "The intent's 201 and its confirm's result. An intent carries `upload` (where the bytes\n go, then `POST /uploads/{id}:confirm`) unless its bytes already landed (a replay of a\n stored receipt is a state read), and `autofill` only on its first call (and not when\n the capture was deferred to the confirm); the confirm carries the deferred capture's\n `autofill` and the consumed inbox item.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadAttachmentResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/attachments/{id}": {
      "get": {
        "tags": [
          "Attachments"
        ],
        "summary": "A receipt",
        "operationId": "AttachmentsController_findOne",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A receipt at detail level (`GET /attachments/{id}`).",
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentDetail"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Attachments"
        ],
        "summary": "Remove a receipt",
        "operationId": "AttachmentsController_deleteAttachment",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-Match",
            "required": false,
            "description": "The version the write was prepared against (`\"<version>\"`, from the row's `version` field; never a read's weak `ETag`): a change since then to a field this write touches answers 409 `edit_conflict`; a disjoint one merges.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-versioned": true,
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          },
          "409": {
            "description": "`edit_conflict`: a field this write changes changed since its `If-Match`; nothing was applied",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/EditConflictProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{id}/attachments": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "A report's receipts",
        "operationId": "ReportsController_attachments",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_AttachmentListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Report attachments"
        ],
        "summary": "File evidence on a report",
        "operationId": "ReportAttachmentsController_upload",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /reports/{reportId}/attachments`' body: the file the client is about to upload.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportFileUploadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "The intent's 201: where the bytes go.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportFileUpload"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{id}/attachments/{attachmentId}": {
      "delete": {
        "tags": [
          "Report attachments"
        ],
        "summary": "Remove a report file",
        "operationId": "ReportAttachmentsController_remove",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "attachmentId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-Match",
            "required": false,
            "description": "The version the write was prepared against (`\"<version>\"`, from the row's `version` field; never a read's weak `ETag`): a change since then to a field this write touches answers 409 `edit_conflict`; a disjoint one merges.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          },
          "409": {
            "description": "`edit_conflict`: a field this write changes changed since its `If-Match`; nothing was applied",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/EditConflictProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true,
        "x-versioned": true
      }
    },
    "/reports/{id}/attachments/{attachmentId}/promote": {
      "post": {
        "tags": [
          "Report attachments"
        ],
        "summary": "File a report file as a line's receipt",
        "operationId": "ReportAttachmentsController_promote",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "attachmentId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`PromoteReportAttachmentDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromoteReportFile"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "What a promotion answers (SPINE 26.2: a line write answers the line's summary beside\n the report's): the new expense's and receipt's summaries, the report after the write,\n and the codes of what the reading could not keep (`invalid_category_dropped`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Promoted"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{id}/report-attachments": {
      "get": {
        "tags": [
          "Report attachments"
        ],
        "summary": "A report's files",
        "operationId": "ReportAttachmentsController_findAll",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_ReportAttachmentListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{id}/receipt-remainder": {
      "post": {
        "tags": [
          "Expense costs"
        ],
        "summary": "File the reviewed rest of a shared receipt as costs on its owner",
        "operationId": "ReceiptRemainderController_add",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The report (the router's `{id}` segment).",
            "required": true,
            "schema": {
              "description": "The report (the router's `{id}` segment).",
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`ReceiptRemainderWriteDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReceiptRemainderWriteDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`ExpenseCostsDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseCosts"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{id}/receipt-remainder/preview": {
      "post": {
        "tags": [
          "Expense costs"
        ],
        "summary": "What is left of a shared receipt the report already claims part of",
        "operationId": "ReceiptRemainderController_preview",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The report (the router's `{id}` segment).",
            "required": true,
            "schema": {
              "description": "The report (the router's `{id}` segment).",
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The preview's body: the shared receipt's SHA-256 (hex). The receipt is stored already;\n its bytes never pass through the API again (SPINE 26.10 item 5).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReceiptRemainderPreviewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`ReceiptRemainderPreviewDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptRemainderPreviewDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{id}/receipt-remainder/suggestions": {
      "post": {
        "tags": [
          "Expense costs"
        ],
        "summary": "Reviewable expenses for the rest of a shared receipt",
        "operationId": "ReceiptRemainderController_suggestions",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The report (the router's `{id}` segment).",
            "required": true,
            "schema": {
              "description": "The report (the router's `{id}` segment).",
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`ReceiptRemainderProposalDto`, Nest's key order.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReceiptRemainderProposalDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`ReceiptRemainderSuggestionsDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptRemainderSuggestionsDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{id}/receipt-remainder/decline": {
      "post": {
        "tags": [
          "Expense costs"
        ],
        "summary": "Decline the rest of a shared receipt as private",
        "operationId": "ReceiptRemainderController_decline",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The report (the router's `{id}` segment).",
            "required": true,
            "schema": {
              "description": "The report (the router's `{id}` segment).",
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`ReceiptRemainderDeclineDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReceiptRemainderDeclineDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`ExpenseCostsDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseCosts"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/expenses/costs": {
      "post": {
        "tags": [
          "Expense costs"
        ],
        "summary": "Create an expense from a composition, or separate costs out of a shared receipt",
        "operationId": "CostsCreateController_create",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`CostsCreateDto`: one strict object, two modes.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CostsCreateDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "`ExpenseCostsDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseCosts"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/expenses/{expenseId}/attachments/{attachmentId}/items": {
      "get": {
        "tags": [
          "Attachment items"
        ],
        "summary": "A receipt's printed purchase lines (the selected evidence)",
        "operationId": "ItemizationController_read",
        "parameters": [
          {
            "in": "path",
            "name": "expenseId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "attachmentId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-public-api": true,
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`AttachmentItemizationDto`, Nest's key order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentItemizationDto"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/expenses/{expenseId}/attachments/{attachmentId}/itemizations": {
      "post": {
        "tags": [
          "Attachment items"
        ],
        "summary": "Ask for a receipt's purchase lines",
        "operationId": "ItemizationController_request",
        "parameters": [
          {
            "in": "path",
            "name": "expenseId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "attachmentId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`AttachmentItemizationRequestDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AttachmentItemizationRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`AttachmentItemizationDto`, Nest's key order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentItemizationDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/expenses/{expenseId}/attachments/{attachmentId}/itemizations/{snapshotId}": {
      "get": {
        "tags": [
          "Attachment items"
        ],
        "summary": "One published snapshot of a receipt's purchase lines",
        "operationId": "ItemizationController_snapshot",
        "parameters": [
          {
            "in": "path",
            "name": "expenseId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "attachmentId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "snapshotId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-public-api": true,
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`AttachmentItemizationDto`, Nest's key order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentItemizationDto"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/expenses/{id}/costs": {
      "get": {
        "tags": [
          "Expense costs"
        ],
        "summary": "An expense's cost composition",
        "operationId": "CostsController_read",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`ExpenseCostsDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseCosts"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "put": {
        "tags": [
          "Expense costs"
        ],
        "summary": "Write an expense's cost composition",
        "operationId": "CostsController_write",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The body (`costsWriteSchema`).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WriteCosts"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`ExpenseCostsDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseCosts"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/expenses/{id}/costs/tax-recovery": {
      "get": {
        "tags": [
          "Expense tax recovery"
        ],
        "summary": "An expense's VAT recovery, and whether the caller may decide it",
        "operationId": "TaxRecoveryController_readTaxRecovery",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "An expense's VAT recovery (Nest `TaxRecoveryDto`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VatRecovery"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Expense tax recovery"
        ],
        "summary": "Decide how much of an expense's VAT is recoverable",
        "operationId": "TaxRecoveryController_writeTaxRecovery",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The body (`taxRecoveryWriteSchema`).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WriteVatRecovery"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "An expense's VAT recovery (Nest `TaxRecoveryDto`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VatRecovery"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/expenses/{id}/costs/context": {
      "get": {
        "tags": [
          "Expense costs"
        ],
        "summary": "The split editor's saved context: its groups, declines and item snapshots",
        "operationId": "CostsController_context",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-public-api": true,
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`CostSplitContextDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CostSplitContextDto"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/expenses/{id}/costs/preview": {
      "post": {
        "tags": [
          "Expense costs"
        ],
        "summary": "Preview a cost composition",
        "operationId": "CostsController_preview",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The body (`costsWriteSchema`).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WriteCosts"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`ExpenseCostsDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseCosts"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/expenses/{id}/costs/dimensions": {
      "get": {
        "tags": [
          "Expense costs"
        ],
        "summary": "The dimension values the cost editor offers",
        "operationId": "CostsController_dimensions",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "definitionId",
            "description": "One dimension definition",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "after",
            "description": "The page after this value",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "afterDefinition",
            "description": "The page after this definition",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "search",
            "description": "Values whose code or name contain this",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Values per page",
            "schema": {
              "type": "integer"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`CostDimensionCatalogDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CostDimensionCatalog"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/flows": {
      "get": {
        "tags": [
          "Flows"
        ],
        "summary": "List an organization's flows",
        "operationId": "FlowsController_findAll",
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "`organizationId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "name",
            "description": "`name` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "nameContains",
            "description": "`name` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "description",
            "description": "`description` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "descriptionContains",
            "description": "`description` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "descriptionIsNull",
            "description": "`description` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "isActive",
            "description": "`isActive` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "rootNodeId",
            "description": "`rootNodeId` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "rootNodeIdContains",
            "description": "`rootNodeId` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "rootNodeIdIsNull",
            "description": "`rootNodeId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtFrom",
            "description": "`createdAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtTo",
            "description": "`createdAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtFrom",
            "description": "`updatedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtTo",
            "description": "`updatedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "isPublished",
            "description": "`isPublished` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "publishedAtFrom",
            "description": "`publishedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "publishedAtTo",
            "description": "`publishedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "publishedAtIsNull",
            "description": "`publishedAt` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "created",
                "createdAsc",
                "name",
                "updated"
              ],
              "default": "created"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000,
              "default": 100
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_FlowListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "organizationId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "name",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "description",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "isActive",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "rootNodeId",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "updatedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "isPublished",
            "type": "bool",
            "ops": [
              "=",
              "!=",
              ":*"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "publishedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "Flow",
          "maxLimit": 1000,
          "defaultLimit": 100,
          "defaultSort": "created",
          "sorts": [
            {
              "name": "created",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "createdAsc",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "name",
              "keys": [
                {
                  "field": "name",
                  "column": "name",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "updated",
              "keys": [
                {
                  "field": "updatedAt",
                  "column": "updatedAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "organizationId",
              "field": "organizationId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "name",
              "field": "name",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "nameContains",
              "field": "name",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "description",
              "field": "description",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "descriptionContains",
              "field": "description",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "descriptionIsNull",
              "field": "description",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "isActive",
              "field": "isActive",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "rootNodeId",
              "field": "rootNodeId",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "rootNodeIdContains",
              "field": "rootNodeId",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "rootNodeIdIsNull",
              "field": "rootNodeId",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "createdAtFrom",
              "field": "createdAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "createdAtTo",
              "field": "createdAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "updatedAtFrom",
              "field": "updatedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "updatedAtTo",
              "field": "updatedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "isPublished",
              "field": "isPublished",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "publishedAtFrom",
              "field": "publishedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "publishedAtTo",
              "field": "publishedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "publishedAtIsNull",
              "field": "publishedAt",
              "op": "isNull",
              "type": "timestamp"
            }
          ],
          "extras": []
        },
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Flows"
        ],
        "summary": "Create a draft flow",
        "operationId": "FlowsController_create",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization the flow belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`CreateFlowDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFlowDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A flow's summary: what a create, an import, a duplicate or a draft edit answers, and a\n trace's `flow` (depth 0, pure).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/flows/import": {
      "post": {
        "tags": [
          "Flows"
        ],
        "summary": "Create a flow from an exported document",
        "operationId": "FlowsController_importFlow",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization the flow belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "An exported flow document: name, description, triggers and nodes with symbolic ids.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportFlowDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "202": {
            "description": "Accepted: the operation that runs the work (read it at Location)",
            "headers": {
              "Location": {
                "description": "`/operations/{id}`",
                "style": "simple",
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/flows/triggers": {
      "get": {
        "tags": [
          "Flows"
        ],
        "summary": "The triggers and which are in use",
        "operationId": "FlowsController_getTriggers",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization the flow belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_TriggerInfoDto"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/flows/schema/{trigger}": {
      "get": {
        "tags": [
          "Flows"
        ],
        "summary": "The context fields of a trigger",
        "operationId": "FlowsController_getSchema",
        "parameters": [
          {
            "in": "path",
            "name": "trigger",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/FlowTrigger"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization the flow belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`TriggerSchemaDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerSchemaDto"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/flows/context-schema": {
      "get": {
        "tags": [
          "Flows"
        ],
        "summary": "The context fields of a domain",
        "operationId": "FlowsController_getDomainSchema",
        "parameters": [
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization the flow belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "domain",
            "description": "The flow domain.",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/FlowDomain"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`DomainSchemaDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainSchemaDto"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/flows/{id}": {
      "get": {
        "tags": [
          "Flows"
        ],
        "summary": "Get a flow",
        "operationId": "FlowsController_findOne",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization the flow belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A flow (`GET /flows/{id}`, and what a status transition answers): the row, triggers as\n an array, the publish state and the draft nodes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Flows"
        ],
        "summary": "Delete a flow",
        "operationId": "FlowsController_remove",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization the flow belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "x-public-api": true,
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Flows"
        ],
        "summary": "Edit a flow's draft",
        "operationId": "FlowsController_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization the flow belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`UpdateFlowDto`: a wholesale draft edit (QUIRKS Q7). Absent fields are kept.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFlowDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A flow's summary: what a create, an import, a duplicate or a draft edit answers, and a\n trace's `flow` (depth 0, pure).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/flows/{id}/validate": {
      "post": {
        "tags": [
          "Flows"
        ],
        "summary": "Validate a flow's draft",
        "operationId": "FlowsController_validate",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization the flow belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "The validate route's answer (`FlowValidationResultDto`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowValidationResultDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/flows/{id}/simulate": {
      "post": {
        "tags": [
          "Flows"
        ],
        "summary": "Simulate a flow's draft on sample data",
        "operationId": "FlowsController_simulate",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization the flow belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          }
        ],
        "requestBody": {
          "description": "`FlowSimulationRequestDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FlowSimulationRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A walk's outcome (`FlowEvaluationResult`, the simulate routes' body).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowSimulationResultDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/flows/{id}/simulate/{subjectId}": {
      "post": {
        "tags": [
          "Flows"
        ],
        "summary": "Simulate a flow's draft on a report",
        "operationId": "FlowsController_simulateWithSubject",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "subjectId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization the flow belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          }
        ],
        "requestBody": {
          "description": "`FlowSimulationRequestDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FlowSimulationRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A walk's outcome (`FlowEvaluationResult`, the simulate routes' body).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowSimulationResultDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/flows/{id}/duplicate": {
      "post": {
        "tags": [
          "Flows"
        ],
        "summary": "Copy a flow as a new draft",
        "operationId": "FlowsController_duplicate",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization the flow belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /flows/{id}/duplicate`'s body (Nest read `@Body('name')` raw).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DuplicateFlowDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A flow's summary: what a create, an import, a duplicate or a draft edit answers, and a\n trace's `flow` (depth 0, pure).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/flows/{id}/publish": {
      "post": {
        "tags": [
          "Flows"
        ],
        "summary": "Publish a flow's draft",
        "operationId": "FlowsController_publish",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization the flow belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /flows/{id}/publish`'s body (Nest read `@Body('changeNote')` raw).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishFlowDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A flow (`GET /flows/{id}`, and what a status transition answers): the row, triggers as\n an array, the publish state and the draft nodes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowDetail"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/flows/{id}/discard": {
      "post": {
        "tags": [
          "Flows"
        ],
        "summary": "Reset a draft to the published flow",
        "operationId": "FlowsController_discardDraft",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization the flow belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /flows/{id}/discard`: the draft back to the published snapshot (Q9).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiscardDraftBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A flow (`GET /flows/{id}`, and what a status transition answers): the row, triggers as\n an array, the publish state and the draft nodes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowDetail"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/flows/{id}/traces": {
      "get": {
        "tags": [
          "Flows"
        ],
        "summary": "A flow's execution traces",
        "operationId": "FlowsController_getTraces",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "flowId",
            "description": "`flowId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "flowVersionId",
            "description": "`flowVersionId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "flowVersionIdIsNull",
            "description": "`flowVersionId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "subjectType",
            "description": "`subjectType` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "subjectTypeContains",
            "description": "`subjectType` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "subjectId",
            "description": "`subjectId` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "subjectIdContains",
            "description": "`subjectId` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "status",
            "description": "`status` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "statusContains",
            "description": "`status` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "startedAtFrom",
            "description": "`startedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "startedAtTo",
            "description": "`startedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "completedAtFrom",
            "description": "`completedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "completedAtTo",
            "description": "`completedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "completedAtIsNull",
            "description": "`completedAt` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "error",
            "description": "`error` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "errorContains",
            "description": "`error` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "errorIsNull",
            "description": "`error` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "started",
                "startedAsc"
              ],
              "default": "started"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000,
              "default": 100
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization the flow belongs to (required).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_FlowTraceListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "flowId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "flowVersionId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "subjectType",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "subjectId",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "status",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "startedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "completedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "error",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "FlowTrace",
          "maxLimit": 1000,
          "defaultLimit": 100,
          "defaultSort": "started",
          "sorts": [
            {
              "name": "started",
              "keys": [
                {
                  "field": "startedAt",
                  "column": "startedAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "startedAsc",
              "keys": [
                {
                  "field": "startedAt",
                  "column": "startedAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "flowId",
              "field": "flowId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "flowVersionId",
              "field": "flowVersionId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "flowVersionIdIsNull",
              "field": "flowVersionId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "subjectType",
              "field": "subjectType",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "subjectTypeContains",
              "field": "subjectType",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "subjectId",
              "field": "subjectId",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "subjectIdContains",
              "field": "subjectId",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "status",
              "field": "status",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "statusContains",
              "field": "status",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "startedAtFrom",
              "field": "startedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "startedAtTo",
              "field": "startedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "completedAtFrom",
              "field": "completedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "completedAtTo",
              "field": "completedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "completedAtIsNull",
              "field": "completedAt",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "error",
              "field": "error",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "errorContains",
              "field": "error",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "errorIsNull",
              "field": "error",
              "op": "isNull",
              "type": "text"
            }
          ],
          "extras": [
            "organizationId"
          ]
        },
        "x-public-api": true
      }
    },
    "/flows/{id}/traces/{traceId}": {
      "get": {
        "tags": [
          "Flows"
        ],
        "summary": "One execution trace with its logs",
        "operationId": "FlowsController_getTrace",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "traceId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization the flow belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "One trace (`GET /flows/{id}/traces/{traceId}`): its list row's fields, its logs in\n entry order and its flow's summary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowTraceDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/flows/{id}/versions": {
      "get": {
        "tags": [
          "Flows"
        ],
        "summary": "A flow's published versions",
        "operationId": "FlowsController_listVersions",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "flowId",
            "description": "`flowId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "versionFrom",
            "description": "`version` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "versionTo",
            "description": "`version` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "rootNodeId",
            "description": "`rootNodeId` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "rootNodeIdContains",
            "description": "`rootNodeId` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "rootNodeIdIsNull",
            "description": "`rootNodeId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "publishedAtFrom",
            "description": "`publishedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "publishedAtTo",
            "description": "`publishedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "publishedBy",
            "description": "`publishedBy` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "publishedByIsNull",
            "description": "`publishedBy` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "changeNote",
            "description": "`changeNote` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "changeNoteContains",
            "description": "`changeNote` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "changeNoteIsNull",
            "description": "`changeNote` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "version",
                "versionAsc"
              ],
              "default": "version"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000,
              "default": 100
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization the flow belongs to (required).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_FlowVersionListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "flowId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "version",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "rootNodeId",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "publishedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "publishedBy",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "changeNote",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "FlowVersion",
          "maxLimit": 1000,
          "defaultLimit": 100,
          "defaultSort": "version",
          "sorts": [
            {
              "name": "version",
              "keys": [
                {
                  "field": "version",
                  "column": "version",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "versionAsc",
              "keys": [
                {
                  "field": "version",
                  "column": "version",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "flowId",
              "field": "flowId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "versionFrom",
              "field": "version",
              "op": "from",
              "type": "int"
            },
            {
              "name": "versionTo",
              "field": "version",
              "op": "to",
              "type": "int"
            },
            {
              "name": "rootNodeId",
              "field": "rootNodeId",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "rootNodeIdContains",
              "field": "rootNodeId",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "rootNodeIdIsNull",
              "field": "rootNodeId",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "publishedAtFrom",
              "field": "publishedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "publishedAtTo",
              "field": "publishedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "publishedBy",
              "field": "publishedBy",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "publishedByIsNull",
              "field": "publishedBy",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "changeNote",
              "field": "changeNote",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "changeNoteContains",
              "field": "changeNote",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "changeNoteIsNull",
              "field": "changeNote",
              "op": "isNull",
              "type": "text"
            }
          ],
          "extras": [
            "organizationId"
          ]
        },
        "x-public-api": true
      }
    },
    "/flows/{id}/versions/{versionId}": {
      "get": {
        "tags": [
          "Flows"
        ],
        "summary": "One published version",
        "operationId": "FlowsController_getVersion",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "versionId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization the flow belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A published version (`GET /flows/{id}/versions/{versionId}`), its snapshot included.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowVersionDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/flows/{id}/versions/{versionId}/restore": {
      "post": {
        "tags": [
          "Flows"
        ],
        "summary": "Restore a version into the draft",
        "operationId": "FlowsController_restoreVersion",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "versionId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization the flow belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /flows/{id}/versions/{versionId}/restore`: a version's snapshot into the\n draft (not published).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreVersionBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A flow (`GET /flows/{id}`, and what a status transition answers): the row, triggers as\n an array, the publish state and the draft nodes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowDetail"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/flows/{id}/export": {
      "get": {
        "tags": [
          "Flows"
        ],
        "summary": "Export a flow",
        "operationId": "FlowsController_exportFlow",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization the flow belongs to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "format",
            "description": "`json` for JSON; YAML otherwise.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A file",
            "headers": {
              "Content-Disposition": {
                "description": "`attachment` or `inline`, with the file name",
                "style": "simple",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/octet-stream"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{id}/findings": {
      "get": {
        "tags": [
          "Findings"
        ],
        "summary": "List a report's findings",
        "operationId": "FindingsController_getReportFindings",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A report's findings as its review screens read them (a purpose read model): the open\n and require counts and every finding the caller may see.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportFindingsOverview"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/findings/{id}/dismiss": {
      "post": {
        "tags": [
          "Findings"
        ],
        "summary": "Dismiss a finding",
        "operationId": "FindingsController_dismiss",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /findings/{id}/dismiss`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DismissFindingDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`FindingDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FindingDetail"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/findings/{id}/confirm": {
      "post": {
        "tags": [
          "Findings"
        ],
        "summary": "Confirm a finding",
        "operationId": "FindingsController_confirm",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /findings/{id}/confirm`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmFindingDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`FindingDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FindingDetail"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/findings/{id}/verdict": {
      "post": {
        "tags": [
          "Findings"
        ],
        "summary": "Record a verdict on a finding (and decide its report)",
        "operationId": "FindingVerdictController_verdict",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`FindingVerdictDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FindingVerdictDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`FindingVerdictResponseDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FindingVerdictOutcome"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/findings/{id}/unresolve": {
      "post": {
        "tags": [
          "Findings"
        ],
        "summary": "Reopen a dismissed or confirmed finding",
        "operationId": "FindingsController_unresolve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /findings/{id}/unresolve` (no body).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnresolveFinding"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`FindingDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FindingDetail"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/organizations/{organizationId}/check-policies": {
      "get": {
        "tags": [
          "Checks"
        ],
        "summary": "List the organization's effective check policies",
        "operationId": "CheckPolicyController_getPolicies",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_EffectiveCheckPolicy"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/organizations/{organizationId}/check-policies/{checkId}": {
      "put": {
        "tags": [
          "Checks"
        ],
        "summary": "Update one check's policy for the organization",
        "operationId": "CheckPolicyController_updatePolicy",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "checkId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`PUT /organizations/{organizationId}/check-policies/{checkId}` (`UpdateCheckPolicyDto`).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCheckPolicyDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_EffectiveCheckPolicy"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/organizations/{organizationId}/control-officers": {
      "get": {
        "tags": [
          "Checks"
        ],
        "summary": "The organization's Kontrollansvarlige",
        "operationId": "ControlOfficerController_get",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`ControlOfficersDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ControlOfficersDto"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "put": {
        "tags": [
          "Checks"
        ],
        "summary": "Designate the organization's Kontrollansvarlige",
        "operationId": "ControlOfficerController_designate",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`PUT /organizations/{organizationId}/control-officers`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DesignateControlOfficersDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`ControlOfficersDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ControlOfficersDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{id}/duplicate-groups": {
      "get": {
        "tags": [
          "Fingerprint"
        ],
        "summary": "List the duplicate groups touching a report",
        "operationId": "FingerprintController_getReportDuplicateGroups",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_DuplicateGroupDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/duplicate-groups/{id}/dismiss": {
      "post": {
        "tags": [
          "Fingerprint"
        ],
        "summary": "Dismiss a duplicate group",
        "operationId": "FingerprintController_dismissGroup",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /duplicate-groups/{id}/dismiss` (`DismissMatchDto`).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DismissMatchDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A duplicate group (what its transitions answer, SPINE 26.1 rule 10).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DuplicateGroupDetail"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/duplicate-groups/{id}/confirm": {
      "post": {
        "tags": [
          "Fingerprint"
        ],
        "summary": "Confirm a duplicate group",
        "operationId": "FingerprintController_confirmGroup",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /duplicate-groups/{id}/confirm` (`ConfirmMatchDto`).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmMatchDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A duplicate group (what its transitions answer, SPINE 26.1 rule 10).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DuplicateGroupDetail"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/duplicate-groups/{id}/unresolve": {
      "post": {
        "tags": [
          "Fingerprint"
        ],
        "summary": "Reopen a resolved duplicate group",
        "operationId": "FingerprintController_unresolveGroup",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`POST /duplicate-groups/{id}/unresolve` (no body).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnresolveGroup"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A duplicate group (what its transitions answer, SPINE 26.1 rule 10).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DuplicateGroupDetail"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/duplicate-groups/{id}/resolutions": {
      "get": {
        "tags": [
          "Fingerprint"
        ],
        "summary": "A duplicate group's resolution history",
        "operationId": "FingerprintController_getGroupResolutions",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_DuplicateGroupResolution"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/expenses/{expenseId}/attachments/{attachmentId}/travelers": {
      "get": {
        "tags": [
          "Attachment enrichment"
        ],
        "summary": "Read a receipt's traveler comparison",
        "operationId": "TravelerController_read",
        "parameters": [
          {
            "in": "path",
            "name": "expenseId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "attachmentId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-public-api": true,
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`TravelerReadDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelerReadDto"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "post": {
        "tags": [
          "Attachment enrichment"
        ],
        "summary": "Request traveler extraction for a receipt",
        "operationId": "TravelerController_request",
        "parameters": [
          {
            "in": "path",
            "name": "expenseId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "attachmentId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`TravelerCaptureRequestDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelerCaptureRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "202": {
            "description": "Accepted: the operation that runs the work (read it at Location)",
            "headers": {
              "Location": {
                "description": "`/operations/{id}`",
                "style": "simple",
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/findings/{findingId}/travelers": {
      "get": {
        "tags": [
          "Attachment enrichment"
        ],
        "summary": "Read the traveler comparison behind a finding",
        "operationId": "TravelerController_readFinding",
        "parameters": [
          {
            "in": "path",
            "name": "findingId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-public-api": true,
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`TravelerReadDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelerReadDto"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/findings/{findingId}/acknowledge-traveler": {
      "post": {
        "tags": [
          "Attachment enrichment"
        ],
        "summary": "Acknowledge a traveler name mismatch",
        "operationId": "TravelerController_acknowledge",
        "parameters": [
          {
            "in": "path",
            "name": "findingId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`TravelerAcknowledgeDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelerAcknowledgeDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "An acknowledgment row (Nest answered the Prisma row).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelerAcknowledgment"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{id}/travels": {
      "get": {
        "tags": [
          "Travels"
        ],
        "summary": "A report's travel, as a list of zero or one",
        "operationId": "TravelsController_findByReportId",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "`organizationId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "fromDateTimeFrom",
            "description": "`fromDateTime` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "fromDateTimeTo",
            "description": "`fromDateTime` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "fromDateTimeIsNull",
            "description": "`fromDateTime` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "toDateTimeFrom",
            "description": "`toDateTime` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "toDateTimeTo",
            "description": "`toDateTime` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "toDateTimeIsNull",
            "description": "`toDateTime` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "businessStartAtFrom",
            "description": "`businessStartAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "businessStartAtTo",
            "description": "`businessStartAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "businessStartAtIsNull",
            "description": "`businessStartAt` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "businessEndAtFrom",
            "description": "`businessEndAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "businessEndAtTo",
            "description": "`businessEndAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "businessEndAtIsNull",
            "description": "`businessEndAt` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "purpose",
            "description": "`purpose` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "purposeContains",
            "description": "`purpose` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "purposeIsNull",
            "description": "`purpose` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "typeOfAccommodation",
            "description": "`typeOfAccommodation` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "HOTEL",
                  "COOKING_AVAILABLE",
                  "COOKING_UNAVAILABLE",
                  "NONE",
                  "TRANSPORT"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "advanceAmountFrom",
            "description": "`advanceAmount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "advanceAmountTo",
            "description": "`advanceAmount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "advanceAmountIsNull",
            "description": "`advanceAmount` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "rateLevel",
            "description": "`rateLevel` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "NONE",
                  "TAX_FREE",
                  "TAXABLE",
                  "CUSTOM"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "perDiemDisabled",
            "description": "`perDiemDisabled` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "travelRequestId",
            "description": "`travelRequestId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "travelRequestIdIsNull",
            "description": "`travelRequestId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "dietSchemeVersionId",
            "description": "`dietSchemeVersionId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "dietSchemeVersionIdIsNull",
            "description": "`dietSchemeVersionId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtFrom",
            "description": "`createdAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtTo",
            "description": "`createdAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtFrom",
            "description": "`updatedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtTo",
            "description": "`updatedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "created"
              ],
              "default": "created"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1,
              "default": 1
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_TravelListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "organizationId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "fromDateTime",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "toDateTime",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "businessStartAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "businessEndAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "purpose",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "typeOfAccommodation",
            "type": "enum",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [
              "HOTEL",
              "COOKING_AVAILABLE",
              "COOKING_UNAVAILABLE",
              "NONE",
              "TRANSPORT"
            ],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "advanceAmount",
            "type": "amount",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "rateLevel",
            "type": "enum",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [
              "NONE",
              "TAX_FREE",
              "TAXABLE",
              "CUSTOM"
            ],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "perDiemDisabled",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "travelRequestId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "dietSchemeVersionId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "updatedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "Travel",
          "maxLimit": 1,
          "defaultLimit": 1,
          "defaultSort": "created",
          "sorts": [
            {
              "name": "created",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "organizationId",
              "field": "organizationId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "fromDateTimeFrom",
              "field": "fromDateTime",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "fromDateTimeTo",
              "field": "fromDateTime",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "fromDateTimeIsNull",
              "field": "fromDateTime",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "toDateTimeFrom",
              "field": "toDateTime",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "toDateTimeTo",
              "field": "toDateTime",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "toDateTimeIsNull",
              "field": "toDateTime",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "businessStartAtFrom",
              "field": "businessStartAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "businessStartAtTo",
              "field": "businessStartAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "businessStartAtIsNull",
              "field": "businessStartAt",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "businessEndAtFrom",
              "field": "businessEndAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "businessEndAtTo",
              "field": "businessEndAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "businessEndAtIsNull",
              "field": "businessEndAt",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "purpose",
              "field": "purpose",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "purposeContains",
              "field": "purpose",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "purposeIsNull",
              "field": "purpose",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "typeOfAccommodation",
              "field": "typeOfAccommodation",
              "op": "eq",
              "type": "enum"
            },
            {
              "name": "advanceAmountFrom",
              "field": "advanceAmount",
              "op": "from",
              "type": "amount"
            },
            {
              "name": "advanceAmountTo",
              "field": "advanceAmount",
              "op": "to",
              "type": "amount"
            },
            {
              "name": "advanceAmountIsNull",
              "field": "advanceAmount",
              "op": "isNull",
              "type": "amount"
            },
            {
              "name": "rateLevel",
              "field": "rateLevel",
              "op": "eq",
              "type": "enum"
            },
            {
              "name": "perDiemDisabled",
              "field": "perDiemDisabled",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "travelRequestId",
              "field": "travelRequestId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "travelRequestIdIsNull",
              "field": "travelRequestId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "dietSchemeVersionId",
              "field": "dietSchemeVersionId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "dietSchemeVersionIdIsNull",
              "field": "dietSchemeVersionId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "createdAtFrom",
              "field": "createdAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "createdAtTo",
              "field": "createdAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "updatedAtFrom",
              "field": "updatedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "updatedAtTo",
              "field": "updatedAt",
              "op": "to",
              "type": "timestamp"
            }
          ],
          "extras": []
        },
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Travels"
        ],
        "summary": "Create the report's travel (or fill its placeholder) and price its per diems",
        "operationId": "TravelsController_create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`CreateTravelDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTravelDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "What a travel write answers (SPINE 26.1 rule 10, 26.2): the travel's one summary\n (travel-api's [`TravelSummary`]) beside its report's summary after the write.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelWritten"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{id}/travels/draft": {
      "post": {
        "tags": [
          "Travels"
        ],
        "summary": "An empty placeholder travel, for scanning before the trip is known",
        "operationId": "TravelsController_createDraft",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`TravelsController_createDraft` (no body): an empty placeholder travel for scanning\n before the trip is known (Q31). 201 with the travel's summary, the existing one when\n the report already has a travel (Nest answered an empty 201).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DraftTravel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "What a travel write answers (SPINE 26.1 rule 10, 26.2): the travel's one summary\n (travel-api's [`TravelSummary`]) beside its report's summary after the write.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelWritten"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{id}/travels/{travelId}": {
      "get": {
        "tags": [
          "Travels"
        ],
        "summary": "The report's travel with its stays (their expenses and places) and its places",
        "operationId": "TravelsController_findOne",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "travelId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "",
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "patch": {
        "tags": [
          "Travels"
        ],
        "summary": "Edit the report's travel and re-price its per diems",
        "operationId": "TravelsController_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "travelId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-Match",
            "required": false,
            "description": "The version the write was prepared against (`\"<version>\"`, from the row's `version` field; never a read's weak `ETag`): a change since then to a field this write touches answers 409 `edit_conflict`; a disjoint one merges.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "`UpdateTravelDto`: every field optional; `null` clears a nullable column.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTravelDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "What a travel write answers (SPINE 26.1 rule 10, 26.2): the travel's one summary\n (travel-api's [`TravelSummary`]) beside its report's summary after the write.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelWritten"
                }
              }
            }
          },
          "409": {
            "description": "`edit_conflict`: a field this write changes changed since its `If-Match`; nothing was applied",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/EditConflictProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true,
        "x-versioned": true
      }
    },
    "/reports/{id}/travels/{travelId}/accommodations": {
      "post": {
        "tags": [
          "Accommodations"
        ],
        "summary": "Add a stay to the travel: its place, its expense and costs, the re-priced per diems",
        "operationId": "AccommodationsController_create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "travelId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`CreateAccommodationDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAccommodationDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "What a stay create or update answers (SPINE 26.1 rule 10, 26.2): the stay's one summary\n (travel-api's [`travel_api::StaySummary`], with its `nightSupplement` projection) beside\n its report's summary after the write. The legacy contract answers Nest's\n `TravelAccommodationEntity` document instead (`compat::routes::stays`, through\n [`legacy::documents`]).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StayWritten"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{id}/travels/{travelId}/accommodations/{accommodationId}": {
      "delete": {
        "tags": [
          "Accommodations"
        ],
        "summary": "Remove a stay with its own costs (a shared receipt stays on its expense)",
        "operationId": "AccommodationsController_delete",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "travelId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "accommodationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-Match",
            "required": false,
            "description": "The version the write was prepared against (`\"<version>\"`, from the row's `version` field; never a read's weak `ETag`): a change since then to a field this write touches answers 409 `edit_conflict`; a disjoint one merges.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-versioned": true,
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          },
          "409": {
            "description": "`edit_conflict`: a field this write changes changed since its `If-Match`; nothing was applied",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/EditConflictProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "patch": {
        "tags": [
          "Accommodations"
        ],
        "summary": "Edit a stay: its place, its expenses where the money moved, the re-priced per diems",
        "operationId": "AccommodationsController_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "travelId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "accommodationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-Match",
            "required": false,
            "description": "The version the write was prepared against (`\"<version>\"`, from the row's `version` field; never a read's weak `ETag`): a change since then to a field this write touches answers 409 `edit_conflict`; a disjoint one merges.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "`UpdateAccommodationDto`: every field optional; `null` clears a nullable column.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAccommodationDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "What a stay create or update answers (SPINE 26.1 rule 10, 26.2): the stay's one summary\n (travel-api's [`travel_api::StaySummary`], with its `nightSupplement` projection) beside\n its report's summary after the write. The legacy contract answers Nest's\n `TravelAccommodationEntity` document instead (`compat::routes::stays`, through\n [`legacy::documents`]).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StayWritten"
                }
              }
            }
          },
          "409": {
            "description": "`edit_conflict`: a field this write changes changed since its `If-Match`; nothing was applied",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/EditConflictProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true,
        "x-versioned": true
      }
    },
    "/reports/{id}/travels/{travelId}/accommodations/from-expense": {
      "post": {
        "tags": [
          "Accommodations"
        ],
        "summary": "File a stay over costs of an expense already on the report (no money moves)",
        "operationId": "AccommodationsController_fromExpense",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "travelId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`ReferenceAccommodationDto` (strict).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReferenceAccommodationDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{id}/travels/{travelId}/accommodations/{accommodationId}/detach-expense": {
      "post": {
        "tags": [
          "Accommodations"
        ],
        "summary": "Remove a stay filed over an expense's costs and keep the expense whole",
        "operationId": "AccommodationsController_detachExpense",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "travelId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "accommodationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`DetachAccommodationExpenseDto` (strict).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DetachAccommodationExpenseDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "Every column of `travel_accomodations`, Prisma's field order (`TravelAccommodation`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelAccommodationRow"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{id}/travels/{travelId}/accommodations/{accommodationId}/attachments": {
      "get": {
        "tags": [
          "Accommodations"
        ],
        "summary": "The receipts of the stay's expense, with their captures and read links",
        "operationId": "AccommodationsController_getAttachments",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "travelId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "accommodationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": true
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Accommodations"
        ],
        "summary": "Register the stay receipt's upload intent; POST /uploads/{id}:confirm lands it on the stay's expense, reads it and may fill the stay",
        "operationId": "AccommodationsController_uploadAttachment",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "travelId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "accommodationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The intent's body: the file the client is about to upload, and what to do with it.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccommodationReceiptUploadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "The intent's 201: where the bytes go.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccommodationReceiptUpload"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{id}/travels/{travelId}/simulate-scheme": {
      "post": {
        "tags": [
          "Travels"
        ],
        "summary": "Price a candidate diet scheme against the travel without writing",
        "operationId": "TravelsController_simulateScheme",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "travelId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`SimulateSchemeDto`: the candidate scheme config.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimulateSchemeDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A scheme simulation (`SchemeSimulation`, a computed answer: one plain shape).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemeSimulation"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/drives/toll": {
      "post": {
        "tags": [
          "Drives"
        ],
        "summary": "Quote the toll for a route between two searched places, in the report's base currency. A supplied report is read-authorized; incomplete estimates require user confirmation.",
        "operationId": "DriveTollController_quote",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`QuoteDriveTollDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteDriveTollDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`DriveTollQuoteDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DriveTollQuoteDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/drives/distance": {
      "post": {
        "tags": [
          "Drives"
        ],
        "summary": "Route a drive's points and answer the distance and legs",
        "operationId": "DrivesController_calculateDistance",
        "requestBody": {
          "description": "`CalculateDriveDistanceDto`: exactly one of `placeIds` / `waypoints`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculateDriveDistanceDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A computed route (`DriveDistanceResponseDto`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DriveDistanceResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/drives": {
      "get": {
        "tags": [
          "Drives"
        ],
        "summary": "A report's drives",
        "operationId": "DrivesController_findAll",
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "`organizationId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "dateFrom",
            "description": "`date` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "dateTo",
            "description": "`date` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "dateIsNull",
            "description": "`date` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "description",
            "description": "`description` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "descriptionContains",
            "description": "`description` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "descriptionIsNull",
            "description": "`description` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "distanceMetersFrom",
            "description": "`distanceMeters` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "distanceMetersTo",
            "description": "`distanceMeters` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "distanceSource",
            "description": "`distanceSource` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ROUTE",
                  "MANUAL"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "distanceSourceIsNull",
            "description": "`distanceSource` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "returnTrip",
            "description": "`returnTrip` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "vehicle",
            "description": "`vehicle` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "vehicleContains",
            "description": "`vehicle` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "vehicleIsNull",
            "description": "`vehicle` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "shouldCalculateToll",
            "description": "`shouldCalculateToll` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "passengerNumberFrom",
            "description": "`passengerNumber` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "passengerNumberTo",
            "description": "`passengerNumber` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "isOffroad",
            "description": "`isOffroad` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "hasTrailer",
            "description": "`hasTrailer` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "amountFrom",
            "description": "`amount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "amountTo",
            "description": "`amount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "mileageAmountFrom",
            "description": "`mileageAmount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "mileageAmountTo",
            "description": "`mileageAmount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "tollAmountFrom",
            "description": "`tollAmount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "tollAmountTo",
            "description": "`tollAmount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "passengerAmountFrom",
            "description": "`passengerAmount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "passengerAmountTo",
            "description": "`passengerAmount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "trailerAmountFrom",
            "description": "`trailerAmount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "trailerAmountTo",
            "description": "`trailerAmount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "offroadAmountFrom",
            "description": "`offroadAmount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "offroadAmountTo",
            "description": "`offroadAmount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "mileageExemptAmountFrom",
            "description": "`mileageExemptAmount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "mileageExemptAmountTo",
            "description": "`mileageExemptAmount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "passengerExemptAmountFrom",
            "description": "`passengerExemptAmount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "passengerExemptAmountTo",
            "description": "`passengerExemptAmount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "trailerExemptAmountFrom",
            "description": "`trailerExemptAmount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "trailerExemptAmountTo",
            "description": "`trailerExemptAmount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "offroadExemptAmountFrom",
            "description": "`offroadExemptAmount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "offroadExemptAmountTo",
            "description": "`offroadExemptAmount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "departmentId",
            "description": "`departmentId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "departmentIdIsNull",
            "description": "`departmentId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "projectId",
            "description": "`projectId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "projectIdIsNull",
            "description": "`projectId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "taxCategoryId",
            "description": "`taxCategoryId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "taxCategoryIdIsNull",
            "description": "`taxCategoryId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "taxFreeCategoryId",
            "description": "`taxFreeCategoryId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "taxFreeCategoryIdIsNull",
            "description": "`taxFreeCategoryId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtFrom",
            "description": "`createdAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtTo",
            "description": "`createdAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtFrom",
            "description": "`updatedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtTo",
            "description": "`updatedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "created",
                "date",
                "updated"
              ],
              "default": "created"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 200,
              "default": 100
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "reportId",
            "description": "The report whose live drives are listed. Without it, one `organizationId` lists the organization's live drives across the reports the caller may read",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "reportAccountId",
            "description": "Only the drives on reports this account owns",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "include",
            "description": "Side-load related resources into `included` (SPINE 26.12.2): repeat for several; a dotted path follows a relation of the resource before it (at most 3 segments, 8 paths counting the prefixes they load). A list includes to-one relations only.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "category",
                  "taxFreeCategory",
                  "project"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "The envelope of a list whose item declares relations (SPINE 26.12.2): [`ListPage`]'s\n members and the side-loads, `{ items, hasMore, nextCursor?, total?, included? }`. Its\n schema keeps `ListPage`'s name: a route answers one or the other for an item, never\n both.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_DriveDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-relations": [
          {
            "name": "category",
            "kind": "toOne",
            "via": "taxCategoryId",
            "target": "category"
          },
          {
            "name": "taxFreeCategory",
            "kind": "toOne",
            "via": "taxFreeCategoryId",
            "target": "category"
          },
          {
            "name": "project",
            "kind": "toOne",
            "via": "projectId",
            "target": "project"
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "organizationId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "date",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "description",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "distanceMeters",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "distanceSource",
            "type": "enum",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [
              "ROUTE",
              "MANUAL"
            ],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "returnTrip",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "vehicle",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "shouldCalculateToll",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "passengerNumber",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "isOffroad",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "hasTrailer",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "amount",
            "type": "amount",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "mileageAmount",
            "type": "amount",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "tollAmount",
            "type": "amount",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "passengerAmount",
            "type": "amount",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "trailerAmount",
            "type": "amount",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "offroadAmount",
            "type": "amount",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "mileageExemptAmount",
            "type": "amount",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "passengerExemptAmount",
            "type": "amount",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "trailerExemptAmount",
            "type": "amount",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "offroadExemptAmount",
            "type": "amount",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "departmentId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "projectId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "taxCategoryId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "taxFreeCategoryId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "updatedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "Drive",
          "maxLimit": 200,
          "defaultLimit": 100,
          "defaultSort": "created",
          "sorts": [
            {
              "name": "created",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "date",
              "keys": [
                {
                  "field": "date",
                  "column": "date",
                  "direction": "asc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "updated",
              "keys": [
                {
                  "field": "updatedAt",
                  "column": "updatedAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "organizationId",
              "field": "organizationId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "dateFrom",
              "field": "date",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "dateTo",
              "field": "date",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "dateIsNull",
              "field": "date",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "description",
              "field": "description",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "descriptionContains",
              "field": "description",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "descriptionIsNull",
              "field": "description",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "distanceMetersFrom",
              "field": "distanceMeters",
              "op": "from",
              "type": "int"
            },
            {
              "name": "distanceMetersTo",
              "field": "distanceMeters",
              "op": "to",
              "type": "int"
            },
            {
              "name": "distanceSource",
              "field": "distanceSource",
              "op": "eq",
              "type": "enum"
            },
            {
              "name": "distanceSourceIsNull",
              "field": "distanceSource",
              "op": "isNull",
              "type": "enum"
            },
            {
              "name": "returnTrip",
              "field": "returnTrip",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "vehicle",
              "field": "vehicle",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "vehicleContains",
              "field": "vehicle",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "vehicleIsNull",
              "field": "vehicle",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "shouldCalculateToll",
              "field": "shouldCalculateToll",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "passengerNumberFrom",
              "field": "passengerNumber",
              "op": "from",
              "type": "int"
            },
            {
              "name": "passengerNumberTo",
              "field": "passengerNumber",
              "op": "to",
              "type": "int"
            },
            {
              "name": "isOffroad",
              "field": "isOffroad",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "hasTrailer",
              "field": "hasTrailer",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "amountFrom",
              "field": "amount",
              "op": "from",
              "type": "amount"
            },
            {
              "name": "amountTo",
              "field": "amount",
              "op": "to",
              "type": "amount"
            },
            {
              "name": "mileageAmountFrom",
              "field": "mileageAmount",
              "op": "from",
              "type": "amount"
            },
            {
              "name": "mileageAmountTo",
              "field": "mileageAmount",
              "op": "to",
              "type": "amount"
            },
            {
              "name": "tollAmountFrom",
              "field": "tollAmount",
              "op": "from",
              "type": "amount"
            },
            {
              "name": "tollAmountTo",
              "field": "tollAmount",
              "op": "to",
              "type": "amount"
            },
            {
              "name": "passengerAmountFrom",
              "field": "passengerAmount",
              "op": "from",
              "type": "amount"
            },
            {
              "name": "passengerAmountTo",
              "field": "passengerAmount",
              "op": "to",
              "type": "amount"
            },
            {
              "name": "trailerAmountFrom",
              "field": "trailerAmount",
              "op": "from",
              "type": "amount"
            },
            {
              "name": "trailerAmountTo",
              "field": "trailerAmount",
              "op": "to",
              "type": "amount"
            },
            {
              "name": "offroadAmountFrom",
              "field": "offroadAmount",
              "op": "from",
              "type": "amount"
            },
            {
              "name": "offroadAmountTo",
              "field": "offroadAmount",
              "op": "to",
              "type": "amount"
            },
            {
              "name": "mileageExemptAmountFrom",
              "field": "mileageExemptAmount",
              "op": "from",
              "type": "amount"
            },
            {
              "name": "mileageExemptAmountTo",
              "field": "mileageExemptAmount",
              "op": "to",
              "type": "amount"
            },
            {
              "name": "passengerExemptAmountFrom",
              "field": "passengerExemptAmount",
              "op": "from",
              "type": "amount"
            },
            {
              "name": "passengerExemptAmountTo",
              "field": "passengerExemptAmount",
              "op": "to",
              "type": "amount"
            },
            {
              "name": "trailerExemptAmountFrom",
              "field": "trailerExemptAmount",
              "op": "from",
              "type": "amount"
            },
            {
              "name": "trailerExemptAmountTo",
              "field": "trailerExemptAmount",
              "op": "to",
              "type": "amount"
            },
            {
              "name": "offroadExemptAmountFrom",
              "field": "offroadExemptAmount",
              "op": "from",
              "type": "amount"
            },
            {
              "name": "offroadExemptAmountTo",
              "field": "offroadExemptAmount",
              "op": "to",
              "type": "amount"
            },
            {
              "name": "departmentId",
              "field": "departmentId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "departmentIdIsNull",
              "field": "departmentId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "projectId",
              "field": "projectId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "projectIdIsNull",
              "field": "projectId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "taxCategoryId",
              "field": "taxCategoryId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "taxCategoryIdIsNull",
              "field": "taxCategoryId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "taxFreeCategoryId",
              "field": "taxFreeCategoryId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "taxFreeCategoryIdIsNull",
              "field": "taxFreeCategoryId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "createdAtFrom",
              "field": "createdAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "createdAtTo",
              "field": "createdAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "updatedAtFrom",
              "field": "updatedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "updatedAtTo",
              "field": "updatedAt",
              "op": "to",
              "type": "timestamp"
            }
          ],
          "extras": [
            "reportId",
            "reportAccountId"
          ]
        },
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Drives"
        ],
        "summary": "Create a drive on a report and price it",
        "operationId": "DrivesController_create",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`CreateDriveDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDriveDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "What a drive write answers (SPINE 26.1 rule 10, 26.2): the drive's one summary\n (travel-api's [`DriveSummary`]) beside its report's summary after the write, so a client\n refreshes the report's totals and amend state without a refetch.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DriveWritten"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/drives/{id}": {
      "get": {
        "tags": [
          "Drives"
        ],
        "summary": "One drive",
        "operationId": "DrivesController_findOne",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A drive at detail level, and (not slimmed) a list row: `GET /drives/{id}`, `GET\n /drives?reportId=`, and the report detail's `drives[]`.",
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DriveDetail"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Drives"
        ],
        "summary": "Soft-delete a drive",
        "operationId": "DrivesController_remove",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-Match",
            "required": false,
            "description": "The version the write was prepared against (`\"<version>\"`, from the row's `version` field; never a read's weak `ETag`): a change since then to a field this write touches answers 409 `edit_conflict`; a disjoint one merges.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-versioned": true,
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          },
          "409": {
            "description": "`edit_conflict`: a field this write changes changed since its `If-Match`; nothing was applied",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/EditConflictProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "patch": {
        "tags": [
          "Drives"
        ],
        "summary": "Edit a drive (re-pricing what changed) or move it to another report",
        "operationId": "DrivesController_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-Match",
            "required": false,
            "description": "The version the write was prepared against (`\"<version>\"`, from the row's `version` field; never a read's weak `ETag`): a change since then to a field this write touches answers 409 `edit_conflict`; a disjoint one merges.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "`UpdateDriveDto`: every field optional; `reportId` moves the drive.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDriveDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "What a drive write answers (SPINE 26.1 rule 10, 26.2): the drive's one summary\n (travel-api's [`DriveSummary`]) beside its report's summary after the write, so a client\n refreshes the report's totals and amend state without a refetch.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DriveWritten"
                }
              }
            }
          },
          "409": {
            "description": "`edit_conflict`: a field this write changes changed since its `If-Match`; nothing was applied",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/EditConflictProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true,
        "x-versioned": true
      }
    },
    "/drives/{id}/detach": {
      "post": {
        "tags": [
          "Drives"
        ],
        "summary": "Move a drive to a fresh implicit wrapper of its own",
        "operationId": "DrivesController_detach",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`DrivesController_detach` (Q6): the drive moves to a fresh implicit wrapper on its\n report's account (the report's base currency, the drive's department, project and\n description), unless it already sits alone in an implicit, travel-less wrapper: then\n the drive answers unchanged, with no write and no fact. Layer 2 decides the write on\n the drive's report (`lines`); the wrapper takes the source's status set and no amend.\n Nothing is re-priced (Nest decides the re-rate before the wrapper exists, from an\n empty body), so the move needs no provider: a plain command. Any body is ignored.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DetachDrive"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "What a drive write answers (SPINE 26.1 rule 10, 26.2): the drive's one summary\n (travel-api's [`DriveSummary`]) beside its report's summary after the write, so a client\n refreshes the report's totals and amend state without a refetch.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DriveWritten"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{id}/travel-request": {
      "get": {
        "tags": [
          "Travel requests"
        ],
        "summary": "A reisesøknad report's travel request",
        "operationId": "TravelRequestController_findOne",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A report's travel request (reisesøknad): a singleton the report owns (SPINE 26.1 rule 1),\n what `GET /reports/{id}/travel-request` answers and `include=travelRequest` side-loads\n (its PATCH answers travel's `TravelRequestWritten`). The flat place mirrors\n (`fromLocationName`, `fromLat`, …) and the PDF's storage key are not served (26.5); the\n amounts are minor units of `currency`. Built by travel (`requests`) and nowhere else.",
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRequest"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "patch": {
        "tags": [
          "Travel requests"
        ],
        "summary": "Edit a reisesøknad report's travel request",
        "operationId": "TravelRequestController_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-Match",
            "required": false,
            "description": "The version the write was prepared against (`\"<version>\"`, from the row's `version` field; never a read's weak `ETag`): a change since then to a field this write touches answers 409 `edit_conflict`; a disjoint one merges.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "`UpdateTravelRequestDto`: omit a field to keep it, `null` clears a nullable one.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTravelRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`PATCH /reports/{id}/travel-request`'s answer: the request, and whether the write merged\n over changes made since its `If-Match` version (SPINE 26.10 item 3). A read answers\n [`TravelRequest`], which never carries `merged`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRequestWritten"
                }
              }
            }
          },
          "409": {
            "description": "`edit_conflict`: a field this write changes changed since its `If-Match`; nothing was applied",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/EditConflictProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true,
        "x-versioned": true
      }
    },
    "/reports/{id}/travel-request/pdf": {
      "get": {
        "tags": [
          "Travel requests"
        ],
        "summary": "A signed link to the rendered reisesøknad PDF",
        "operationId": "TravelRequestController_getPdf",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "The rendered reisesøknad.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TravelRequestPdf"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{id}/travel-request/pdf/regenerate": {
      "post": {
        "tags": [
          "Travel requests"
        ],
        "summary": "Render the reisesøknad PDF again",
        "operationId": "TravelRequestController_regeneratePdf",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`TravelRequestController_regeneratePdf` (no body).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegeneratePdf"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "202": {
            "description": "Accepted: the operation that runs the work (read it at Location)",
            "headers": {
              "Location": {
                "description": "`/operations/{id}`",
                "style": "simple",
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/geo/places/suggest": {
      "post": {
        "tags": [
          "Geo"
        ],
        "summary": "Autocomplete a place query. Proxied server-side; no session token or user identifier reaches the provider.",
        "operationId": "PlacesProxyController_suggest",
        "requestBody": {
          "description": "`SuggestPlacesDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SuggestPlacesDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PlaceSuggestionDto"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/geo/places/details": {
      "post": {
        "tags": [
          "Geo"
        ],
        "summary": "Resolve a suggestion to a full place. Proxied server-side; no session token or user identifier reaches the provider.",
        "operationId": "PlacesProxyController_details",
        "requestBody": {
          "description": "`PlaceDetailsDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlaceDetailsDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`PlaceCandidateDto`: a resolved place in the shape a client sends straight back as a\n nested place on a drive stop or a travel endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlaceCandidateDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/geo/places/reverse": {
      "post": {
        "tags": [
          "Geo"
        ],
        "summary": "Resolve a dropped pin to a place; the answer keeps the caller's own coordinates.",
        "operationId": "PlacesProxyController_reverse",
        "requestBody": {
          "description": "`ReversePlaceDto`: a dropped pin (in the body, never a URL).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReversePlaceDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`PlaceCandidateDto`: a resolved place in the shape a client sends straight back as a\n nested place on a drive stop or a travel endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlaceCandidateDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/per-diems": {
      "get": {
        "tags": [
          "PerDiems"
        ],
        "summary": "A report's per-diem rows",
        "operationId": "PerDiemsController_findAll",
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "`organizationId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "dateFrom",
            "description": "`date` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "dateTo",
            "description": "`date` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "dateIsNull",
            "description": "`date` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "isHalfDay",
            "description": "`isHalfDay` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "dognIndexFrom",
            "description": "`dognIndex` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "dognIndexTo",
            "description": "`dognIndex` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "dognIndexIsNull",
            "description": "`dognIndex` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "periodStartFrom",
            "description": "`periodStart` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "periodStartTo",
            "description": "`periodStart` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "periodStartIsNull",
            "description": "`periodStart` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "periodEndFrom",
            "description": "`periodEnd` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "periodEndTo",
            "description": "`periodEnd` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "periodEndIsNull",
            "description": "`periodEnd` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "isFullDogn",
            "description": "`isFullDogn` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "isFullDognIsNull",
            "description": "`isFullDogn` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "stayBreakfast",
            "description": "`stayBreakfast` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "status",
            "description": "`status` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "COMPENSATED",
                  "EXCLUDED",
                  "MISSING_ACCOMMODATION",
                  "PRICING_UNAVAILABLE"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "country",
            "description": "`country` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "countryContains",
            "description": "`country` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "countryIsNull",
            "description": "`country` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "countrySource",
            "description": "`countrySource` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "STAY",
                  "DESTINATION_PROXY",
                  "DAY_TRIP"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "countrySourceIsNull",
            "description": "`countrySource` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "breakfast",
            "description": "`breakfast` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "lunch",
            "description": "`lunch` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "dinner",
            "description": "`dinner` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "fullFareAmountFrom",
            "description": "`fullFareAmount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "fullFareAmountTo",
            "description": "`fullFareAmount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "fullFareAmountIsNull",
            "description": "`fullFareAmount` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "fullFareExemptAmountFrom",
            "description": "`fullFareExemptAmount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "fullFareExemptAmountTo",
            "description": "`fullFareExemptAmount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "fullFareExemptAmountIsNull",
            "description": "`fullFareExemptAmount` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "taxAmountFrom",
            "description": "`taxAmount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "taxAmountTo",
            "description": "`taxAmount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "taxAmountIsNull",
            "description": "`taxAmount` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "exemptAmountFrom",
            "description": "`exemptAmount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "exemptAmountTo",
            "description": "`exemptAmount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "exemptAmountIsNull",
            "description": "`exemptAmount` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "amountFrom",
            "description": "`amount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "amountTo",
            "description": "`amount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "amountIsNull",
            "description": "`amount` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "compensationAmountFrom",
            "description": "`compensationAmount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "compensationAmountTo",
            "description": "`compensationAmount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "compensationAmountIsNull",
            "description": "`compensationAmount` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "nightSupplementAmountFrom",
            "description": "`nightSupplementAmount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "nightSupplementAmountTo",
            "description": "`nightSupplementAmount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "nightSupplementAmountIsNull",
            "description": "`nightSupplementAmount` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "nightSupplementExemptAmountFrom",
            "description": "`nightSupplementExemptAmount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "nightSupplementExemptAmountTo",
            "description": "`nightSupplementExemptAmount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "nightSupplementExemptAmountIsNull",
            "description": "`nightSupplementExemptAmount` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "nightSupplementNightsFrom",
            "description": "`nightSupplementNights` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "nightSupplementNightsTo",
            "description": "`nightSupplementNights` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "nightSupplementNightsIsNull",
            "description": "`nightSupplementNights` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "exemptCriteria",
            "description": "`exemptCriteria` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "PER_DIEM_TAX_ABROAD_COMPENSATION",
                  "PER_DIEM_TAX_FROM_6_TO_12_HOURS",
                  "PER_DIEM_TAX_OVER_12_HOURS_WITHOUT_ACCOMMODATION",
                  "PER_DIEM_TAX_OVER_12_HOURS_WITH_ACCOMMODATION",
                  "DRIVE_TAX_MILEAGE",
                  "DRIVE_TAX_MILEAGE_WITH_PASSENGER",
                  "DRIVE_TAX_MILEAGE_WITH_TRAILER",
                  "DRIVE_TAX_MILEAGE_OFFROAD",
                  "PER_DIEM_TAXFREE_FROM_6_TO_12_HOURS",
                  "PER_DIEM_TAXFREE_OVER_12_HOURS_WITHOUT_ACCOMMODATION",
                  "PER_DIEM_TAXFREE_OVERNIGHT_WITH_HOTEL",
                  "PER_DIEM_TAXFREE_OVERNIGHT_WITH_COOKING",
                  "PER_DIEM_TAXFREE_OVERNIGHT_WITHOUT_COOKING",
                  "PER_DIEM_TAXFREE_OVERNIGHT_TRUCKER",
                  "PER_DIEM_TAXFREE_NIGHT_DOMESTIC",
                  "DRIVE_TAXFREE_MILEAGE",
                  "DRIVE_TAXFREE_MILEAGE_WITH_PASSENGER",
                  "DRIVE_TAXFREE_MILEAGE_WITH_TRAILER",
                  "DRIVE_TAXFREE_MILEAGE_OFFROAD"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "exemptCriteriaIsNull",
            "description": "`exemptCriteria` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "taxCategoryId",
            "description": "`taxCategoryId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "taxCategoryIdIsNull",
            "description": "`taxCategoryId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "taxFreeCategoryId",
            "description": "`taxFreeCategoryId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "taxFreeCategoryIdIsNull",
            "description": "`taxFreeCategoryId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "rateId",
            "description": "`rateId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "rateIdIsNull",
            "description": "`rateId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "travelAccommodationId",
            "description": "`travelAccommodationId` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "travelAccommodationIdContains",
            "description": "`travelAccommodationId` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "travelAccommodationIdIsNull",
            "description": "`travelAccommodationId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtFrom",
            "description": "`createdAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtTo",
            "description": "`createdAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtFrom",
            "description": "`updatedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtTo",
            "description": "`updatedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "deletedAtFrom",
            "description": "`deletedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "deletedAtTo",
            "description": "`deletedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "deletedAtIsNull",
            "description": "`deletedAt` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "dogn",
                "date"
              ],
              "default": "dogn"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000,
              "default": 100
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "reportId",
            "description": "The report whose live per diems are listed (required)",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "include",
            "description": "Side-load related resources into `included` (SPINE 26.12.2): repeat for several; a dotted path follows a relation of the resource before it (at most 3 segments, 8 paths counting the prefixes they load). A list includes to-one relations only.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "category",
                  "taxFreeCategory",
                  "project"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "The envelope of a list whose item declares relations (SPINE 26.12.2): [`ListPage`]'s\n members and the side-loads, `{ items, hasMore, nextCursor?, total?, included? }`. Its\n schema keeps `ListPage`'s name: a route answers one or the other for an item, never\n both.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_PerDiemDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-relations": [
          {
            "name": "category",
            "kind": "toOne",
            "via": "taxCategoryId",
            "target": "category"
          },
          {
            "name": "taxFreeCategory",
            "kind": "toOne",
            "via": "taxFreeCategoryId",
            "target": "category"
          },
          {
            "name": "project",
            "kind": "toOne",
            "via": "projectId",
            "target": "project"
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "organizationId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "date",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "isHalfDay",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "dognIndex",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "periodStart",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "periodEnd",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "isFullDogn",
            "type": "bool",
            "ops": [
              "=",
              "!=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "stayBreakfast",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "status",
            "type": "enum",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [
              "COMPENSATED",
              "EXCLUDED",
              "MISSING_ACCOMMODATION",
              "PRICING_UNAVAILABLE"
            ],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "country",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "countrySource",
            "type": "enum",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [
              "STAY",
              "DESTINATION_PROXY",
              "DAY_TRIP"
            ],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "breakfast",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "lunch",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "dinner",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "fullFareAmount",
            "type": "amount",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "fullFareExemptAmount",
            "type": "amount",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "taxAmount",
            "type": "amount",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "exemptAmount",
            "type": "amount",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "amount",
            "type": "amount",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "compensationAmount",
            "type": "amount",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "nightSupplementAmount",
            "type": "amount",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "nightSupplementExemptAmount",
            "type": "amount",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "nightSupplementNights",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "exemptCriteria",
            "type": "enum",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [
              "PER_DIEM_TAX_ABROAD_COMPENSATION",
              "PER_DIEM_TAX_FROM_6_TO_12_HOURS",
              "PER_DIEM_TAX_OVER_12_HOURS_WITHOUT_ACCOMMODATION",
              "PER_DIEM_TAX_OVER_12_HOURS_WITH_ACCOMMODATION",
              "DRIVE_TAX_MILEAGE",
              "DRIVE_TAX_MILEAGE_WITH_PASSENGER",
              "DRIVE_TAX_MILEAGE_WITH_TRAILER",
              "DRIVE_TAX_MILEAGE_OFFROAD",
              "PER_DIEM_TAXFREE_FROM_6_TO_12_HOURS",
              "PER_DIEM_TAXFREE_OVER_12_HOURS_WITHOUT_ACCOMMODATION",
              "PER_DIEM_TAXFREE_OVERNIGHT_WITH_HOTEL",
              "PER_DIEM_TAXFREE_OVERNIGHT_WITH_COOKING",
              "PER_DIEM_TAXFREE_OVERNIGHT_WITHOUT_COOKING",
              "PER_DIEM_TAXFREE_OVERNIGHT_TRUCKER",
              "PER_DIEM_TAXFREE_NIGHT_DOMESTIC",
              "DRIVE_TAXFREE_MILEAGE",
              "DRIVE_TAXFREE_MILEAGE_WITH_PASSENGER",
              "DRIVE_TAXFREE_MILEAGE_WITH_TRAILER",
              "DRIVE_TAXFREE_MILEAGE_OFFROAD"
            ],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "taxCategoryId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "taxFreeCategoryId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "rateId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "travelAccommodationId",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "updatedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "deletedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "PerDiem",
          "maxLimit": 1000,
          "defaultLimit": 100,
          "defaultSort": "dogn",
          "sorts": [
            {
              "name": "dogn",
              "keys": [
                {
                  "field": "dognIndex",
                  "column": "dognIndex",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "date",
              "keys": [
                {
                  "field": "date",
                  "column": "date",
                  "direction": "asc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "organizationId",
              "field": "organizationId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "dateFrom",
              "field": "date",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "dateTo",
              "field": "date",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "dateIsNull",
              "field": "date",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "isHalfDay",
              "field": "isHalfDay",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "dognIndexFrom",
              "field": "dognIndex",
              "op": "from",
              "type": "int"
            },
            {
              "name": "dognIndexTo",
              "field": "dognIndex",
              "op": "to",
              "type": "int"
            },
            {
              "name": "dognIndexIsNull",
              "field": "dognIndex",
              "op": "isNull",
              "type": "int"
            },
            {
              "name": "periodStartFrom",
              "field": "periodStart",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "periodStartTo",
              "field": "periodStart",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "periodStartIsNull",
              "field": "periodStart",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "periodEndFrom",
              "field": "periodEnd",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "periodEndTo",
              "field": "periodEnd",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "periodEndIsNull",
              "field": "periodEnd",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "isFullDogn",
              "field": "isFullDogn",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "isFullDognIsNull",
              "field": "isFullDogn",
              "op": "isNull",
              "type": "bool"
            },
            {
              "name": "stayBreakfast",
              "field": "stayBreakfast",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "status",
              "field": "status",
              "op": "eq",
              "type": "enum"
            },
            {
              "name": "country",
              "field": "country",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "countryContains",
              "field": "country",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "countryIsNull",
              "field": "country",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "countrySource",
              "field": "countrySource",
              "op": "eq",
              "type": "enum"
            },
            {
              "name": "countrySourceIsNull",
              "field": "countrySource",
              "op": "isNull",
              "type": "enum"
            },
            {
              "name": "breakfast",
              "field": "breakfast",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "lunch",
              "field": "lunch",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "dinner",
              "field": "dinner",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "fullFareAmountFrom",
              "field": "fullFareAmount",
              "op": "from",
              "type": "amount"
            },
            {
              "name": "fullFareAmountTo",
              "field": "fullFareAmount",
              "op": "to",
              "type": "amount"
            },
            {
              "name": "fullFareAmountIsNull",
              "field": "fullFareAmount",
              "op": "isNull",
              "type": "amount"
            },
            {
              "name": "fullFareExemptAmountFrom",
              "field": "fullFareExemptAmount",
              "op": "from",
              "type": "amount"
            },
            {
              "name": "fullFareExemptAmountTo",
              "field": "fullFareExemptAmount",
              "op": "to",
              "type": "amount"
            },
            {
              "name": "fullFareExemptAmountIsNull",
              "field": "fullFareExemptAmount",
              "op": "isNull",
              "type": "amount"
            },
            {
              "name": "taxAmountFrom",
              "field": "taxAmount",
              "op": "from",
              "type": "amount"
            },
            {
              "name": "taxAmountTo",
              "field": "taxAmount",
              "op": "to",
              "type": "amount"
            },
            {
              "name": "taxAmountIsNull",
              "field": "taxAmount",
              "op": "isNull",
              "type": "amount"
            },
            {
              "name": "exemptAmountFrom",
              "field": "exemptAmount",
              "op": "from",
              "type": "amount"
            },
            {
              "name": "exemptAmountTo",
              "field": "exemptAmount",
              "op": "to",
              "type": "amount"
            },
            {
              "name": "exemptAmountIsNull",
              "field": "exemptAmount",
              "op": "isNull",
              "type": "amount"
            },
            {
              "name": "amountFrom",
              "field": "amount",
              "op": "from",
              "type": "amount"
            },
            {
              "name": "amountTo",
              "field": "amount",
              "op": "to",
              "type": "amount"
            },
            {
              "name": "amountIsNull",
              "field": "amount",
              "op": "isNull",
              "type": "amount"
            },
            {
              "name": "compensationAmountFrom",
              "field": "compensationAmount",
              "op": "from",
              "type": "amount"
            },
            {
              "name": "compensationAmountTo",
              "field": "compensationAmount",
              "op": "to",
              "type": "amount"
            },
            {
              "name": "compensationAmountIsNull",
              "field": "compensationAmount",
              "op": "isNull",
              "type": "amount"
            },
            {
              "name": "nightSupplementAmountFrom",
              "field": "nightSupplementAmount",
              "op": "from",
              "type": "amount"
            },
            {
              "name": "nightSupplementAmountTo",
              "field": "nightSupplementAmount",
              "op": "to",
              "type": "amount"
            },
            {
              "name": "nightSupplementAmountIsNull",
              "field": "nightSupplementAmount",
              "op": "isNull",
              "type": "amount"
            },
            {
              "name": "nightSupplementExemptAmountFrom",
              "field": "nightSupplementExemptAmount",
              "op": "from",
              "type": "amount"
            },
            {
              "name": "nightSupplementExemptAmountTo",
              "field": "nightSupplementExemptAmount",
              "op": "to",
              "type": "amount"
            },
            {
              "name": "nightSupplementExemptAmountIsNull",
              "field": "nightSupplementExemptAmount",
              "op": "isNull",
              "type": "amount"
            },
            {
              "name": "nightSupplementNightsFrom",
              "field": "nightSupplementNights",
              "op": "from",
              "type": "int"
            },
            {
              "name": "nightSupplementNightsTo",
              "field": "nightSupplementNights",
              "op": "to",
              "type": "int"
            },
            {
              "name": "nightSupplementNightsIsNull",
              "field": "nightSupplementNights",
              "op": "isNull",
              "type": "int"
            },
            {
              "name": "exemptCriteria",
              "field": "exemptCriteria",
              "op": "eq",
              "type": "enum"
            },
            {
              "name": "exemptCriteriaIsNull",
              "field": "exemptCriteria",
              "op": "isNull",
              "type": "enum"
            },
            {
              "name": "taxCategoryId",
              "field": "taxCategoryId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "taxCategoryIdIsNull",
              "field": "taxCategoryId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "taxFreeCategoryId",
              "field": "taxFreeCategoryId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "taxFreeCategoryIdIsNull",
              "field": "taxFreeCategoryId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "rateId",
              "field": "rateId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "rateIdIsNull",
              "field": "rateId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "travelAccommodationId",
              "field": "travelAccommodationId",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "travelAccommodationIdContains",
              "field": "travelAccommodationId",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "travelAccommodationIdIsNull",
              "field": "travelAccommodationId",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "createdAtFrom",
              "field": "createdAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "createdAtTo",
              "field": "createdAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "updatedAtFrom",
              "field": "updatedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "updatedAtTo",
              "field": "updatedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "deletedAtFrom",
              "field": "deletedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "deletedAtTo",
              "field": "deletedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "deletedAtIsNull",
              "field": "deletedAt",
              "op": "isNull",
              "type": "timestamp"
            }
          ],
          "extras": [
            "reportId"
          ]
        },
        "x-public-api": true
      }
    },
    "/per-diems/{id}": {
      "get": {
        "tags": [
          "PerDiems"
        ],
        "summary": "One per-diem row",
        "operationId": "PerDiemsController_findOne",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A per diem at detail level, and (not slimmed) a list row: `GET /per-diems/{id}`, `GET\n /per-diems?reportId=`, and the report detail's `perDiems[]`.",
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PerDiemDetail"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "patch": {
        "tags": [
          "PerDiems"
        ],
        "summary": "Decide meals on a per-diem row's dates",
        "operationId": "PerDiemsController_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-Match",
            "required": false,
            "description": "The version the write was prepared against (`\"<version>\"`, from the row's `version` field; never a read's weak `ETag`): a change since then to a field this write touches answers 409 `edit_conflict`; a disjoint one merges.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "`SetPerDiemDto`: `meals`, or `mealDate` with the meal flags it decides.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetPerDiemDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "What a per-diem write answers (SPINE 26.1 rule 10, 26.2): the per diem's one summary\n (travel-api's [`PerDiemSummary`]) beside its report's summary after the write.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PerDiemWritten"
                }
              }
            }
          },
          "409": {
            "description": "`edit_conflict`: a field this write changes changed since its `If-Match`; nothing was applied",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/EditConflictProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true,
        "x-versioned": true
      }
    },
    "/rates": {
      "get": {
        "tags": [
          "Rates"
        ],
        "summary": "An organization's rates and the global ones",
        "operationId": "RatesController_findAll",
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "title",
            "description": "`title` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "titleContains",
            "description": "`title` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "titleIsNull",
            "description": "`title` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "criteria",
            "description": "`criteria` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "PER_DIEM_TAX_ABROAD_COMPENSATION",
                  "PER_DIEM_TAX_FROM_6_TO_12_HOURS",
                  "PER_DIEM_TAX_OVER_12_HOURS_WITHOUT_ACCOMMODATION",
                  "PER_DIEM_TAX_OVER_12_HOURS_WITH_ACCOMMODATION",
                  "DRIVE_TAX_MILEAGE",
                  "DRIVE_TAX_MILEAGE_WITH_PASSENGER",
                  "DRIVE_TAX_MILEAGE_WITH_TRAILER",
                  "DRIVE_TAX_MILEAGE_OFFROAD",
                  "PER_DIEM_TAXFREE_FROM_6_TO_12_HOURS",
                  "PER_DIEM_TAXFREE_OVER_12_HOURS_WITHOUT_ACCOMMODATION",
                  "PER_DIEM_TAXFREE_OVERNIGHT_WITH_HOTEL",
                  "PER_DIEM_TAXFREE_OVERNIGHT_WITH_COOKING",
                  "PER_DIEM_TAXFREE_OVERNIGHT_WITHOUT_COOKING",
                  "PER_DIEM_TAXFREE_OVERNIGHT_TRUCKER",
                  "PER_DIEM_TAXFREE_NIGHT_DOMESTIC",
                  "DRIVE_TAXFREE_MILEAGE",
                  "DRIVE_TAXFREE_MILEAGE_WITH_PASSENGER",
                  "DRIVE_TAXFREE_MILEAGE_WITH_TRAILER",
                  "DRIVE_TAXFREE_MILEAGE_OFFROAD"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtFrom",
            "description": "`createdAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtTo",
            "description": "`createdAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtFrom",
            "description": "`updatedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtTo",
            "description": "`updatedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "created",
                "createdDesc",
                "updated",
                "updatedDesc",
                "title",
                "titleDesc",
                "criteria",
                "criteriaDesc"
              ],
              "default": "id"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000,
              "default": 1000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization whose rates are listed with the global ones (Read on it); without it, the global catalog (an operator: every organization's)",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_Rate"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "title",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "criteria",
            "type": "enum",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [
              "PER_DIEM_TAX_ABROAD_COMPENSATION",
              "PER_DIEM_TAX_FROM_6_TO_12_HOURS",
              "PER_DIEM_TAX_OVER_12_HOURS_WITHOUT_ACCOMMODATION",
              "PER_DIEM_TAX_OVER_12_HOURS_WITH_ACCOMMODATION",
              "DRIVE_TAX_MILEAGE",
              "DRIVE_TAX_MILEAGE_WITH_PASSENGER",
              "DRIVE_TAX_MILEAGE_WITH_TRAILER",
              "DRIVE_TAX_MILEAGE_OFFROAD",
              "PER_DIEM_TAXFREE_FROM_6_TO_12_HOURS",
              "PER_DIEM_TAXFREE_OVER_12_HOURS_WITHOUT_ACCOMMODATION",
              "PER_DIEM_TAXFREE_OVERNIGHT_WITH_HOTEL",
              "PER_DIEM_TAXFREE_OVERNIGHT_WITH_COOKING",
              "PER_DIEM_TAXFREE_OVERNIGHT_WITHOUT_COOKING",
              "PER_DIEM_TAXFREE_OVERNIGHT_TRUCKER",
              "PER_DIEM_TAXFREE_NIGHT_DOMESTIC",
              "DRIVE_TAXFREE_MILEAGE",
              "DRIVE_TAXFREE_MILEAGE_WITH_PASSENGER",
              "DRIVE_TAXFREE_MILEAGE_WITH_TRAILER",
              "DRIVE_TAXFREE_MILEAGE_OFFROAD"
            ],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "updatedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "Rate",
          "maxLimit": 1000,
          "defaultLimit": 1000,
          "defaultSort": "id",
          "sorts": [
            {
              "name": "id",
              "keys": [
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "created",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "createdDesc",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "updated",
              "keys": [
                {
                  "field": "updatedAt",
                  "column": "updatedAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "updatedDesc",
              "keys": [
                {
                  "field": "updatedAt",
                  "column": "updatedAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "title",
              "keys": [
                {
                  "field": "title",
                  "column": "title",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "titleDesc",
              "keys": [
                {
                  "field": "title",
                  "column": "title",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "criteria",
              "keys": [
                {
                  "field": "criteria",
                  "column": "criteria",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "criteriaDesc",
              "keys": [
                {
                  "field": "criteria",
                  "column": "criteria",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "title",
              "field": "title",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "titleContains",
              "field": "title",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "titleIsNull",
              "field": "title",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "criteria",
              "field": "criteria",
              "op": "eq",
              "type": "enum"
            },
            {
              "name": "createdAtFrom",
              "field": "createdAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "createdAtTo",
              "field": "createdAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "updatedAtFrom",
              "field": "updatedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "updatedAtTo",
              "field": "updatedAt",
              "op": "to",
              "type": "timestamp"
            }
          ],
          "extras": [
            "organizationId"
          ]
        },
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Rates"
        ],
        "summary": "Create an organization's rate",
        "operationId": "RatesController_create",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`CreateRateDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRateDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A rate with all its amounts (`Rate`, a value object: one plain shape, SPINE 26.1 rule 1),\n the shared default (no year) first, then year by year. Also a row of `GET /rates`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Rate"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/rates/{id}": {
      "get": {
        "tags": [
          "Rates"
        ],
        "summary": "Get a rate",
        "operationId": "RatesController_findOne",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A rate with all its amounts (`Rate`, a value object: one plain shape, SPINE 26.1 rule 1),\n the shared default (no year) first, then year by year. Also a row of `GET /rates`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Rate"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Rates"
        ],
        "summary": "Soft-delete a rate",
        "operationId": "RatesController_remove",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "x-public-api": true,
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Rates"
        ],
        "summary": "Edit a rate or one of its amounts",
        "operationId": "RatesController_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`UpdateRateDto`: `CreateRateDto` without `organizationId`, every field optional;\n `title: null` clears it.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRateDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A rate with all its amounts (`Rate`, a value object: one plain shape, SPINE 26.1 rule 1),\n the shared default (no year) first, then year by year. Also a row of `GET /rates`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Rate"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/per-diems/night-supplement/disclosure": {
      "get": {
        "tags": [
          "PerDiems"
        ],
        "summary": "The nattillegg questionnaire for a stay class, and the year's sats",
        "operationId": "NightSupplementDisclosureController_disclosure",
        "parameters": [
          {
            "in": "query",
            "name": "class",
            "description": "The supplement class (COOKING covers both cooking types)",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "COOKING",
                "TRANSPORT"
              ]
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "year",
            "description": "The year of the stay's nights (2000-2100): picks the sats",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "The questions a traveller answers to claim nattillegg on a stay, and what it pays\n (`NightSupplementDisclosureEntity`). The wording is the server's: a versioned legal\n text the claim names and stores answers against, not interface copy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NightSupplementDisclosureEntity"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/travels/place-vocabulary": {
      "get": {
        "tags": [
          "Travels"
        ],
        "summary": "The country codes a travel or stay may carry, with their legacy spellings",
        "operationId": "PlaceVocabularyController_getPlaceVocabulary",
        "responses": {
          "200": {
            "description": "`PlaceVocabularyDto`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlaceVocabularyDto"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true,
        "parameters": [
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/organizations/{id}/travel-request-template": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "The travel request template an organization renders with",
        "operationId": "OrganizationsController_getTravelRequestTemplate",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The travel-request template an organization renders with (a singleton: `GET` and\n `PUT /organizations/{id}/travel-request-template` answer it).",
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "templateId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "templateName": {
                      "type": "string"
                    },
                    "assignedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "templateId",
                    "templateName",
                    "assignedAt"
                  ]
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/organizations/{organizationId}/diet-schemes": {
      "get": {
        "tags": [
          "Diet schemes"
        ],
        "summary": "The diet schemes an organization owns, and the built-in ones",
        "operationId": "DietSchemesController_list",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "name",
            "description": "`name` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "nameContains",
            "description": "`name` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "description",
            "description": "`description` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "descriptionContains",
            "description": "`description` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "descriptionIsNull",
            "description": "`description` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "isBuiltIn",
            "description": "`isBuiltIn` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "ownerOrganizationId",
            "description": "`ownerOrganizationId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "ownerOrganizationIdIsNull",
            "description": "`ownerOrganizationId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "publishedAtFrom",
            "description": "`publishedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "publishedAtTo",
            "description": "`publishedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "publishedAtIsNull",
            "description": "`publishedAt` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "currentVersionId",
            "description": "`currentVersionId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "currentVersionIdIsNull",
            "description": "`currentVersionId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtFrom",
            "description": "`createdAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtTo",
            "description": "`createdAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtFrom",
            "description": "`updatedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtTo",
            "description": "`updatedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "owned",
                "name"
              ],
              "default": "owned"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 200,
              "default": 200
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_DietScheme"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "name",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "description",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "isBuiltIn",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "ownerOrganizationId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "publishedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "currentVersionId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "updatedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "DietScheme",
          "maxLimit": 200,
          "defaultLimit": 200,
          "defaultSort": "owned",
          "sorts": [
            {
              "name": "owned",
              "keys": [
                {
                  "field": "isBuiltIn",
                  "column": "isBuiltIn",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "updatedAt",
                  "column": "updatedAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "name",
              "keys": [
                {
                  "field": "name",
                  "column": "name",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "name",
              "field": "name",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "nameContains",
              "field": "name",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "description",
              "field": "description",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "descriptionContains",
              "field": "description",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "descriptionIsNull",
              "field": "description",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "isBuiltIn",
              "field": "isBuiltIn",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "ownerOrganizationId",
              "field": "ownerOrganizationId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "ownerOrganizationIdIsNull",
              "field": "ownerOrganizationId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "publishedAtFrom",
              "field": "publishedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "publishedAtTo",
              "field": "publishedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "publishedAtIsNull",
              "field": "publishedAt",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "currentVersionId",
              "field": "currentVersionId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "currentVersionIdIsNull",
              "field": "currentVersionId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "createdAtFrom",
              "field": "createdAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "createdAtTo",
              "field": "createdAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "updatedAtFrom",
              "field": "updatedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "updatedAtTo",
              "field": "updatedAt",
              "op": "to",
              "type": "timestamp"
            }
          ],
          "extras": []
        },
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Diet schemes"
        ],
        "summary": "Create a draft diet scheme",
        "operationId": "DietSchemesController_create",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`CreateDietSchemeDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDietSchemeDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A diet scheme (`DietScheme`, versioned configuration: one plain shape, SPINE 26.1\n rule 1): the row, its draft and published configs (the scheme's own documents). Also a\n row of `GET …/diet-schemes`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DietScheme"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/organizations/{organizationId}/diet-schemes/{schemeId}": {
      "get": {
        "tags": [
          "Diet schemes"
        ],
        "summary": "Get a diet scheme",
        "operationId": "DietSchemesController_get",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "schemeId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A diet scheme (`DietScheme`, versioned configuration: one plain shape, SPINE 26.1\n rule 1): the row, its draft and published configs (the scheme's own documents). Also a\n row of `GET …/diet-schemes`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DietScheme"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Diet schemes"
        ],
        "summary": "Delete a diet scheme",
        "operationId": "DietSchemesController_remove",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "schemeId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "x-public-api": true,
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Diet schemes"
        ],
        "summary": "Edit a diet scheme's draft",
        "operationId": "DietSchemesController_update",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "schemeId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`UpdateDietSchemeDto`: absent keeps a field; `description: null` clears it;\n `draftConfig: null` is validated like any config (and refused, as in Nest).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDietSchemeDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A diet scheme (`DietScheme`, versioned configuration: one plain shape, SPINE 26.1\n rule 1): the row, its draft and published configs (the scheme's own documents). Also a\n row of `GET …/diet-schemes`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DietScheme"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/organizations/{organizationId}/diet-schemes/{schemeId}/publish": {
      "post": {
        "tags": [
          "Diet schemes"
        ],
        "summary": "Freeze a diet scheme's draft as its next version",
        "operationId": "DietSchemesController_publish",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "schemeId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`PublishDietSchemeDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishDietSchemeDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A publish's answer: the scheme and the version it created (`DietSchemePublished`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DietSchemePublished"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/organizations/{organizationId}/diet-scheme-assignments": {
      "get": {
        "tags": [
          "Diet scheme assignments"
        ],
        "summary": "An organization's active diet scheme assignments",
        "operationId": "DietSchemeAssignmentsController_list",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "`organizationId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "dietSchemeId",
            "description": "`dietSchemeId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "priorityFrom",
            "description": "`priority` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "priorityTo",
            "description": "`priority` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "effectiveFromFrom",
            "description": "`effectiveFrom` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "effectiveFromTo",
            "description": "`effectiveFrom` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "effectiveFromIsNull",
            "description": "`effectiveFrom` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "effectiveToFrom",
            "description": "`effectiveTo` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "effectiveToTo",
            "description": "`effectiveTo` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "effectiveToIsNull",
            "description": "`effectiveTo` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtFrom",
            "description": "`createdAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtTo",
            "description": "`createdAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "resolver"
              ],
              "default": "resolver"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 200,
              "default": 200
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_DietSchemeAssignment"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": [
          {
            "name": "organizationId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "dietSchemeId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "priority",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "effectiveFrom",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "effectiveTo",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "DietSchemeAssignment",
          "maxLimit": 200,
          "defaultLimit": 200,
          "defaultSort": "resolver",
          "sorts": [
            {
              "name": "resolver",
              "keys": [
                {
                  "field": "priority",
                  "column": "priority",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "dietSchemeId",
                  "column": "dietSchemeId",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            }
          ],
          "params": [
            {
              "name": "organizationId",
              "field": "organizationId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "dietSchemeId",
              "field": "dietSchemeId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "priorityFrom",
              "field": "priority",
              "op": "from",
              "type": "int"
            },
            {
              "name": "priorityTo",
              "field": "priority",
              "op": "to",
              "type": "int"
            },
            {
              "name": "effectiveFromFrom",
              "field": "effectiveFrom",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "effectiveFromTo",
              "field": "effectiveFrom",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "effectiveFromIsNull",
              "field": "effectiveFrom",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "effectiveToFrom",
              "field": "effectiveTo",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "effectiveToTo",
              "field": "effectiveTo",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "effectiveToIsNull",
              "field": "effectiveTo",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "createdAtFrom",
              "field": "createdAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "createdAtTo",
              "field": "createdAt",
              "op": "to",
              "type": "timestamp"
            }
          ],
          "extras": []
        },
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Diet scheme assignments"
        ],
        "summary": "Assign (or restore) a diet scheme to an organization",
        "operationId": "DietSchemeAssignmentsController_assign",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`CreateDietSchemeAssignmentDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDietSchemeAssignmentDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A diet scheme assigned to an organization (`DietSchemeAssignment`, a value object keyed\n by the organization and the scheme: one plain shape, SPINE 26.1 rule 1). Also a row of\n `GET …/diet-scheme-assignments`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DietSchemeAssignment"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/organizations/{organizationId}/diet-scheme-assignments/{dietSchemeId}": {
      "get": {
        "tags": [
          "Diet scheme assignments"
        ],
        "summary": "Get a diet scheme assignment",
        "operationId": "DietSchemeAssignmentsController_get",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "dietSchemeId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A diet scheme assigned to an organization (`DietSchemeAssignment`, a value object keyed\n by the organization and the scheme: one plain shape, SPINE 26.1 rule 1). Also a row of\n `GET …/diet-scheme-assignments`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DietSchemeAssignment"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Diet scheme assignments"
        ],
        "summary": "Remove a diet scheme assignment",
        "operationId": "DietSchemeAssignmentsController_unassign",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "dietSchemeId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "x-public-api": true,
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Diet scheme assignments"
        ],
        "summary": "Edit a diet scheme assignment",
        "operationId": "DietSchemeAssignmentsController_patch",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "dietSchemeId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`PatchDietSchemeAssignmentDto`: every field optional; `null` clears `appliesWhen`\n and the bounds.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchDietSchemeAssignmentDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A diet scheme assigned to an organization (`DietSchemeAssignment`, a value object keyed\n by the organization and the scheme: one plain shape, SPINE 26.1 rule 1). Also a row of\n `GET …/diet-scheme-assignments`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DietSchemeAssignment"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/invoices": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "List report documents",
        "operationId": "InvoicesController_findAll",
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "status",
            "description": "`status` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "CREATING",
                  "COMPRESSING",
                  "CREATED",
                  "SENDING",
                  "SENT",
                  "DELIVERED",
                  "FAILED",
                  "VOID"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "deliveredAs",
            "description": "`deliveredAs` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "deliveredAsContains",
            "description": "`deliveredAs` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "deliveredAsIsNull",
            "description": "`deliveredAs` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "errorDescription",
            "description": "`errorDescription` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "errorDescriptionContains",
            "description": "`errorDescription` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "errorDescriptionIsNull",
            "description": "`errorDescription` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "ehfMessageNumberFrom",
            "description": "`ehfMessageNumber` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "ehfMessageNumberTo",
            "description": "`ehfMessageNumber` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "ehfMessageNumberIsNull",
            "description": "`ehfMessageNumber` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "emailDeliveredAtFrom",
            "description": "`emailDeliveredAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "emailDeliveredAtTo",
            "description": "`emailDeliveredAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "emailDeliveredAtIsNull",
            "description": "`emailDeliveredAt` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "ehfSentAtFrom",
            "description": "`ehfSentAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "ehfSentAtTo",
            "description": "`ehfSentAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "ehfSentAtIsNull",
            "description": "`ehfSentAt` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "deliveryRequestedAtFrom",
            "description": "`deliveryRequestedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "deliveryRequestedAtTo",
            "description": "`deliveryRequestedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "deliveryRequestedAtIsNull",
            "description": "`deliveryRequestedAt` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "destinationsResolvedAtFrom",
            "description": "`destinationsResolvedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "destinationsResolvedAtTo",
            "description": "`destinationsResolvedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "destinationsResolvedAtIsNull",
            "description": "`destinationsResolvedAt` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "pdfAttemptFrom",
            "description": "`pdfAttempt` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "pdfAttemptTo",
            "description": "`pdfAttempt` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "invoiceNumberFrom",
            "description": "`invoiceNumber` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "invoiceNumberTo",
            "description": "`invoiceNumber` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "dueDateFrom",
            "description": "`dueDate` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "dueDateTo",
            "description": "`dueDate` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtFrom",
            "description": "`createdAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtTo",
            "description": "`createdAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtFrom",
            "description": "`updatedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "updatedAtTo",
            "description": "`updatedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "reportId",
            "description": "`reportId` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "reportIdContains",
            "description": "`reportId` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "orgNumber",
            "description": "`orgNumber` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "orgNumberContains",
            "description": "`orgNumber` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "orgNumberIsNull",
            "description": "`orgNumber` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "accountId",
            "description": "`accountId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "deliveryOutstanding",
            "description": "`deliveryOutstanding` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "deliveryFailed",
            "description": "`deliveryFailed` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "created",
                "createdDesc",
                "updated",
                "updatedDesc"
              ],
              "default": "created"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 200,
              "default": 100
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization whose invoices are listed (Read on its invoices); without it, every tenant's (the platform only)",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_InvoiceListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "status",
            "type": "enum",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [
              "CREATING",
              "COMPRESSING",
              "CREATED",
              "SENDING",
              "SENT",
              "DELIVERED",
              "FAILED",
              "VOID"
            ],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "deliveredAs",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "errorDescription",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "ehfMessageNumber",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "emailDeliveredAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "ehfSentAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "deliveryRequestedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "destinationsResolvedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "pdfAttempt",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "invoiceNumber",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "dueDate",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "updatedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "reportId",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "orgNumber",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "accountId",
            "type": "id",
            "ops": [
              "=",
              ":*"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "deliveryOutstanding",
            "type": "bool",
            "ops": [
              "=",
              "!=",
              ":*"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "deliveryFailed",
            "type": "bool",
            "ops": [
              "=",
              "!=",
              ":*"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "Invoice",
          "maxLimit": 200,
          "defaultLimit": 100,
          "defaultSort": "created",
          "sorts": [
            {
              "name": "created",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "createdDesc",
              "keys": [
                {
                  "field": "createdAt",
                  "column": "createdAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            },
            {
              "name": "updated",
              "keys": [
                {
                  "field": "updatedAt",
                  "column": "updatedAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "updatedDesc",
              "keys": [
                {
                  "field": "updatedAt",
                  "column": "updatedAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "status",
              "field": "status",
              "op": "eq",
              "type": "enum"
            },
            {
              "name": "deliveredAs",
              "field": "deliveredAs",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "deliveredAsContains",
              "field": "deliveredAs",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "deliveredAsIsNull",
              "field": "deliveredAs",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "errorDescription",
              "field": "errorDescription",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "errorDescriptionContains",
              "field": "errorDescription",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "errorDescriptionIsNull",
              "field": "errorDescription",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "ehfMessageNumberFrom",
              "field": "ehfMessageNumber",
              "op": "from",
              "type": "int"
            },
            {
              "name": "ehfMessageNumberTo",
              "field": "ehfMessageNumber",
              "op": "to",
              "type": "int"
            },
            {
              "name": "ehfMessageNumberIsNull",
              "field": "ehfMessageNumber",
              "op": "isNull",
              "type": "int"
            },
            {
              "name": "emailDeliveredAtFrom",
              "field": "emailDeliveredAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "emailDeliveredAtTo",
              "field": "emailDeliveredAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "emailDeliveredAtIsNull",
              "field": "emailDeliveredAt",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "ehfSentAtFrom",
              "field": "ehfSentAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "ehfSentAtTo",
              "field": "ehfSentAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "ehfSentAtIsNull",
              "field": "ehfSentAt",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "deliveryRequestedAtFrom",
              "field": "deliveryRequestedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "deliveryRequestedAtTo",
              "field": "deliveryRequestedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "deliveryRequestedAtIsNull",
              "field": "deliveryRequestedAt",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "destinationsResolvedAtFrom",
              "field": "destinationsResolvedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "destinationsResolvedAtTo",
              "field": "destinationsResolvedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "destinationsResolvedAtIsNull",
              "field": "destinationsResolvedAt",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "pdfAttemptFrom",
              "field": "pdfAttempt",
              "op": "from",
              "type": "int"
            },
            {
              "name": "pdfAttemptTo",
              "field": "pdfAttempt",
              "op": "to",
              "type": "int"
            },
            {
              "name": "invoiceNumberFrom",
              "field": "invoiceNumber",
              "op": "from",
              "type": "int"
            },
            {
              "name": "invoiceNumberTo",
              "field": "invoiceNumber",
              "op": "to",
              "type": "int"
            },
            {
              "name": "dueDateFrom",
              "field": "dueDate",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "dueDateTo",
              "field": "dueDate",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "createdAtFrom",
              "field": "createdAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "createdAtTo",
              "field": "createdAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "updatedAtFrom",
              "field": "updatedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "updatedAtTo",
              "field": "updatedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "reportId",
              "field": "reportId",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "reportIdContains",
              "field": "reportId",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "orgNumber",
              "field": "orgNumber",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "orgNumberContains",
              "field": "orgNumber",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "orgNumberIsNull",
              "field": "orgNumber",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "accountId",
              "field": "accountId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "deliveryOutstanding",
              "field": "deliveryOutstanding",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "deliveryFailed",
              "field": "deliveryFailed",
              "op": "eq",
              "type": "bool"
            }
          ],
          "extras": [
            "organizationId"
          ]
        },
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Invoices"
        ],
        "summary": "Create an approved claim's document (its PDF follows)",
        "operationId": "InvoicesController_create",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`CreateInvoiceDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvoiceDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A report document (invoice) at summary level: its own scalars, never the storage keys.\n What a document write answers and what a report embeds. Built only by integrations'\n `invoices::read::invoice_summary`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/users/{id}/paymentcard/receipt-link": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Open X-Receipts' card form so the card's purchases land in the caller's inbox",
        "operationId": "XReceiptsCardLinkingController_startReceiptLink",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`StartCardLinkDto`: start X-Receipts card linking for one of the caller's cards, or a\n new one.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartCardLinkDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "`CardLinkSessionDto`: X-Receipts' hosted card form; open it within `expiresAt`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardLinkSessionDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/users/{id}/paymentcard/{paymentCardId}/receipt-link": {
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Turn automatic receipts off for one of the caller's cards: unenroll it at X-Receipts and stop filing its purchases",
        "operationId": "XReceiptsCardLinkingController_stopReceiptLink",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "paymentCardId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/invoices/{id}": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "Read a report document",
        "operationId": "InvoicesController_findOne",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A report document at detail level: the list row, its report's summary and signed\n links to the stored PDF and EHF (`null` when none is stored).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "patch": {
        "tags": [
          "Invoices"
        ],
        "summary": "Write a delivery outcome back to a report document",
        "operationId": "InvoicesController_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`UpdateInvoiceDto`. `errorDescription` is deliberately unbounded here: a provider's\n long failure text is cut at the write ([`bound_error_text`]), never refused.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateInvoiceDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A report document (invoice) at summary level: its own scalars, never the storage keys.\n What a document write answers and what a report embeds. Built only by integrations'\n `invoices::read::invoice_summary`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/organizations/{id}/ehfstatus": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Whether an organization receives EHF (its Peppol registration)",
        "operationId": "OrganizationsController_getEhfStatus",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/invoices/{id}/send": {
      "post": {
        "tags": [
          "Invoices"
        ],
        "summary": "Deprecated: use POST /reports/{reportId}/deliveries/{deliveryId}/redrive. Where the document has delivery rows for every channel named, this resends through that redrive.",
        "operationId": "InvoicesController_send",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`SendInvoiceDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendInvoiceDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "The answer: the integrations whose webhook was queued (not delivered).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendInvoiceResult"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/integrations/{integrationId}/supplier-reviews/check": {
      "post": {
        "tags": [
          "Supplier reviews"
        ],
        "summary": "Check a supplier link or publish a pre-write review (the integration's own service account)",
        "operationId": "SupplierReviewController_check",
        "parameters": [
          {
            "in": "path",
            "name": "integrationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SupplierReviewCheckDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupplierReviewDecision"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/integrations/{integrationId}/supplier-reviews": {
      "get": {
        "tags": [
          "Supplier reviews"
        ],
        "summary": "Supplier reviews for accounting administrators",
        "operationId": "SupplierReviewController_list",
        "parameters": [
          {
            "in": "path",
            "name": "integrationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SupplierReviewEntity"
                  }
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Supplier reviews"
        ],
        "summary": "Confirm an audited supplier link before resending",
        "operationId": "SupplierReviewController_resolve",
        "parameters": [
          {
            "in": "path",
            "name": "integrationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SupplierReviewResolveDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupplierReviewEntity"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/integrations/{integrationId}/delivery-settings": {
      "get": {
        "tags": [
          "Report delivery batches"
        ],
        "summary": "An integration’s delivery mode and schedule",
        "operationId": "IntegrationDeliverySettingsController_read",
        "parameters": [
          {
            "in": "path",
            "name": "integrationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`IntegrationDeliverySettingsEntity`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationDeliverySettings"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "put": {
        "tags": [
          "Report delivery batches"
        ],
        "summary": "Set an integration’s delivery mode",
        "operationId": "IntegrationDeliverySettingsController_update",
        "parameters": [
          {
            "in": "path",
            "name": "integrationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`UpdateIntegrationDeliverySettingsDto`: the whole setting.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateIntegrationDeliverySettingsDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`IntegrationDeliverySettingsEntity`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationDeliverySettings"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/integrations/{integrationId}/delivery-settings/reports": {
      "put": {
        "tags": [
          "Report delivery batches"
        ],
        "summary": "Switch an integration’s report delivery on or off",
        "operationId": "IntegrationDeliverySettingsController_setReports",
        "parameters": [
          {
            "in": "path",
            "name": "integrationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`SetReportDeliveryDto`: report delivery on or off for one integration (its mode stays\n as it is).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetReportDeliveryDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`IntegrationDeliverySettingsEntity`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationDeliverySettings"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/integrations/{integrationId}/delivery-settings/pause": {
      "post": {
        "tags": [
          "Report delivery batches"
        ],
        "summary": "Pause scheduled releases, or skip the next one",
        "operationId": "IntegrationDeliverySettingsController_pause",
        "parameters": [
          {
            "in": "path",
            "name": "integrationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`PauseDeliveryScheduleDto`: `until` (ahead) xor `skipNext: true`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PauseDeliveryScheduleDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`IntegrationDeliverySettingsEntity`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationDeliverySettings"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/integrations/{integrationId}/delivery-settings/resume": {
      "post": {
        "tags": [
          "Report delivery batches"
        ],
        "summary": "Take a pause of scheduled releases back",
        "operationId": "IntegrationDeliverySettingsController_resume",
        "parameters": [
          {
            "in": "path",
            "name": "integrationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The resume's empty body.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResumeSchedule"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`IntegrationDeliverySettingsEntity`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationDeliverySettings"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/integrations/{integrationId}/delivery-members": {
      "get": {
        "tags": [
          "Report delivery batches"
        ],
        "summary": "Who may release on an integration, and who gets its batch mail",
        "operationId": "IntegrationDeliverySettingsController_members",
        "parameters": [
          {
            "in": "path",
            "name": "integrationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`IntegrationDeliveryMembersEntity`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationDeliveryMembers"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "put": {
        "tags": [
          "Report delivery batches"
        ],
        "summary": "Replace an integration’s senders and mail recipients",
        "operationId": "IntegrationDeliverySettingsController_replaceMembers",
        "parameters": [
          {
            "in": "path",
            "name": "integrationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`ReplaceIntegrationDeliveryMembersDto`: the whole set.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplaceIntegrationDeliveryMembersDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`IntegrationDeliveryMembersEntity`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationDeliveryMembers"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/integrations/{integrationId}/report-delivery-batches": {
      "get": {
        "tags": [
          "Report delivery batches"
        ],
        "summary": "An integration’s batches, newest first",
        "operationId": "ReportDeliveryBatchController_list",
        "parameters": [
          {
            "in": "path",
            "name": "integrationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "`organizationId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "integrationId",
            "description": "`integrationId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "integrationIdIsNull",
            "description": "`integrationId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "providerId",
            "description": "`providerId` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "providerIdContains",
            "description": "`providerId` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "numberFrom",
            "description": "`number` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "numberTo",
            "description": "`number` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "trigger",
            "description": "`trigger` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "MANUAL",
                  "SCHEDULED"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "scheduledForFrom",
            "description": "`scheduledFor` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "scheduledForTo",
            "description": "`scheduledFor` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "scheduledForIsNull",
            "description": "`scheduledFor` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdById",
            "description": "`createdById` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdByIdIsNull",
            "description": "`createdById` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtFrom",
            "description": "`createdAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "createdAtTo",
            "description": "`createdAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "itemCountFrom",
            "description": "`itemCount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "itemCountTo",
            "description": "`itemCount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "totalAmountFrom",
            "description": "`totalAmount` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "totalAmountTo",
            "description": "`totalAmount` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "baseCurrency",
            "description": "`baseCurrency` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "baseCurrencyContains",
            "description": "`baseCurrency` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "baseCurrencyIsNull",
            "description": "`baseCurrency` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "abortedAtFrom",
            "description": "`abortedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "abortedAtTo",
            "description": "`abortedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "abortedAtIsNull",
            "description": "`abortedAt` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "newest"
              ],
              "default": "newest"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 50,
              "default": 20
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_ReportDeliveryBatchListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "organizationId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "integrationId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "providerId",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "number",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "trigger",
            "type": "enum",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [
              "MANUAL",
              "SCHEDULED"
            ],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "scheduledFor",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdById",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "createdAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "itemCount",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "totalAmount",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "baseCurrency",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "abortedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "ReportDeliveryBatch",
          "maxLimit": 50,
          "defaultLimit": 20,
          "defaultSort": "newest",
          "sorts": [
            {
              "name": "newest",
              "keys": [
                {
                  "field": "number",
                  "column": "number",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "organizationId",
              "field": "organizationId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "integrationId",
              "field": "integrationId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "integrationIdIsNull",
              "field": "integrationId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "providerId",
              "field": "providerId",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "providerIdContains",
              "field": "providerId",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "numberFrom",
              "field": "number",
              "op": "from",
              "type": "int"
            },
            {
              "name": "numberTo",
              "field": "number",
              "op": "to",
              "type": "int"
            },
            {
              "name": "trigger",
              "field": "trigger",
              "op": "eq",
              "type": "enum"
            },
            {
              "name": "scheduledForFrom",
              "field": "scheduledFor",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "scheduledForTo",
              "field": "scheduledFor",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "scheduledForIsNull",
              "field": "scheduledFor",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "createdById",
              "field": "createdById",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "createdByIdIsNull",
              "field": "createdById",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "createdAtFrom",
              "field": "createdAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "createdAtTo",
              "field": "createdAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "itemCountFrom",
              "field": "itemCount",
              "op": "from",
              "type": "int"
            },
            {
              "name": "itemCountTo",
              "field": "itemCount",
              "op": "to",
              "type": "int"
            },
            {
              "name": "totalAmountFrom",
              "field": "totalAmount",
              "op": "from",
              "type": "int"
            },
            {
              "name": "totalAmountTo",
              "field": "totalAmount",
              "op": "to",
              "type": "int"
            },
            {
              "name": "baseCurrency",
              "field": "baseCurrency",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "baseCurrencyContains",
              "field": "baseCurrency",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "baseCurrencyIsNull",
              "field": "baseCurrency",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "abortedAtFrom",
              "field": "abortedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "abortedAtTo",
              "field": "abortedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "abortedAtIsNull",
              "field": "abortedAt",
              "op": "isNull",
              "type": "timestamp"
            }
          ],
          "extras": []
        },
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Report delivery batches"
        ],
        "summary": "Release held deliveries as a batch",
        "operationId": "ReportDeliveryBatchController_release",
        "parameters": [
          {
            "in": "path",
            "name": "integrationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`CreateReportDeliveryBatchDto`: the deliveries ticked, or `all: true`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReportDeliveryBatchDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "`ReportDeliveryBatchReleaseEntity`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportDeliveryBatchRelease"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/report-delivery-batches/{id}": {
      "get": {
        "tags": [
          "Report delivery batches"
        ],
        "summary": "A batch and the deliveries under its claim",
        "operationId": "ReportDeliveryBatchController_findOne",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A delivery batch at detail level: the list row and its items.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportDeliveryBatchDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/report-delivery-batches/{id}/resend": {
      "post": {
        "tags": [
          "Report delivery batches"
        ],
        "summary": "Explicitly resend one batch delivery with acknowledgement when it may have landed",
        "operationId": "ReportDeliveryBatchController_resend",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "One explicit resend, under the batch sender's authority rather than report management.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResendBatchDeliveryDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "`ReportDeliveryRedriveResultEntity`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportDeliveryRedriveResult"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/report-delivery-batches/{id}/resend-failed": {
      "post": {
        "tags": [
          "Report delivery batches"
        ],
        "summary": "Send the batch’s failed deliveries again",
        "operationId": "ReportDeliveryBatchController_resendFailed",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The request's empty body.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResendFailed"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`ResendFailedResultEntity`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResendFailedResult"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/integrations/{integrationId}/held-deliveries": {
      "get": {
        "tags": [
          "Report delivery batches"
        ],
        "summary": "The deliveries waiting in an integration’s queue",
        "operationId": "ReportDeliveryBatchController_heldDeliveries",
        "parameters": [
          {
            "in": "path",
            "name": "integrationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "deliveryId",
            "description": "`deliveryId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "reportId",
            "description": "`reportId` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "reportIdContains",
            "description": "`reportId` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "requestedAtFrom",
            "description": "`requestedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "requestedAtTo",
            "description": "`requestedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "deferredAtFrom",
            "description": "`deferredAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "deferredAtTo",
            "description": "`deferredAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "deferredAtIsNull",
            "description": "`deferredAt` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "deferredById",
            "description": "`deferredById` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "deferredByIdIsNull",
            "description": "`deferredById` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "requested"
              ],
              "default": "requested"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 500,
              "default": 500
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_HeldDelivery"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": [
          {
            "name": "deliveryId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "reportId",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "requestedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "deferredAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "deferredById",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "HeldDelivery",
          "maxLimit": 500,
          "defaultLimit": 500,
          "defaultSort": "requested",
          "sorts": [
            {
              "name": "requested",
              "keys": [
                {
                  "field": "requestedAt",
                  "column": "requestedAt",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "deliveryId",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            }
          ],
          "params": [
            {
              "name": "deliveryId",
              "field": "deliveryId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "reportId",
              "field": "reportId",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "reportIdContains",
              "field": "reportId",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "requestedAtFrom",
              "field": "requestedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "requestedAtTo",
              "field": "requestedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "deferredAtFrom",
              "field": "deferredAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "deferredAtTo",
              "field": "deferredAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "deferredAtIsNull",
              "field": "deferredAt",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "deferredById",
              "field": "deferredById",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "deferredByIdIsNull",
              "field": "deferredById",
              "op": "isNull",
              "type": "id"
            }
          ],
          "extras": []
        },
        "x-public-api": true
      }
    },
    "/reports/{reportId}/deliveries": {
      "get": {
        "tags": [
          "Report deliveries"
        ],
        "summary": "A report's deliveries, each with its attempt timeline",
        "operationId": "ReportDeliveryController_list",
        "parameters": [
          {
            "in": "path",
            "name": "reportId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "id",
            "description": "`id` equals; repeat it for a batch get of several: at most 100 ids (send a longer set in requests of 100); an id the caller may not read is left out.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "invoiceId",
            "description": "`invoiceId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "invoiceIdIsNull",
            "description": "`invoiceId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "destinationKey",
            "description": "`destinationKey` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "destinationKeyContains",
            "description": "`destinationKey` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "integrationId",
            "description": "`integrationId` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "integrationIdIsNull",
            "description": "`integrationId` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "state",
            "description": "`state` equals; repeat the parameter for any of several values.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "PENDING",
                  "SENT",
                  "DELIVERED",
                  "FAILED",
                  "SKIPPED",
                  "VOID",
                  "HELD"
                ]
              }
            },
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "expectsConfirmation",
            "description": "`expectsConfirmation` equals.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "requestedAtFrom",
            "description": "`requestedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "requestedAtTo",
            "description": "`requestedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sentAtFrom",
            "description": "`sentAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sentAtTo",
            "description": "`sentAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sentAtIsNull",
            "description": "`sentAt` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "confirmedAtFrom",
            "description": "`confirmedAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "confirmedAtTo",
            "description": "`confirmedAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "confirmedAtIsNull",
            "description": "`confirmedAt` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "errorCode",
            "description": "`errorCode` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "errorCodeContains",
            "description": "`errorCode` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "errorCodeIsNull",
            "description": "`errorCode` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "errorDescription",
            "description": "`errorDescription` equals (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "errorDescriptionContains",
            "description": "`errorDescription` contains (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "errorDescriptionIsNull",
            "description": "`errorDescription` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "attemptsFrom",
            "description": "`attempts` from (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "attemptsTo",
            "description": "`attempts` to (inclusive).",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "lastAttemptAtFrom",
            "description": "`lastAttemptAt` from (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "lastAttemptAtTo",
            "description": "`lastAttemptAt` before (exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "lastAttemptAtIsNull",
            "description": "`lastAttemptAt` is (true) or is not (false) null.",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "A filter expression (SPINE 26.9: a subset of AIP-160 over this list's x-filter-fields), ANDed with the parameters above.",
            "schema": {
              "type": "string",
              "maxLength": 2000
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "The order.",
            "schema": {
              "type": "string",
              "enum": [
                "destination",
                "requested"
              ],
              "default": "destination"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (0 with count=true answers the count alone).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 200,
              "default": 200
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "count",
            "description": "Also count every match (total).",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_ReportDeliveryDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": [
          {
            "name": "id",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "invoiceId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "destinationKey",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "integrationId",
            "type": "id",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "state",
            "type": "enum",
            "ops": [
              "=",
              "!=",
              ":"
            ],
            "enum": [
              "PENDING",
              "SENT",
              "DELIVERED",
              "FAILED",
              "SKIPPED",
              "VOID",
              "HELD"
            ],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "expectsConfirmation",
            "type": "bool",
            "ops": [
              "=",
              "!="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "requestedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "sentAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "confirmedAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "errorCode",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "errorDescription",
            "type": "text",
            "ops": [
              "=",
              "!=",
              ":",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "attempts",
            "type": "int",
            "ops": [
              "=",
              "!=",
              "<",
              "<=",
              ">",
              ">="
            ],
            "enum": [],
            "nullable": false,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          },
          {
            "name": "lastAttemptAt",
            "type": "timestamp",
            "ops": [
              "<",
              "<=",
              ">",
              ">=",
              ":*"
            ],
            "enum": [],
            "nullable": true,
            "acceptsMe": false,
            "facet": false,
            "searchable": false
          }
        ],
        "x-list": {
          "name": "ReportDelivery",
          "maxLimit": 200,
          "defaultLimit": 200,
          "defaultSort": "destination",
          "sorts": [
            {
              "name": "destination",
              "keys": [
                {
                  "field": "destinationKey",
                  "column": "destinationKey",
                  "direction": "asc",
                  "nullsFirst": true
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "asc",
                  "nullsFirst": true
                }
              ]
            },
            {
              "name": "requested",
              "keys": [
                {
                  "field": "requestedAt",
                  "column": "requestedAt",
                  "direction": "desc",
                  "nullsFirst": false
                },
                {
                  "field": "id",
                  "column": "id",
                  "direction": "desc",
                  "nullsFirst": false
                }
              ]
            }
          ],
          "params": [
            {
              "name": "id",
              "field": "id",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "invoiceId",
              "field": "invoiceId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "invoiceIdIsNull",
              "field": "invoiceId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "destinationKey",
              "field": "destinationKey",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "destinationKeyContains",
              "field": "destinationKey",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "integrationId",
              "field": "integrationId",
              "op": "eq",
              "type": "id"
            },
            {
              "name": "integrationIdIsNull",
              "field": "integrationId",
              "op": "isNull",
              "type": "id"
            },
            {
              "name": "state",
              "field": "state",
              "op": "eq",
              "type": "enum"
            },
            {
              "name": "expectsConfirmation",
              "field": "expectsConfirmation",
              "op": "eq",
              "type": "bool"
            },
            {
              "name": "requestedAtFrom",
              "field": "requestedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "requestedAtTo",
              "field": "requestedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "sentAtFrom",
              "field": "sentAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "sentAtTo",
              "field": "sentAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "sentAtIsNull",
              "field": "sentAt",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "confirmedAtFrom",
              "field": "confirmedAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "confirmedAtTo",
              "field": "confirmedAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "confirmedAtIsNull",
              "field": "confirmedAt",
              "op": "isNull",
              "type": "timestamp"
            },
            {
              "name": "errorCode",
              "field": "errorCode",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "errorCodeContains",
              "field": "errorCode",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "errorCodeIsNull",
              "field": "errorCode",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "errorDescription",
              "field": "errorDescription",
              "op": "eq",
              "type": "text"
            },
            {
              "name": "errorDescriptionContains",
              "field": "errorDescription",
              "op": "contains",
              "type": "text"
            },
            {
              "name": "errorDescriptionIsNull",
              "field": "errorDescription",
              "op": "isNull",
              "type": "text"
            },
            {
              "name": "attemptsFrom",
              "field": "attempts",
              "op": "from",
              "type": "int"
            },
            {
              "name": "attemptsTo",
              "field": "attempts",
              "op": "to",
              "type": "int"
            },
            {
              "name": "lastAttemptAtFrom",
              "field": "lastAttemptAt",
              "op": "from",
              "type": "timestamp"
            },
            {
              "name": "lastAttemptAtTo",
              "field": "lastAttemptAt",
              "op": "to",
              "type": "timestamp"
            },
            {
              "name": "lastAttemptAtIsNull",
              "field": "lastAttemptAt",
              "op": "isNull",
              "type": "timestamp"
            }
          ],
          "extras": []
        },
        "x-public-api": true
      }
    },
    "/reports/{reportId}/payee": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "A delivered report's payee: names, bank account and address (the delivering integration's own service account)",
        "description": "Deprecated: read the payee from GET /reports/{id}?include=account&include=account.payout (the member's names on the account, the bank account and postal address on its payout). This route keeps working, with its checks, until the integrations have moved.",
        "operationId": "ReportPayeeController_find",
        "parameters": [
          {
            "in": "path",
            "name": "reportId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A report's payee as the integration delivering the report reads it\n (`GET /reports/{reportId}/payee`): who is paid and where to, the owner's names, bank\n account, phone and postal address. Nothing else of the user (no e-mail, birthdate or\n settings): a purpose read model (SPINE 26.1 rule 1), built only by identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportPayee"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "deprecated": true,
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/integrations/{integrationId}/feed/members": {
      "get": {
        "tags": [
          "Integrations"
        ],
        "summary": "A member by the provider's mapping (employee number or card), for the feed integration's own service account",
        "operationId": "IntegrationFeedController_findMember",
        "parameters": [
          {
            "in": "path",
            "name": "integrationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "employeeNumber",
            "description": "The member's employee number in the organization (the provider's user mapping)",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cardRef",
            "description": "The provider's reference for a card this integration registered (its card mapping)",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A member as the feed resolves them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedMemberRef"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/integrations/{integrationId}/feed/members/{accountId}/cards/{cardRef}": {
      "put": {
        "tags": [
          "Integrations"
        ],
        "summary": "Register a member's payment card for the provider (the feed integration's own service account)",
        "operationId": "IntegrationFeedController_registerCard",
        "parameters": [
          {
            "in": "path",
            "name": "integrationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "accountId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "cardRef",
            "description": "The provider's reference for the card (its card id, or a masked number).",
            "required": true,
            "schema": {
              "description": "The provider's reference for the card (its card id, or a masked number).",
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The body of `PUT …/cards/{cardRef}`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterFeedCardDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "A card the feed registered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedCard"
                }
              }
            }
          },
          "200": {
            "description": "A card the feed registered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedCard"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Integrations"
        ],
        "summary": "Remove a member's payment card the feed integration registered",
        "operationId": "IntegrationFeedController_removeCard",
        "parameters": [
          {
            "in": "path",
            "name": "integrationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "accountId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "cardRef",
            "description": "The provider's reference for the card (its card id, or a masked number).",
            "required": true,
            "schema": {
              "description": "The provider's reference for the card (its card id, or a masked number).",
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/integrations/{integrationId}/feed/members/{accountId}/items": {
      "post": {
        "tags": [
          "Integrations"
        ],
        "summary": "Deliver a card transaction or receipt into a linked member's inbox, once per provider id",
        "operationId": "IntegrationFeedController_deliverItem",
        "parameters": [
          {
            "in": "path",
            "name": "integrationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "accountId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The body of `POST …/items`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeliverFeedItemDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "An item as the feed that delivered it sees it: the fields it wrote, never the\n member's expense link.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedItem"
                }
              }
            }
          },
          "200": {
            "description": "An item as the feed that delivered it sees it: the fields it wrote, never the\n member's expense link.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedItem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/integrations/{integrationId}/feed/members/{accountId}/items/{externalId}": {
      "patch": {
        "tags": [
          "Integrations"
        ],
        "summary": "Update an item the feed delivered (a clearing)",
        "operationId": "IntegrationFeedController_updateItem",
        "parameters": [
          {
            "in": "path",
            "name": "integrationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "accountId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "externalId",
            "description": "The provider's id for the transaction.",
            "required": true,
            "schema": {
              "description": "The provider's id for the transaction.",
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "An item's fields as a feed writes them (absent: left alone).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeedItemFieldsDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "An item as the feed that delivered it sees it: the fields it wrote, never the\n member's expense link.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedItem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/integrations/{integrationId}/feed/members/{accountId}/items/{externalId}/receipt": {
      "post": {
        "tags": [
          "Integrations"
        ],
        "summary": "Attach the provider's receipt file to an item the feed delivered",
        "operationId": "IntegrationFeedController_attachReceipt",
        "parameters": [
          {
            "in": "path",
            "name": "integrationId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "accountId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "externalId",
            "description": "The provider's id for the transaction.",
            "required": true,
            "schema": {
              "description": "The provider's id for the transaction.",
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "contentMediaType": "application/octet-stream"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "An item as the feed that delivered it sees it: the fields it wrote, never the\n member's expense link.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedItem"
                }
              }
            }
          },
          "200": {
            "description": "An item as the feed that delivered it sees it: the fields it wrote, never the\n member's expense link.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedItem"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{reportId}/deliveries/{deliveryId}/redrive": {
      "post": {
        "tags": [
          "Report deliveries"
        ],
        "summary": "Send a delivery again",
        "operationId": "ReportDeliveryController_redriveDelivery",
        "parameters": [
          {
            "in": "path",
            "name": "reportId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "deliveryId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`RedriveDeliveryDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RedriveDeliveryDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "`ReportDeliveryRedriveResultEntity`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportDeliveryRedriveResult"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{reportId}/deliveries/{deliveryId}/defer": {
      "post": {
        "tags": [
          "Report delivery batches"
        ],
        "summary": "Put a queued delivery off to a later batch",
        "operationId": "ReportDeliveryBatchController_defer",
        "parameters": [
          {
            "in": "path",
            "name": "reportId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "deliveryId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The defer / undefer body (none).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeferDelivery"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`HeldDeferralEntity`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HeldDeferral"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/reports/{reportId}/deliveries/{deliveryId}/undefer": {
      "post": {
        "tags": [
          "Report delivery batches"
        ],
        "summary": "Take a deferred delivery back into the queue",
        "operationId": "ReportDeliveryBatchController_undefer",
        "parameters": [
          {
            "in": "path",
            "name": "reportId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "deliveryId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "The defer / undefer body (none).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UndeferDelivery"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`HeldDeferralEntity`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HeldDeferral"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/search": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Search every organization the caller can read (quick mode grouped, full mode for one type)",
        "operationId": "SearchController_search",
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "description": "Free text and restrictions (the AIP-160 subset; whitespace ANDs them).",
            "schema": {
              "description": "Free text and restrictions (the AIP-160 subset; whitespace ANDs them).",
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "type",
            "description": "One hit type: full mode. Absent: quick mode (grouped).",
            "schema": {
              "description": "One hit type: full mode. Absent: quick mode (grouped).",
              "$ref": "#/components/schemas/SearchHitType"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "filter",
            "description": "Restrictions only (the AIP-160 subset).",
            "schema": {
              "description": "Restrictions only (the AIP-160 subset).",
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "facets",
            "description": "Full mode: comma-separated (or repeated) `status`, `category`, `department`,\n `project`, `month`, `organization`.",
            "schema": {
              "description": "Full mode: comma-separated (or repeated) `status`, `category`, `department`,\n `project`, `month`, `organization`.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "sort",
            "description": "Full mode: `relevance` (default), `newest`, `oldest`, `amountDesc`, `amountAsc`.",
            "schema": {
              "description": "Full mode: `relevance` (default), `newest`, `oldest`, `amountDesc`, `amountAsc`.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "Full mode: the previous page's `nextCursor`.",
            "schema": {
              "description": "Full mode: the previous page's `nextCursor`.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Quick mode: hits per type (1..25, default 10). Full mode: the page (1..100,\n default 20).",
            "schema": {
              "description": "Quick mode: hits per type (1..25, default 10). Full mode: the page (1..100,\n default 20).",
              "type": "integer",
              "format": "uint32",
              "minimum": 0
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "consistentAfter",
            "description": "A write's `Consistency-Token`: wait (bounded) until its index work landed.",
            "schema": {
              "description": "A write's `Consistency-Token`: wait (bounded) until its index work landed.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`GET /search`'s answer: quick mode's groups, or full mode's page.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-filter-fields": {
          "report": [
            {
              "name": "id",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "organizationId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            },
            {
              "name": "accountId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": true,
              "facet": false,
              "searchable": true
            },
            {
              "name": "departmentId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":",
                ":*"
              ],
              "enum": [],
              "nullable": true,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            },
            {
              "name": "projectId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":",
                ":*"
              ],
              "enum": [],
              "nullable": true,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            },
            {
              "name": "categoryId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            },
            {
              "name": "status",
              "type": "enum",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [
                "DRAFT",
                "PENDING",
                "APPROVED",
                "REJECTED",
                "BLOCKED"
              ],
              "nullable": false,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            },
            {
              "name": "kind",
              "type": "enum",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [
                "CLAIM",
                "REQUEST"
              ],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "presentation",
              "type": "enum",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [
                "SINGLE",
                "GROUP"
              ],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "amount",
              "type": "amount",
              "ops": [
                "=",
                "!=",
                "<",
                "<=",
                ">",
                ">="
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "currency",
              "type": "enum",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "date",
              "type": "timestamp",
              "ops": [
                "<",
                "<=",
                ">",
                ">="
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "month",
              "type": "text",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            },
            {
              "name": "hasReceipt",
              "type": "bool",
              "ops": [
                "=",
                "!="
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "missingDate",
              "type": "bool",
              "ops": [
                "=",
                "!="
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "reviewerAccountId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": true,
              "facet": false,
              "searchable": true
            },
            {
              "name": "invoiceStatus",
              "type": "enum",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [
                "CREATING",
                "COMPRESSING",
                "CREATED",
                "SENDING",
                "SENT",
                "DELIVERED",
                "FAILED",
                "VOID",
                "NONE"
              ],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            }
          ],
          "expense": [
            {
              "name": "id",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "organizationId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            },
            {
              "name": "accountId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": true,
              "facet": false,
              "searchable": true
            },
            {
              "name": "reportId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "departmentId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":",
                ":*"
              ],
              "enum": [],
              "nullable": true,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            },
            {
              "name": "projectId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":",
                ":*"
              ],
              "enum": [],
              "nullable": true,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            },
            {
              "name": "categoryId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":",
                ":*"
              ],
              "enum": [],
              "nullable": true,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            },
            {
              "name": "status",
              "type": "enum",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [
                "DRAFT",
                "PENDING",
                "APPROVED",
                "REJECTED",
                "BLOCKED"
              ],
              "nullable": false,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            },
            {
              "name": "amount",
              "type": "amount",
              "ops": [
                "=",
                "!=",
                "<",
                "<=",
                ">",
                ">="
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "currency",
              "type": "enum",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "vatAmount",
              "type": "amount",
              "ops": [
                "=",
                "!=",
                "<",
                "<=",
                ">",
                ">=",
                ":*"
              ],
              "enum": [],
              "nullable": true,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "date",
              "type": "date",
              "ops": [
                "=",
                "!=",
                "<",
                "<=",
                ">",
                ">=",
                ":*"
              ],
              "enum": [],
              "nullable": true,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "month",
              "type": "text",
              "ops": [
                "=",
                "!=",
                ":",
                ":*"
              ],
              "enum": [],
              "nullable": true,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            },
            {
              "name": "hasReceipt",
              "type": "bool",
              "ops": [
                "=",
                "!="
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "reviewerAccountId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": true,
              "facet": false,
              "searchable": true
            }
          ],
          "drive": [
            {
              "name": "id",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "organizationId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            },
            {
              "name": "accountId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": true,
              "facet": false,
              "searchable": true
            },
            {
              "name": "reportId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "departmentId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":",
                ":*"
              ],
              "enum": [],
              "nullable": true,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            },
            {
              "name": "projectId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":",
                ":*"
              ],
              "enum": [],
              "nullable": true,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            },
            {
              "name": "status",
              "type": "enum",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [
                "DRAFT",
                "PENDING",
                "APPROVED",
                "REJECTED",
                "BLOCKED"
              ],
              "nullable": false,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            },
            {
              "name": "amount",
              "type": "amount",
              "ops": [
                "=",
                "!=",
                "<",
                "<=",
                ">",
                ">="
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "currency",
              "type": "enum",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "distanceMeters",
              "type": "int",
              "ops": [
                "=",
                "!=",
                "<",
                "<=",
                ">",
                ">="
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "date",
              "type": "date",
              "ops": [
                "=",
                "!=",
                "<",
                "<=",
                ">",
                ">=",
                ":*"
              ],
              "enum": [],
              "nullable": true,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "month",
              "type": "text",
              "ops": [
                "=",
                "!=",
                ":",
                ":*"
              ],
              "enum": [],
              "nullable": true,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            },
            {
              "name": "reviewerAccountId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": true,
              "facet": false,
              "searchable": true
            }
          ],
          "perDiem": [
            {
              "name": "id",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "organizationId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            },
            {
              "name": "accountId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": true,
              "facet": false,
              "searchable": true
            },
            {
              "name": "reportId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "status",
              "type": "enum",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [
                "DRAFT",
                "PENDING",
                "APPROVED",
                "REJECTED",
                "BLOCKED"
              ],
              "nullable": false,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            },
            {
              "name": "amount",
              "type": "amount",
              "ops": [
                "=",
                "!=",
                "<",
                "<=",
                ">",
                ">="
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "currency",
              "type": "enum",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "date",
              "type": "date",
              "ops": [
                "=",
                "!=",
                "<",
                "<=",
                ">",
                ">=",
                ":*"
              ],
              "enum": [],
              "nullable": true,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "month",
              "type": "text",
              "ops": [
                "=",
                "!=",
                ":",
                ":*"
              ],
              "enum": [],
              "nullable": true,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            },
            {
              "name": "reviewerAccountId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": true,
              "facet": false,
              "searchable": true
            }
          ],
          "project": [
            {
              "name": "id",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "organizationId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            }
          ],
          "category": [
            {
              "name": "id",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "organizationId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            }
          ],
          "department": [
            {
              "name": "id",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "organizationId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            }
          ],
          "member": [
            {
              "name": "userId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": true,
              "facet": false,
              "searchable": true
            },
            {
              "name": "organizationId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            }
          ],
          "organization": [
            {
              "name": "organizationId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            }
          ],
          "wallet": [
            {
              "name": "id",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            },
            {
              "name": "organizationId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": false,
              "facet": true,
              "searchable": true
            },
            {
              "name": "accountId",
              "type": "id",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [],
              "nullable": false,
              "acceptsMe": true,
              "facet": false,
              "searchable": true
            },
            {
              "name": "status",
              "type": "enum",
              "ops": [
                "=",
                "!=",
                ":"
              ],
              "enum": [
                "ACTIVE",
                "CLOSED"
              ],
              "nullable": false,
              "acceptsMe": false,
              "facet": false,
              "searchable": true
            }
          ]
        },
        "x-public-api": true
      }
    },
    "/recommendations/inbox-items/{id}/trip-suggestions": {
      "get": {
        "tags": [
          "Recommendations"
        ],
        "summary": "Suggest which travel report an inbox receipt belongs to",
        "operationId": "RecommendationController_tripSuggestions",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "The organization the receipt is filed in",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_Suggestion"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/capture/attachments/expense": {
      "post": {
        "tags": [
          "Attachment Capture"
        ],
        "summary": "Scan a receipt (optional authentication)",
        "operationId": "AttachmentCaptureController_captureExpense",
        "requestBody": {
          "description": "`CaptureRequestDto` (Q14: no field is nullable; `null` is a 400).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaptureRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "What [`ExpenseScan`] documents.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseCaptureResponseDto"
                }
              }
            }
          }
        },
        "x-public-api": true
      }
    },
    "/capture/attachments/extract/expense-data": {
      "post": {
        "tags": [
          "Attachment Capture"
        ],
        "summary": "Scan a receipt (deprecated alias)",
        "operationId": "AttachmentCaptureController_extractExpenseDataDeprecated",
        "requestBody": {
          "description": "`CaptureRequestDto` (Q14: no field is nullable; `null` is a 400).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaptureRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "What [`ExpenseScan`] documents.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseCaptureResponseDto"
                }
              }
            }
          }
        },
        "deprecated": true,
        "x-public-api": true
      }
    },
    "/capture/attachments/accommodation": {
      "post": {
        "tags": [
          "Attachment Capture"
        ],
        "summary": "Scan an accommodation receipt",
        "operationId": "AttachmentCaptureController_captureAccommodation",
        "requestBody": {
          "description": "`CaptureRequestDto` (Q14: no field is nullable; `null` is a 400).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaptureRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccommodationCaptureResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/capture/attachments/extract/accommodation-data": {
      "post": {
        "tags": [
          "Attachment Capture"
        ],
        "summary": "Scan an accommodation receipt (deprecated alias)",
        "operationId": "AttachmentCaptureController_extractAccommodationDataDeprecated",
        "requestBody": {
          "description": "`CaptureRequestDto` (Q14: no field is nullable; `null` is a 400).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaptureRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccommodationCaptureResponseDto"
                }
              }
            }
          }
        },
        "deprecated": true,
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/capture/attachments/expense-description": {
      "post": {
        "tags": [
          "Attachment Capture"
        ],
        "summary": "Write an expense description from OCR text",
        "operationId": "AttachmentCaptureController_captureExpenseDescription",
        "requestBody": {
          "description": "`CaptureRequestDto` (Q14: no field is nullable; `null` is a 400).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaptureRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/capture/attachments/generate/expense-description": {
      "post": {
        "tags": [
          "Attachment Capture"
        ],
        "summary": "Write an expense description (deprecated alias)",
        "operationId": "AttachmentCaptureController_generateExpenseDescriptionDeprecated",
        "requestBody": {
          "description": "`CaptureRequestDto` (Q14: no field is nullable; `null` is a 400).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaptureRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "deprecated": true,
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/capture/attachments/ocr": {
      "post": {
        "tags": [
          "Attachment Capture"
        ],
        "summary": "OCR a stored receipt (optional authentication)",
        "operationId": "AttachmentCaptureController_ocr",
        "requestBody": {
          "description": "`CaptureOcrRequestDto` (Q13): an HTTPS URL into an S3 bucket.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaptureOcrRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-public-api": true
      }
    },
    "/capture/expense": {
      "post": {
        "tags": [
          "Capture"
        ],
        "summary": "Scan a receipt for a known expense (authenticated).",
        "operationId": "ExpenseCaptureController_captureExpense",
        "requestBody": {
          "description": "`ExpenseCaptureRequestDto` (`POST /capture/expense`).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExpenseCaptureRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "What [`ExpenseScan`] documents.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseCaptureResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/ai/extract/expense-data": {
      "post": {
        "tags": [
          "AI (Deprecated)"
        ],
        "summary": "Scan a receipt (deprecated)",
        "operationId": "LegacyAIController_extractExpenseData",
        "requestBody": {
          "description": "`CaptureRequestDto` (Q14: no field is nullable; `null` is a 400).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaptureRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "What [`ExpenseScan`] documents.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseCaptureResponseDto"
                }
              }
            }
          }
        },
        "deprecated": true,
        "x-public-api": true
      }
    },
    "/ai/extract/accommodation-data": {
      "post": {
        "tags": [
          "AI (Deprecated)"
        ],
        "summary": "Scan an accommodation receipt (deprecated)",
        "operationId": "LegacyAIController_extractAccommodationData",
        "requestBody": {
          "description": "`CaptureRequestDto` (Q14: no field is nullable; `null` is a 400).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaptureRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccommodationCaptureResponseDto"
                }
              }
            }
          }
        },
        "deprecated": true,
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/ai/generate/expense-description": {
      "post": {
        "tags": [
          "AI (Deprecated)"
        ],
        "summary": "Write an expense description (deprecated)",
        "operationId": "LegacyAIController_generateExpenseDescription",
        "requestBody": {
          "description": "`CaptureRequestDto` (Q14: no field is nullable; `null` is a 400).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaptureRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "deprecated": true,
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/ai/ocr": {
      "post": {
        "tags": [
          "AI (Deprecated)"
        ],
        "summary": "OCR a stored receipt (deprecated)",
        "operationId": "LegacyAIController_ocr",
        "requestBody": {
          "description": "`CaptureOcrRequestDto` (Q13): an HTTPS URL into an S3 bucket.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaptureOcrRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "deprecated": true,
        "x-public-api": true
      }
    },
    "/inbox": {
      "get": {
        "tags": [
          "Inbox"
        ],
        "summary": "Find an inbox",
        "operationId": "InboxController_findByQuery",
        "parameters": [
          {
            "in": "query",
            "name": "accountId",
            "description": "An account of the inbox",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "userId",
            "description": "The user of the inbox",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "inboxId",
            "description": "The inbox",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "email",
            "description": "The inbox address",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "An inbox (`GET /inbox/{id}`, `GET /inbox`; its own scalars).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboxDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Inbox"
        ],
        "summary": "Create an inbox",
        "operationId": "InboxController_create",
        "requestBody": {
          "description": "`CreateInboxDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInboxDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "An inbox's summary: what a create or an address change answers (SPINE 26.1 rule 10).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboxSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/inbox/availability": {
      "get": {
        "tags": [
          "Inbox"
        ],
        "summary": "Whether an inbox address is free",
        "operationId": "InboxController_getInboxAvailability",
        "parameters": [
          {
            "in": "query",
            "name": "email",
            "description": "The address to check (a domainless one gets the configured domain)",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`InboxAvailableResponse`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboxAvailableResponse"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/inbox/mine": {
      "get": {
        "tags": [
          "Inbox"
        ],
        "summary": "The caller's inboxes",
        "operationId": "InboxController_mine",
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`GET /inbox/mine` (a purpose read model): the caller's inboxes and whether it may\n create a personal one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MyInboxesResponse"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true,
        "parameters": [
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/inbox/{id}": {
      "get": {
        "tags": [
          "Inbox"
        ],
        "summary": "An inbox",
        "operationId": "InboxController_findOne",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "An inbox (`GET /inbox/{id}`, `GET /inbox`; its own scalars).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboxDetail"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "patch": {
        "tags": [
          "Inbox"
        ],
        "summary": "Change an inbox's address",
        "operationId": "InboxController_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`UpdateInboxDto`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateInboxDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "An inbox's summary: what a create or an address change answers (SPINE 26.1 rule 10).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboxSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/inbox/{inboxId}/items": {
      "get": {
        "tags": [
          "Inbox"
        ],
        "summary": "An inbox's items",
        "operationId": "InboxController_findItems",
        "parameters": [
          {
            "in": "path",
            "name": "inboxId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "from",
            "description": "Sender",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "currency",
            "description": "Currency",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "merchant",
            "description": "Merchant",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "description",
            "description": "Description",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "reservationId",
            "description": "Reservation",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "organizationId",
            "description": "Organization",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "amount",
            "description": "Amount (minor units)",
            "schema": {
              "type": "integer"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "date",
            "description": "Date",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "status",
            "description": "Item status",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "expenseId",
            "description": "The expense it was promoted to (`NULL`: unlinked items)",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "expenseIdIsNull",
            "description": "true: the items no expense holds yet; false: the linked ones",
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_InboxItemListItem"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "post": {
        "tags": [
          "Inbox"
        ],
        "summary": "Add an item (public)",
        "operationId": "InboxController_addItem",
        "parameters": [
          {
            "in": "path",
            "name": "inboxId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`AddInboxItemDto` (the body of `POST /inbox/:id/items`; `PATCH` takes the same\n fields).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddInboxItemDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "An inbox item's own scalars (what an item write answers, and what the expense it\n became embeds). `amount` is in minor units.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboxItemSummary"
                }
              }
            }
          }
        },
        "x-public-api": true
      }
    },
    "/inbox/{inboxId}/items/{inboxItemId}": {
      "post": {
        "tags": [
          "Inbox"
        ],
        "summary": "Add an attachment to an item (public)",
        "operationId": "InboxController_addInboxItemAttachment",
        "parameters": [
          {
            "in": "path",
            "name": "inboxId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "inboxItemId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "contentMediaType": "application/octet-stream"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "`InboxItemAttachment`; `url` (a signed read link) only where Nest signs one (the item\n list).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboxItemAttachment"
                }
              }
            }
          }
        },
        "x-public-api": true
      },
      "delete": {
        "tags": [
          "Inbox"
        ],
        "summary": "Delete an item",
        "operationId": "InboxController_deleteItem",
        "parameters": [
          {
            "in": "path",
            "name": "inboxId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "inboxItemId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      },
      "patch": {
        "tags": [
          "Inbox"
        ],
        "summary": "Change an item",
        "operationId": "InboxController_updateItem",
        "parameters": [
          {
            "in": "path",
            "name": "inboxId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "path",
            "name": "inboxItemId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "description": "`AddInboxItemDto` (the body of `POST /inbox/:id/items`; `PATCH` takes the same\n fields).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateInboxItemDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "An inbox item's own scalars (what an item write answers, and what the expense it\n became embeds). `amount` is in minor units.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboxItemSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/inbox/gmail/connect": {
      "post": {
        "tags": [
          "Gmail Inbox POC"
        ],
        "summary": "Start a Gmail connection",
        "operationId": "GmailInboxController_connect",
        "requestBody": {
          "description": "`{ inboxId }` (strict: no other key).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectGmailDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`{ url }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GmailConnectResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/inbox/gmail/callback": {
      "get": {
        "tags": [
          "Gmail Inbox POC"
        ],
        "summary": "Gmail consent callback (public)",
        "operationId": "GmailInboxController_callback",
        "parameters": [
          {
            "in": "query",
            "name": "code",
            "description": "The authorization code",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "state",
            "description": "The state the connect issued",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "error",
            "description": "The provider error, when the user declined",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "scope",
            "description": "The granted scopes",
            "schema": {
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-public-api": true
      }
    },
    "/inbox/gmail/inboxes/{inboxId}": {
      "get": {
        "tags": [
          "Gmail Inbox POC"
        ],
        "summary": "An inbox's Gmail connection",
        "operationId": "GmailInboxController_status",
        "parameters": [
          {
            "in": "path",
            "name": "inboxId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "The inbox's connection (absent before the first one).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GmailStatusResponseDto"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/inbox/gmail/{id}/sync": {
      "post": {
        "tags": [
          "Gmail Inbox POC"
        ],
        "summary": "Scan the Gmail mailbox now",
        "operationId": "GmailInboxController_sync",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "202": {
            "description": "Accepted: the operation that runs the work (read it at Location)",
            "headers": {
              "Location": {
                "description": "`/operations/{id}`",
                "style": "simple",
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/inbox/gmail/{id}": {
      "delete": {
        "tags": [
          "Gmail Inbox POC"
        ],
        "summary": "Disconnect Gmail",
        "operationId": "GmailInboxController_disconnect",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/inbox/outlook/connect": {
      "post": {
        "tags": [
          "Outlook Inbox POC"
        ],
        "summary": "Start an Outlook connection",
        "operationId": "OutlookInboxController_connect",
        "requestBody": {
          "description": "`{ inboxId }` (strict: no other key).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectOutlookDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`{ url }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OutlookConnectResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/inbox/outlook/callback": {
      "get": {
        "tags": [
          "Outlook Inbox POC"
        ],
        "summary": "Outlook consent callback (public)",
        "operationId": "OutlookInboxController_callback",
        "parameters": [
          {
            "in": "query",
            "name": "code",
            "description": "The authorization code",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "state",
            "description": "The state the connect issued",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "error",
            "description": "The provider error, when the user declined",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "scope",
            "description": "The granted scopes",
            "schema": {
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-public-api": true
      }
    },
    "/inbox/outlook/inboxes/{inboxId}": {
      "get": {
        "tags": [
          "Outlook Inbox POC"
        ],
        "summary": "An inbox's Outlook connection",
        "operationId": "OutlookInboxController_status",
        "parameters": [
          {
            "in": "path",
            "name": "inboxId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "The inbox's connection (absent before the first one).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OutlookStatusResponseDto"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/inbox/outlook/{id}/sync": {
      "post": {
        "tags": [
          "Outlook Inbox POC"
        ],
        "summary": "Scan the Outlook mailbox now",
        "operationId": "OutlookInboxController_sync",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "description": "Replays the stored answer of an earlier request with this key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "202": {
            "description": "Accepted: the operation that runs the work (read it at Location)",
            "headers": {
              "Location": {
                "description": "`/operations/{id}`",
                "style": "simple",
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/inbox/outlook/{id}": {
      "delete": {
        "tags": [
          "Outlook Inbox POC"
        ],
        "summary": "Disconnect Outlook",
        "operationId": "OutlookInboxController_disconnect",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Empty body"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    },
    "/affiliate-links/by-slug/{slug}": {
      "get": {
        "tags": [
          "Affiliates"
        ],
        "summary": "A public affiliate link by slug",
        "operationId": "AffiliateLinksController_bySlug",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "`AffiliateCodePreviewResponse` / `AffiliateLinkPublicResponse`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateLinkPublicResponse"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "x-public-api": true
      }
    },
    "/affiliate-links/validate-code": {
      "post": {
        "tags": [
          "Affiliates"
        ],
        "summary": "Preview the discount an affiliate code gives",
        "operationId": "AffiliateLinksController_validateCode",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateAffiliateCodeDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "The code-validation answer: the preview without `slug` (Nest's\n `AffiliateCodePreviewResponse`, which `toPublic(link, false)` filled with `slug: null`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateCodePreviewResponse"
                }
              }
            }
          }
        },
        "x-public-api": true
      }
    },
    "/enterprise/{enterpriseId}/products": {
      "get": {
        "tags": [
          "Enterprise Products"
        ],
        "summary": "The enterprise's products in force",
        "operationId": "EnterpriseProductsController_findAll",
        "parameters": [
          {
            "in": "path",
            "name": "enterpriseId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "cursor",
            "description": "The previous page's nextCursor.",
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Page size (1..1000, default 100).",
            "schema": {
              "type": "integer"
            },
            "style": "form"
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "description": "The `ETag` of a body read before: when it is still current the read answers 304 with no body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Every non-2xx answer: an RFC 9457 problem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPage_EnterpriseProduct"
                }
              }
            },
            "headers": {
              "ETag": {
                "description": "A weak tag of this body; send it as `If-None-Match` to revalidate. Not a write precondition: a write's `If-Match` takes the `version` field.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "`private, no-cache` unless the route sets its own: store, but revalidate before reuse.",
                "schema": {
                  "type": "string"
                }
              },
              "Vary": {
                "description": "Includes `Authorization, Prefer`.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified: the `If-None-Match` tag is current; no body, the same `ETag`, `Cache-Control` and `Vary`"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "x-public-api": true
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "A JWT, a personal access token (`ua_`) or a service token (`uas_`)."
      }
    },
    "schemas": {
      "Problem": {
        "description": "An RFC 9457 problem (SPINE 26.4): `application/problem+json`.",
        "type": "object",
        "properties": {
          "title": {
            "description": "The code's fixed English label (RFC 9457 `title`, the registry's): the same on every\n occurrence, for logs and developers; never shown to users, never per-request prose.",
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "description": "`https://api.utlegg.app/problems/<errorCode>`.",
            "type": "string"
          },
          "status": {
            "type": "integer",
            "format": "uint16",
            "minimum": 0,
            "maximum": 65535
          },
          "instance": {
            "description": "The request path.",
            "type": [
              "string",
              "null"
            ]
          },
          "errorCode": {
            "description": "The registry code clients branch on (always present: a framework status answers its\n status's code).",
            "type": [
              "string",
              "null"
            ]
          },
          "errors": {
            "description": "Every violation found.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemError"
            }
          },
          "traceId": {
            "description": "The request's trace id (W3C Trace Context), for support.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "type",
          "status"
        ]
      },
      "ProblemError": {
        "description": "One violation in a problem's `errors[]`.",
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "pointer": {
            "description": "A JSON Pointer into the request body (RFC 6901).",
            "type": [
              "string",
              "null"
            ]
          },
          "parameter": {
            "description": "The query parameter it concerns.",
            "type": [
              "string",
              "null"
            ]
          },
          "params": {
            "description": "details: an object whose keys depend on the code.",
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          }
        },
        "required": [
          "code"
        ]
      },
      "CurrentUserFeatureFlags": {
        "description": "`CurrentUserFeatureFlagsDto`.",
        "type": "object",
        "properties": {
          "flags": {
            "description": "Every app-visible flag, evaluated for the caller in the requested organization.",
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            }
          }
        },
        "required": [
          "flags"
        ]
      },
      "Operation": {
        "description": "An operation (AIP-151): what a long-running or bulk request answers, and what `GET\n /operations/{id}` reads. `result` is the kind's own answer (what the request answered\n before it became an operation; an export's `download`), present when SUCCEEDED;\n `error` is a problem body, present when FAILED.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "description": "`search.sync`, `statistics.costs.export`, … (each migrated route names its kind).",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/OperationStatus"
          },
          "progress": {
            "description": "`{ done, total }`.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "done": {
                "type": "integer",
                "format": "int64"
              },
              "total": {
                "type": "integer",
                "format": "int64"
              }
            },
            "required": [
              "done",
              "total"
            ]
          },
          "result": {
            "description": "What a SUCCEEDED operation answers, by its `kind`: an export's download, a sync's\n steps, an inbox sync's count, or another kind's own summary object.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/OperationExportResult"
              },
              {
                "$ref": "#/components/schemas/OperationSyncResult"
              },
              {
                "$ref": "#/components/schemas/OperationImportResult"
              },
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "description": "An RFC 9457 problem (SPINE 26.4): `application/problem+json`.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "title": {
                "description": "The code's fixed English label (RFC 9457 `title`, the registry's): the same on every\n occurrence, for logs and developers; never shown to users, never per-request prose.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "description": "`https://api.utlegg.app/problems/<errorCode>`.",
                "type": "string"
              },
              "status": {
                "type": "integer",
                "format": "uint16",
                "minimum": 0,
                "maximum": 65535
              },
              "instance": {
                "description": "The request path.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "errorCode": {
                "description": "The registry code clients branch on (always present: a framework status answers its\n status's code).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "errors": {
                "description": "Every violation found.",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "traceId": {
                "description": "The request's trace id (W3C Trace Context), for support.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "type",
              "status"
            ]
          },
          "cancellable": {
            "description": "Whether `POST /operations/{id}:cancel` can stop it.",
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "$ref": "#/components/schemas/OperationCreator"
          }
        },
        "required": [
          "id",
          "kind",
          "status",
          "cancellable",
          "createdAt",
          "updatedAt",
          "createdBy"
        ]
      },
      "OperationStatus": {
        "description": "`PENDING | RUNNING | SUCCEEDED | FAILED | CANCELLED`.",
        "type": "string",
        "enum": [
          "PENDING",
          "RUNNING",
          "SUCCEEDED",
          "FAILED",
          "CANCELLED"
        ],
        "x-enum-open": true
      },
      "OperationExportResult": {
        "description": "An export's result (`statistics.costs.export`, `audit-trail.export`, `lab.export`,\n `reports.export`).",
        "type": "object",
        "properties": {
          "download": {
            "$ref": "#/components/schemas/OperationDownload"
          },
          "rows": {
            "description": "Rows written (the audit trail; the reports export's reports).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "nextCursor": {
            "description": "Where a capped audit-trail or reports export stopped: export again from it.",
            "type": [
              "string",
              "null"
            ]
          },
          "counts": {
            "description": "The cost export's counts (`entries`, …).",
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "integer",
              "format": "int64"
            }
          }
        },
        "required": [
          "download"
        ]
      },
      "OperationDownload": {
        "description": "A stored export's signed download (`GET /operations/{id}` signs it per read).",
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "fileName": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "size": {
            "description": "Bytes.",
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "url",
          "expiresAt",
          "fileName",
          "contentType",
          "size"
        ]
      },
      "OperationSyncResult": {
        "description": "`integrations.sync`: `ok` is false when any step failed.",
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OperationSyncStep"
            }
          }
        },
        "required": [
          "ok",
          "steps"
        ]
      },
      "OperationSyncStep": {
        "description": "One step of an integration sync.",
        "type": "object",
        "properties": {
          "step": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "message": {
            "description": "The sidecar's customer-facing text (Norwegian).",
            "type": [
              "string",
              "null"
            ]
          },
          "warning": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "step",
          "ok"
        ]
      },
      "OperationImportResult": {
        "description": "`inbox.gmail.sync`, `inbox.outlook.sync`: the messages imported.",
        "type": "object",
        "properties": {
          "imported": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "imported"
        ]
      },
      "OperationCreator": {
        "description": "Who started it: a user, a service account (with their id), or a system trigger.",
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/OperationCreatorType"
          },
          "id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "type"
        ]
      },
      "OperationCreatorType": {
        "description": "`USER | SERVICE_ACCOUNT | SYSTEM`.",
        "type": "string",
        "enum": [
          "USER",
          "SERVICE_ACCOUNT",
          "SYSTEM"
        ],
        "x-enum-open": true
      },
      "ProjectSummary": {
        "description": "A summary-level project (SPINE 26.1: depth 0): a search hit, a facet's label, a\n cross-aggregate embed.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "accountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "deletedAt": {
            "description": "Set when the project was deleted after something was booked on it: an embed keeps\n pointing at it (a line, a report), so the client can mark it (SPINE 26.1).",
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "organizationId",
          "title",
          "description",
          "accountingCode",
          "deletedAt"
        ]
      },
      "FlowSummary": {
        "description": "A flow's summary: what a create, an import, a duplicate or a draft edit answers, and a\n trace's `flow` (depth 0, pure).",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "triggers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlowTrigger"
            }
          },
          "isActive": {
            "type": "boolean"
          },
          "isPublished": {
            "type": "boolean"
          },
          "publishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "currentVersionId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "organizationId",
          "name",
          "description",
          "triggers",
          "isActive",
          "isPublished",
          "publishedAt",
          "currentVersionId",
          "updatedAt"
        ]
      },
      "FlowTrigger": {
        "description": "`FlowTrigger`: what starts a flow run.",
        "type": "string",
        "enum": [
          "REPORT_SUBMITTED",
          "REPORT_REVIEWED",
          "FINDING_DETECTED",
          "FINDING_RESOLVED"
        ],
        "x-enum-descriptions": [
          "",
          "",
          "A finding opened (or reopened) on a submitted report.",
          "A finding was resolved (human triage or machine auto-close)."
        ],
        "x-enum-open": true
      },
      "Purpose": {
        "description": "The file's purpose: who files it, on what, under which limits.",
        "type": "string",
        "enum": [
          "expense_receipt",
          "stay_receipt",
          "report_file",
          "profile_picture",
          "organization_logo",
          "enterprise_logo"
        ],
        "x-enum-descriptions": [
          "A receipt on an expense (`POST /attachments`, reports).",
          "A stay's receipt (`POST /reports/{id}/travels/{travelId}/accommodations/{id}/attachments`,\n travel).",
          "Evidence filed on a report (`POST /reports/{id}/attachments`, reports).",
          "The user's own picture (`POST /users/{id}/profile-picture`, identity; no org).",
          "An organization's logo (identity's org slice).",
          "An enterprise's (konsern's) logo (identity's enterprise plane; no org)."
        ],
        "x-enum-open": true
      },
      "Status": {
        "description": "`AttachmentAutofillStatus`.",
        "type": "string",
        "enum": [
          "applied",
          "partial",
          "skipped_not_requested",
          "skipped_no_ocr",
          "skipped_no_extracted_fields",
          "skipped_existing_fields",
          "skipped_low_confidence",
          "skipped_non_receipt",
          "failed_update"
        ],
        "x-enum-open": true
      },
      "CommunicationChannel": {
        "description": "A message's channel (`CommunicationChannel`).",
        "type": "string",
        "enum": [
          "EMAIL",
          "SMS",
          "PUSH",
          "SLACK"
        ],
        "x-enum-open": true
      },
      "ListPage_AuditTrailItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditTrailItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "AuditTrailItem": {
        "description": "One fact of the trail (Nest's `AuditTrailItemDto`; a value object).",
        "type": "object",
        "properties": {
          "changes": {
            "description": "A WORKFLOW fact's merged EVIDENCE and COMMENT; `null` for every other category.",
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "id": {
            "description": "The fact's number, as a string.",
            "type": "string"
          },
          "category": {
            "description": "`MUTATION`, `DELETION`, `WORKFLOW`, `GRANT` or `EXPORT`.",
            "type": "string"
          },
          "eventSubjectType": {
            "type": [
              "string",
              "null"
            ]
          },
          "eventSubjectId": {
            "type": [
              "string",
              "null"
            ]
          },
          "eventType": {
            "type": [
              "string",
              "null"
            ]
          },
          "actorId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "actorType": {
            "type": [
              "string",
              "null"
            ]
          },
          "roleId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "entryPoint": {
            "type": [
              "string",
              "null"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "hasChangeset": {
            "description": "Whether the fact carries a changeset an erasure would remove.",
            "type": "boolean"
          }
        },
        "required": [
          "changes",
          "id",
          "category",
          "eventSubjectType",
          "eventSubjectId",
          "eventType",
          "actorId",
          "actorType",
          "roleId",
          "entryPoint",
          "reason",
          "createdAt",
          "hasChangeset"
        ]
      },
      "ListPage_ProjectListItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "ProjectListItem": {
        "description": "A project in `GET /projects` (every field of [`ProjectDetail`]).",
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "accountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "accountingDescription": {
            "type": [
              "string",
              "null"
            ]
          },
          "managedByIntegrationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "departmentIds": {
            "description": "The ids of `departments` (SPINE 26.12.2: a relation is its ids).",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "departments": {
            "description": "The live departments the project is linked to.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DepartmentSummary"
            }
          }
        },
        "required": [
          "id",
          "organizationId",
          "title",
          "accountingCode",
          "accountingDescription",
          "description",
          "managedByIntegrationId",
          "createdAt",
          "updatedAt",
          "departmentIds",
          "departments"
        ]
      },
      "DepartmentSummary": {
        "description": "A summary-level department (SPINE 26.1: depth 0).",
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "accountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "isPublic": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "organizationId",
          "title",
          "accountingCode",
          "isPublic"
        ]
      },
      "CreateProjectDto": {
        "description": "`CreateProjectDto`.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "id": {
            "description": "The new project's id, minted by the client (a UUIDv7; SPINE 26.10 item 7): with it\n the request needs an `Idempotency-Key` (`spine_http::pipeline::create`). Accepted on\n `POST /projects` only (the reference route of the sweep); the bulk route refuses it.",
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
          },
          "organizationId": {
            "description": "Any non-empty string (Nest: `z.string().min(1)`); one that names no org of the\n caller is a 403.",
            "type": "string",
            "minLength": 1
          },
          "accountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "accountingDescription": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "managedByIntegrationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "organizationId",
          "title"
        ]
      },
      "ProjectDetail": {
        "description": "A project (`GET /projects/{id}`).",
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "accountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "accountingDescription": {
            "type": [
              "string",
              "null"
            ]
          },
          "managedByIntegrationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "departmentIds": {
            "description": "The ids of `departments` (SPINE 26.12.2: a relation is its ids).",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "departments": {
            "description": "The live departments the project is linked to.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DepartmentSummary"
            }
          }
        },
        "required": [
          "id",
          "organizationId",
          "title",
          "accountingCode",
          "accountingDescription",
          "description",
          "managedByIntegrationId",
          "createdAt",
          "updatedAt",
          "departmentIds",
          "departments"
        ]
      },
      "UpdateProjectDto": {
        "description": "`UpdateProjectDto`: `CreateProjectDto` without `organizationId` (a sent one is\n stripped, Q7), every field optional.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "accountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "accountingDescription": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "managedByIntegrationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        }
      },
      "ConnectAccountsDto": {
        "description": "`ConnectAccountsDto`: 1–500 account ids (`z.uuid()`), and a role (default `USER`).",
        "type": "object",
        "properties": {
          "accountIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "minItems": 1,
            "maxItems": 500
          },
          "role": {
            "$ref": "#/components/schemas/ProjectRole"
          }
        },
        "required": [
          "accountIds"
        ]
      },
      "ProjectRole": {
        "type": "integer",
        "enum": [
          0,
          1,
          2,
          3
        ]
      },
      "DisconnectAccountsDto": {
        "description": "`DisconnectAccountsDto`.",
        "type": "object",
        "properties": {
          "accountIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "minItems": 1,
            "maxItems": 500
          }
        },
        "required": [
          "accountIds"
        ]
      },
      "UpdateProjectAssignmentRoleDto": {
        "description": "`UpdateProjectAssignmentRoleDto`.",
        "type": "object",
        "properties": {
          "role": {
            "$ref": "#/components/schemas/ProjectRole"
          }
        },
        "required": [
          "role"
        ]
      },
      "ListPage_CategoryListItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CategoryListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "CategoryListItem": {
        "description": "A category in `GET /categories`: every field of [`CategoryDetail`] (the admin lists edit\n in place).",
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "accountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "altAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "guidance": {
            "type": [
              "string",
              "null"
            ]
          },
          "context": {
            "type": [
              "string",
              "null"
            ]
          },
          "visibility": {
            "$ref": "#/components/schemas/CategoryVisibility"
          },
          "rateId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "managedByIntegrationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "hiddenByIntegrationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "accommodationHotelOrganizationId": {
            "description": "The organization whose hotel stays book to this category (its own org, or none).",
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "accommodationCookingOrganizationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "accommodationOtherOrganizationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "accommodationBreakfastOrganizationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        },
        "required": [
          "id",
          "organizationId",
          "title",
          "accountingCode",
          "altAccountingCode",
          "externalId",
          "description",
          "guidance",
          "context",
          "visibility",
          "rateId",
          "managedByIntegrationId",
          "hiddenByIntegrationId",
          "accommodationHotelOrganizationId",
          "accommodationCookingOrganizationId",
          "accommodationOtherOrganizationId",
          "accommodationBreakfastOrganizationId"
        ]
      },
      "CategoryVisibility": {
        "description": "`CategoryVisibility`.",
        "type": "string",
        "enum": [
          "VISIBLE",
          "HIDDEN"
        ],
        "x-enum-open": true
      },
      "CreateCategoryDto": {
        "description": "`CreateCategoryDto`. Optional fields are `.nullish()` (an explicit null clears);\n `visibility` is optional but never null; the lengths are the columns' (Nest: a 400\n from the database, `Value too long for field`).",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 255
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "accountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "altAccountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 50
          },
          "guidance": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "context": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "visibility": {
            "$ref": "#/components/schemas/CategoryVisibility"
          },
          "managedByIntegrationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "hiddenByIntegrationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "rateId": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
          },
          "organizationId": {
            "type": "string"
          },
          "accommodationHotelOrganizationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "accommodationCookingOrganizationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "accommodationOtherOrganizationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "accommodationBreakfastOrganizationId": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "title",
          "organizationId"
        ]
      },
      "CategorySummary": {
        "description": "A summary-level category (SPINE 26.1).",
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "accountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "visibility": {
            "description": "`VISIBLE` or `HIDDEN`.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organizationId",
          "title",
          "description",
          "accountingCode",
          "visibility"
        ]
      },
      "CategoryDetail": {
        "description": "A category (`GET /categories/{id}`).",
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "accountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "altAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "guidance": {
            "type": [
              "string",
              "null"
            ]
          },
          "context": {
            "type": [
              "string",
              "null"
            ]
          },
          "visibility": {
            "$ref": "#/components/schemas/CategoryVisibility"
          },
          "rateId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "managedByIntegrationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "hiddenByIntegrationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "accommodationHotelOrganizationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "accommodationCookingOrganizationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "accommodationOtherOrganizationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "accommodationBreakfastOrganizationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        },
        "required": [
          "id",
          "organizationId",
          "title",
          "accountingCode",
          "altAccountingCode",
          "externalId",
          "description",
          "guidance",
          "context",
          "visibility",
          "rateId",
          "managedByIntegrationId",
          "hiddenByIntegrationId",
          "accommodationHotelOrganizationId",
          "accommodationCookingOrganizationId",
          "accommodationOtherOrganizationId",
          "accommodationBreakfastOrganizationId"
        ]
      },
      "UpdateCategoryDto": {
        "description": "`UpdateCategoryDto`: `CreateCategoryDto` without `organizationId`, every field optional.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 255
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "accountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "altAccountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 50
          },
          "guidance": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "context": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "visibility": {
            "$ref": "#/components/schemas/CategoryVisibility"
          },
          "managedByIntegrationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "hiddenByIntegrationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "rateId": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
          },
          "accommodationHotelOrganizationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "accommodationCookingOrganizationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "accommodationOtherOrganizationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "accommodationBreakfastOrganizationId": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ListPage_EnterpriseCategoryListItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnterpriseCategoryListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "EnterpriseCategoryListItem": {
        "description": "A template in `GET /enterprise/{enterpriseId}/categories` (every field of\n [`EnterpriseCategoryDetail`]).",
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "enterpriseId": {
            "type": "string",
            "format": "uuid"
          },
          "accountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "altAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "guidance": {
            "type": [
              "string",
              "null"
            ]
          },
          "context": {
            "type": [
              "string",
              "null"
            ]
          },
          "visibility": {
            "$ref": "#/components/schemas/CategoryVisibility"
          },
          "rateId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "autoPropagate": {
            "type": "boolean"
          },
          "isAccommodationHotel": {
            "type": "boolean"
          },
          "isAccommodationCooking": {
            "type": "boolean"
          },
          "isAccommodationOther": {
            "type": "boolean"
          },
          "isAccommodationBreakfast": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "enterpriseId",
          "title",
          "accountingCode",
          "altAccountingCode",
          "description",
          "guidance",
          "context",
          "visibility",
          "rateId",
          "autoPropagate",
          "isAccommodationHotel",
          "isAccommodationCooking",
          "isAccommodationOther",
          "isAccommodationBreakfast",
          "createdAt",
          "updatedAt"
        ]
      },
      "CreateEnterpriseCategoryDto": {
        "description": "`CreateEnterpriseCategoryDto`.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 255
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "accountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "altAccountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "guidance": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "context": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "visibility": {
            "description": "`CategoryVisibility`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "VISIBLE",
              "HIDDEN",
              null
            ]
          },
          "rateId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "autoPropagate": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "isAccommodationHotel": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "isAccommodationCooking": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "isAccommodationOther": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "isAccommodationBreakfast": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "propagateToExisting": {
            "description": "Also create the category in the enterprise's live member orgs.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "targetOrganizationIds": {
            "description": "With `propagateToExisting`: only these member orgs (none named: all of them).",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "title"
        ]
      },
      "EnterpriseCategorySummary": {
        "description": "A template's summary: what a create or an update answers.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "enterpriseId": {
            "type": "string",
            "format": "uuid"
          },
          "accountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "visibility": {
            "$ref": "#/components/schemas/CategoryVisibility"
          },
          "autoPropagate": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "enterpriseId",
          "title",
          "accountingCode",
          "visibility",
          "autoPropagate"
        ]
      },
      "EnterpriseCategoryDetail": {
        "description": "A template (`GET /enterprise/{enterpriseId}/categories/{categoryId}`).",
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "enterpriseId": {
            "type": "string",
            "format": "uuid"
          },
          "accountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "altAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "guidance": {
            "type": [
              "string",
              "null"
            ]
          },
          "context": {
            "type": [
              "string",
              "null"
            ]
          },
          "visibility": {
            "$ref": "#/components/schemas/CategoryVisibility"
          },
          "rateId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "autoPropagate": {
            "type": "boolean"
          },
          "isAccommodationHotel": {
            "type": "boolean"
          },
          "isAccommodationCooking": {
            "type": "boolean"
          },
          "isAccommodationOther": {
            "type": "boolean"
          },
          "isAccommodationBreakfast": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "enterpriseId",
          "title",
          "accountingCode",
          "altAccountingCode",
          "description",
          "guidance",
          "context",
          "visibility",
          "rateId",
          "autoPropagate",
          "isAccommodationHotel",
          "isAccommodationCooking",
          "isAccommodationOther",
          "isAccommodationBreakfast",
          "createdAt",
          "updatedAt"
        ]
      },
      "UpdateEnterpriseCategoryDto": {
        "description": "`UpdateEnterpriseCategoryDto`: absent leaves a field, null clears a nullable one.",
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "accountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "altAccountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "guidance": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "context": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "visibility": {
            "description": "`CategoryVisibility`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "VISIBLE",
              "HIDDEN",
              null
            ]
          },
          "rateId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "autoPropagate": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "isAccommodationHotel": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "isAccommodationCooking": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "isAccommodationOther": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "isAccommodationBreakfast": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "ResetCategories": {
        "description": "`OrganizationsController_resetCategories`. No body.",
        "type": "object"
      },
      "ClearCategories": {
        "description": "`OrganizationsController_clearCategories`. No body.",
        "type": "object"
      },
      "ReportType": {
        "description": "`ReportType` (Prisma enum): what a create may name, and the type a report answers,\n derived from its content ([`crate::summary::PresentationCounts::compat_type`]; a søknad\n answers `EXPENSEGROUP`, `kind` is the real discriminator).",
        "type": "string",
        "enum": [
          "TRAVEL",
          "EXPENSE",
          "DRIVE",
          "EXPENSEGROUP"
        ],
        "x-enum-open": true
      },
      "ReportSummary": {
        "description": "A summary-level report (SPINE 26.1: depth 0): every cross-aggregate embed of a report\n and its CRUD write answers. Its head ([`ReportHead`], reachable through `Deref`) and the\n fields an embedding response cannot decode without: its travel and travel request, as\n their owner's summaries (travel's builders, through `ReportTravel::summaries`).",
        "type": "object",
        "properties": {
          "title": {
            "description": "The report's name (SPINE 26.2): the user's, or generated from its content; `null`:\n the client shows its own placeholder.",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "description": "Deprecated: use `presentation` and `travelId`. The compat type derived from the\n report's content (a søknad serializes `EXPENSEGROUP`; `kind` carries the real\n discriminator).",
            "$ref": "#/components/schemas/ReportType",
            "deprecated": true
          },
          "id": {
            "type": "string"
          },
          "version": {
            "description": "SPINE 26.10 item 3: the report's version; send it back as `If-Match`.",
            "type": "integer",
            "format": "int64"
          },
          "status": {
            "$ref": "#/components/schemas/ReportStatus"
          },
          "amount": {
            "description": "Minor units of `baseCurrency`.",
            "type": "integer",
            "format": "int64"
          },
          "baseCurrency": {
            "type": "string"
          },
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "titleSource": {
            "$ref": "#/components/schemas/ReportTitleSource"
          },
          "shouldReinvoice": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "departmentId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "travelId": {
            "description": "The report's travel (SPINE 26.12.2: a relation is its id); `null`: no travel.",
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "reviewComment": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "publishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "submittedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "_count": {
            "$ref": "#/components/schemas/ReportCounts"
          },
          "presentation": {
            "description": "`SINGLE`: an implicit wrapper of exactly one line, an expense or a drive (a per diem\n counts as a line; no travel or travel request); `GROUP` otherwise, an empty report\n included.",
            "$ref": "#/components/schemas/ReportPresentation"
          },
          "kind": {
            "$ref": "#/components/schemas/ReportKind"
          },
          "leadLine": {
            "description": "On a standalone expense report (`SINGLE` with one expense) its one expense; `null`\n otherwise (a lone drive's too).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "title": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "expenseId": {
                "type": "string"
              },
              "merchant": {
                "description": "The expense's own merchant, else its first live receipt's.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "categoryId": {
                "description": "The category's id (SPINE 26.12.2: a relation is its id); `null` with `category`.",
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "category": {
                "description": "A summary-level category (SPINE 26.1).",
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "organizationId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "accountingCode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "visibility": {
                    "description": "`VISIBLE` or `HIDDEN`.",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "organizationId",
                  "title",
                  "description",
                  "accountingCode",
                  "visibility"
                ]
              }
            },
            "required": [
              "expenseId",
              "title",
              "merchant",
              "categoryId",
              "category"
            ]
          },
          "period": {
            "description": "`null` when no line has a date.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "firstDay": {
                "type": "string"
              },
              "lastDay": {
                "type": "string"
              }
            },
            "required": [
              "firstDay",
              "lastDay"
            ]
          },
          "missingDateCount": {
            "description": "Live lines with no date that are not still uploading.",
            "type": "integer",
            "format": "int64"
          },
          "travel": {
            "description": "The report's travel (an owned child, SPINE 26.2), or null.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "version": {
                "description": "SPINE 26.10 item 3: the travel's version; send it back as `If-Match`.",
                "type": "integer",
                "format": "int64"
              },
              "reportId": {
                "type": "string"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "fromDateTime": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "toDateTime": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "businessStartAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "businessStartTimeZone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "businessEndAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "businessEndTimeZone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "privateInterruptions": {
                "description": "Null when none were declared.",
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "$ref": "#/components/schemas/PrivateInterruption"
                }
              },
              "fromPlace": {
                "description": "`PlaceEntity`: a stored place, Prisma's field order.",
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "organizationId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "source": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "MAP_SEARCH",
                      "MAP_PIN",
                      "MANUAL",
                      null
                    ],
                    "x-enum-open": true
                  },
                  "provider": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "GOOGLE",
                      null
                    ],
                    "x-enum-open": true
                  },
                  "providerPlaceId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "formattedAddress": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "street": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "postalCode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "city": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "region": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "countryName": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "countryCode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "cityKey": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lat": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "format": "double"
                  },
                  "lng": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "format": "double"
                  },
                  "coordinatesAt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "id",
                  "organizationId",
                  "source",
                  "provider",
                  "providerPlaceId",
                  "name",
                  "formattedAddress",
                  "street",
                  "postalCode",
                  "city",
                  "region",
                  "countryName",
                  "countryCode",
                  "cityKey",
                  "lat",
                  "lng",
                  "coordinatesAt",
                  "createdAt",
                  "updatedAt"
                ]
              },
              "toPlace": {
                "description": "`PlaceEntity`: a stored place, Prisma's field order.",
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "organizationId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "source": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "MAP_SEARCH",
                      "MAP_PIN",
                      "MANUAL",
                      null
                    ],
                    "x-enum-open": true
                  },
                  "provider": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "GOOGLE",
                      null
                    ],
                    "x-enum-open": true
                  },
                  "providerPlaceId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "formattedAddress": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "street": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "postalCode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "city": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "region": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "countryName": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "countryCode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "cityKey": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lat": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "format": "double"
                  },
                  "lng": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "format": "double"
                  },
                  "coordinatesAt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "id",
                  "organizationId",
                  "source",
                  "provider",
                  "providerPlaceId",
                  "name",
                  "formattedAddress",
                  "street",
                  "postalCode",
                  "city",
                  "region",
                  "countryName",
                  "countryCode",
                  "cityKey",
                  "lat",
                  "lng",
                  "coordinatesAt",
                  "createdAt",
                  "updatedAt"
                ]
              },
              "purpose": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "typeOfAccommodation": {
                "$ref": "#/components/schemas/TravelAccommodationType"
              },
              "currency": {
                "type": "string"
              },
              "advanceAmount": {
                "description": "Minor units of the currency (øre for NOK).",
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              },
              "rateLevel": {
                "$ref": "#/components/schemas/TravelRateLevel"
              },
              "perDiemDisabled": {
                "type": "boolean"
              },
              "travelRequestId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "dietSchemeVersionId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "version",
              "reportId",
              "organizationId",
              "fromDateTime",
              "toDateTime",
              "businessStartAt",
              "businessStartTimeZone",
              "businessEndAt",
              "businessEndTimeZone",
              "privateInterruptions",
              "fromPlace",
              "toPlace",
              "purpose",
              "typeOfAccommodation",
              "currency",
              "advanceAmount",
              "rateLevel",
              "perDiemDisabled",
              "travelRequestId",
              "dietSchemeVersionId",
              "createdAt",
              "updatedAt"
            ]
          },
          "travelRequest": {
            "description": "The søknad (an owned child), or null.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "version": {
                "description": "SPINE 26.10 item 3: the request's version; send it back as `If-Match`.",
                "type": "integer",
                "format": "int64"
              },
              "reportId": {
                "type": "string"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "purpose": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fromDateTime": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "toDateTime": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "fromPlace": {
                "description": "`PlaceEntity`: a stored place, Prisma's field order.",
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "organizationId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "source": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "MAP_SEARCH",
                      "MAP_PIN",
                      "MANUAL",
                      null
                    ],
                    "x-enum-open": true
                  },
                  "provider": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "GOOGLE",
                      null
                    ],
                    "x-enum-open": true
                  },
                  "providerPlaceId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "formattedAddress": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "street": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "postalCode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "city": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "region": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "countryName": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "countryCode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "cityKey": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lat": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "format": "double"
                  },
                  "lng": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "format": "double"
                  },
                  "coordinatesAt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "id",
                  "organizationId",
                  "source",
                  "provider",
                  "providerPlaceId",
                  "name",
                  "formattedAddress",
                  "street",
                  "postalCode",
                  "city",
                  "region",
                  "countryName",
                  "countryCode",
                  "cityKey",
                  "lat",
                  "lng",
                  "coordinatesAt",
                  "createdAt",
                  "updatedAt"
                ]
              },
              "toPlace": {
                "description": "`PlaceEntity`: a stored place, Prisma's field order.",
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "organizationId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "source": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "MAP_SEARCH",
                      "MAP_PIN",
                      "MANUAL",
                      null
                    ],
                    "x-enum-open": true
                  },
                  "provider": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "GOOGLE",
                      null
                    ],
                    "x-enum-open": true
                  },
                  "providerPlaceId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "formattedAddress": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "street": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "postalCode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "city": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "region": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "countryName": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "countryCode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "cityKey": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lat": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "format": "double"
                  },
                  "lng": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "format": "double"
                  },
                  "coordinatesAt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "id",
                  "organizationId",
                  "source",
                  "provider",
                  "providerPlaceId",
                  "name",
                  "formattedAddress",
                  "street",
                  "postalCode",
                  "city",
                  "region",
                  "countryName",
                  "countryCode",
                  "cityKey",
                  "lat",
                  "lng",
                  "coordinatesAt",
                  "createdAt",
                  "updatedAt"
                ]
              },
              "currency": {
                "type": "string"
              },
              "estimatedCost": {
                "description": "Minor units of the currency (øre for NOK).",
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              },
              "requestedAdvanceAmount": {
                "description": "Minor units of the currency (øre for NOK).",
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              },
              "ownCarApprovalRequested": {
                "type": "boolean"
              },
              "premiumClassApprovalRequested": {
                "type": "boolean"
              },
              "travelRequestNumber": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "version",
              "reportId",
              "organizationId",
              "purpose",
              "fromDateTime",
              "toDateTime",
              "fromPlace",
              "toPlace",
              "currency",
              "estimatedCost",
              "requestedAdvanceAmount",
              "ownCarApprovalRequested",
              "premiumClassApprovalRequested",
              "travelRequestNumber",
              "createdAt",
              "updatedAt"
            ]
          }
        },
        "required": [
          "id",
          "version",
          "status",
          "type",
          "amount",
          "baseCurrency",
          "accountId",
          "organizationId",
          "title",
          "titleSource",
          "description",
          "shouldReinvoice",
          "departmentId",
          "projectId",
          "travelId",
          "reviewComment",
          "createdAt",
          "updatedAt",
          "deletedAt",
          "publishedAt",
          "submittedAt",
          "_count",
          "presentation",
          "kind",
          "leadLine",
          "period",
          "missingDateCount",
          "travel",
          "travelRequest"
        ]
      },
      "ReportStatus": {
        "description": "`ReportStatus` (Prisma enum, `prisma/models/report.prisma`).",
        "type": "string",
        "enum": [
          "DRAFT",
          "PENDING",
          "APPROVED",
          "REJECTED",
          "BLOCKED"
        ],
        "x-enum-open": true
      },
      "ReportTitleSource": {
        "description": "Who named the report (SPINE 26.2 \"Report names\"): the user, or the server from the\n report's content (recomputed by the reports write gate while it is generated).",
        "type": "string",
        "enum": [
          "USER",
          "GENERATED"
        ],
        "x-enum-open": true
      },
      "ReportCounts": {
        "description": "Live children of a report (`_count`).",
        "type": "object",
        "properties": {
          "expenses": {
            "type": "integer",
            "format": "int64"
          },
          "drives": {
            "type": "integer",
            "format": "int64"
          },
          "perDiems": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "expenses",
          "drives",
          "perDiems"
        ]
      },
      "ReportPresentation": {
        "description": "The report's shape (the only shape signal of the next contract): `SINGLE` for an implicit\n wrapper of exactly one line, an expense or a drive (a per diem counts as a line; no travel\n or travel request); `GROUP` otherwise, an empty report included. The deprecated `type`'s\n `EXPENSE` and `DRIVE` are exactly `SINGLE`; a travel is `travelId`.",
        "type": "string",
        "enum": [
          "SINGLE",
          "GROUP"
        ],
        "x-enum-open": true
      },
      "ReportKind": {
        "description": "A report's kind (`travel-request/report-kind.ts`): a REQUEST is a report carrying a\n travel request (reisesøknad); everything else is a CLAIM. Derived, never stored.",
        "type": "string",
        "enum": [
          "CLAIM",
          "REQUEST"
        ],
        "x-enum-open": true
      },
      "PrivateInterruption": {
        "description": "A declared private interruption of the trip (`PrivateInterruption`).",
        "type": "object",
        "properties": {
          "startAt": {
            "type": "string"
          },
          "endAt": {
            "type": "string"
          },
          "timeZone": {
            "description": "IANA zone the traveller declared it in.",
            "type": "string"
          }
        },
        "required": [
          "startAt",
          "endAt",
          "timeZone"
        ]
      },
      "TravelAccommodationType": {
        "description": "How the traveller stays (`TravelAccommodationType`).",
        "type": "string",
        "enum": [
          "HOTEL",
          "COOKING_AVAILABLE",
          "COOKING_UNAVAILABLE",
          "NONE",
          "TRANSPORT"
        ],
        "x-enum-descriptions": [
          "",
          "",
          "",
          "",
          "A night in transit (sleeper, ferry, overnight bus or plane); prices like a stay\n without cooking. Written only where `per-diem.night-supplement` is on for the org."
        ],
        "x-enum-open": true
      },
      "TravelRateLevel": {
        "description": "Which per-diem rates the travel pays (`TravelRateLevel`).",
        "type": "string",
        "enum": [
          "NONE",
          "TAX_FREE",
          "TAXABLE",
          "CUSTOM"
        ],
        "x-enum-open": true
      },
      "TravelListItem": {
        "description": "A report's travel as its list answers it (and the report detail embeds it, SPINE\n 26.2): the travel's scalars and its two places. Its stays are the travel detail's\n (`GET /reports/{id}/travels/{travelId}`).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "description": "SPINE 26.10 item 3: the travel's version; send it back as `If-Match`.",
            "type": "integer",
            "format": "int64"
          },
          "reportId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "fromDateTime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "toDateTime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "businessStartAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "businessStartTimeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "businessEndAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "businessEndTimeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "privateInterruptions": {
            "description": "Null when none were declared.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/PrivateInterruption"
            }
          },
          "fromPlace": {
            "description": "`PlaceEntity`: a stored place, Prisma's field order.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "MAP_SEARCH",
                  "MAP_PIN",
                  "MANUAL",
                  null
                ],
                "x-enum-open": true
              },
              "provider": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "GOOGLE",
                  null
                ],
                "x-enum-open": true
              },
              "providerPlaceId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "formattedAddress": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "street": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "postalCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "region": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "countryName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "countryCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "cityKey": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "coordinatesAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "organizationId",
              "source",
              "provider",
              "providerPlaceId",
              "name",
              "formattedAddress",
              "street",
              "postalCode",
              "city",
              "region",
              "countryName",
              "countryCode",
              "cityKey",
              "lat",
              "lng",
              "coordinatesAt",
              "createdAt",
              "updatedAt"
            ]
          },
          "toPlace": {
            "description": "`PlaceEntity`: a stored place, Prisma's field order.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "MAP_SEARCH",
                  "MAP_PIN",
                  "MANUAL",
                  null
                ],
                "x-enum-open": true
              },
              "provider": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "GOOGLE",
                  null
                ],
                "x-enum-open": true
              },
              "providerPlaceId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "formattedAddress": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "street": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "postalCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "region": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "countryName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "countryCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "cityKey": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "coordinatesAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "organizationId",
              "source",
              "provider",
              "providerPlaceId",
              "name",
              "formattedAddress",
              "street",
              "postalCode",
              "city",
              "region",
              "countryName",
              "countryCode",
              "cityKey",
              "lat",
              "lng",
              "coordinatesAt",
              "createdAt",
              "updatedAt"
            ]
          },
          "purpose": {
            "type": [
              "string",
              "null"
            ]
          },
          "typeOfAccommodation": {
            "$ref": "#/components/schemas/TravelAccommodationType"
          },
          "currency": {
            "description": "The currency of `advanceAmount` (the report's base currency).",
            "type": "string"
          },
          "advanceAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "rateLevel": {
            "$ref": "#/components/schemas/TravelRateLevel"
          },
          "perDiemDisabled": {
            "type": "boolean"
          },
          "travelRequestId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "dietSchemeVersionId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "nightSupplementOffer": {
            "description": "Whether the travel can claim nattillegg at all (detail reads only: absent on a\n list row).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "available": {
                "description": "The organization offers nattillegg, the per-diem engine pays it on the trip and the\n trip is domestic.",
                "type": "boolean"
              },
              "ratePerNight": {
                "description": "The statutory sats per night for the trip's year in NOK minor units; null when not\n available or no sats is configured.",
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              }
            },
            "required": [
              "available",
              "ratePerNight"
            ]
          }
        },
        "required": [
          "id",
          "version",
          "reportId",
          "organizationId",
          "fromDateTime",
          "toDateTime",
          "businessStartAt",
          "businessStartTimeZone",
          "businessEndAt",
          "businessEndTimeZone",
          "privateInterruptions",
          "fromPlace",
          "toPlace",
          "purpose",
          "typeOfAccommodation",
          "currency",
          "advanceAmount",
          "rateLevel",
          "perDiemDisabled",
          "travelRequestId",
          "dietSchemeVersionId",
          "createdAt",
          "updatedAt"
        ]
      },
      "AccountSummary": {
        "description": "A summary-level account (a membership, SPINE 26.1: depth 0): its own scalars, the ids\n of the accounts it reports to, and its user's [`UserSummary`] (the field an embedding\n response cannot render without). A removed membership still embeds (`deletedAt` set):\n a report or a review names the account it was written by; a field-version conflict names\n it as `changedBy` (SPINE 26.10 item 3). Built only by [`account_summaries_on`].",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "userId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "role": {
            "description": "The account role (Nest's integer `AccountRole`).",
            "type": "integer",
            "format": "int32"
          },
          "employeeNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "isBlocked": {
            "type": "boolean"
          },
          "deletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "managerAccountIds": {
            "description": "The accounts this one reports to (`managerAccounts`), by id.",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "user": {
            "description": "A summary-level user (SPINE 26.1: depth 0; a user as other people see it): the names,\n the e-mail and the avatar, never the phone or the address (a membership's detail adds\n them for those who may read it: identity's `AccountDetailUser`). Built only by\n [`user_summary`] (its loaders [`user_summaries_on`], [`account_summaries_on`]).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "givenName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "familyName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fullName": {
                "description": "`users.fullName` (null when either name part is).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "profilePictureUrl": {
                "description": "The profile picture: a signed read URL valid 10 to 15 minutes\n ([`crate::avatars`]); `null` without a picture (and in event payloads).",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "givenName",
              "familyName",
              "fullName",
              "email",
              "profilePictureUrl"
            ]
          },
          "baseCurrency": {
            "description": "The currency the member is reimbursed in (ISO 4217); `null`: the org's. The apps\n resolve an amount's currency from it (docs/COMPAT-APP-FIELDS.md).",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "organizationId",
          "userId",
          "role",
          "employeeNumber",
          "isBlocked",
          "deletedAt",
          "managerAccountIds",
          "user",
          "baseCurrency"
        ]
      },
      "UserSummary": {
        "description": "A summary-level user (SPINE 26.1: depth 0; a user as other people see it): the names,\n the e-mail and the avatar, never the phone or the address (a membership's detail adds\n them for those who may read it: identity's `AccountDetailUser`). Built only by\n [`user_summary`] (its loaders [`user_summaries_on`], [`account_summaries_on`]).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "givenName": {
            "type": [
              "string",
              "null"
            ]
          },
          "familyName": {
            "type": [
              "string",
              "null"
            ]
          },
          "fullName": {
            "description": "`users.fullName` (null when either name part is).",
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "profilePictureUrl": {
            "description": "The profile picture: a signed read URL valid 10 to 15 minutes\n ([`crate::avatars`]); `null` without a picture (and in event payloads).",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "givenName",
          "familyName",
          "fullName",
          "email",
          "profilePictureUrl"
        ]
      },
      "OrganizationSummary": {
        "description": "A summary-level organization (SPINE 26.1; RESPONSE-SHAPES section 3): what every\n embed and every organization write answers. `handle` is the org's URL identity (the\n web apps route by it). Built only by identity's `org::read::organization_summary`.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "handle": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "legalName": {
            "type": [
              "string",
              "null"
            ]
          },
          "orgNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "isPersonal": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "handle",
          "displayName",
          "legalName",
          "orgNumber",
          "isPersonal"
        ]
      },
      "DocumentStatus": {
        "description": "A report document's lifecycle (`InvoiceStatus`). Under the status split only\n CREATING → COMPRESSING → CREATED (and FAILED, VOID) are the document's own; the\n delivery outcomes live on the delivery rows.",
        "type": "string",
        "enum": [
          "CREATING",
          "COMPRESSING",
          "CREATED",
          "SENDING",
          "SENT",
          "DELIVERED",
          "FAILED",
          "VOID"
        ],
        "x-enum-open": true
      },
      "InvoiceDeliveryRollupState": {
        "description": "The delivery rollup's state.",
        "type": "string",
        "enum": [
          "NOTHING_WANTED",
          "VOID",
          "NOT_APPLICABLE",
          "FAILED",
          "DELIVERED",
          "HELD",
          "PARTIAL",
          "PENDING"
        ],
        "x-enum-open": true
      },
      "HeldDeliveryExpectation": {
        "description": "Where one HELD delivery of a document stands (`HeldDeliveryExpectationEntity`).",
        "type": "object",
        "properties": {
          "integrationId": {
            "type": "string",
            "format": "uuid"
          },
          "providerId": {
            "description": "The integration's provider id (`unimicro`); null when it is not known.",
            "type": [
              "string",
              "null"
            ]
          },
          "expectation": {
            "description": "A code, the first that applies: RELEASING (a batch has claimed it and is sending\n it), DEFERRED (put off to a later batch), NOT_READY (cannot be sent right now,\n e.g. the report was reopened), PAUSED (the schedule is paused; `expectedAt` is the\n first release after the pause), SCHEDULED (goes out with the next scheduled\n release, at `expectedAt`), MANUAL (waits for somebody to send it). More codes may\n be added: treat an unknown one as waiting.",
            "type": "string"
          },
          "expectedAt": {
            "description": "When it is expected to go out: PAUSED and SCHEDULED only; null otherwise.",
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "integrationId",
          "providerId",
          "expectation",
          "expectedAt"
        ]
      },
      "AttachmentListItem": {
        "description": "A receipt as a list (and every expense level) carries it.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "expenseId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/AttachmentStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "amountIncludingVat": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "amountExcludingVat": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "vatRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "vatAmount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dateTimeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "dateTimeZoneSource": {
            "type": [
              "string",
              "null"
            ]
          },
          "dateHasTime": {
            "type": "boolean"
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ]
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "splitFromAttachmentId": {
            "type": [
              "string",
              "null"
            ]
          },
          "sha256": {
            "description": "The stored bytes' SHA-256 (hex); null until they are verified.",
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "description": "SPINE 26.10 item 3: the receipt's version (also its detail's `ETag`).",
            "type": "integer",
            "format": "int64"
          },
          "captures": {
            "description": "The receipt's readings: on a list row its latest one (none before the first); on\n the detail every one, oldest first.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaptureSummary"
            }
          },
          "url": {
            "description": "A signed read link, valid an hour; absent while the bytes are not stored.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "expenseId",
          "status",
          "createdAt",
          "updatedAt",
          "amountIncludingVat",
          "amountExcludingVat",
          "vatRate",
          "vatAmount",
          "currency",
          "date",
          "dateTimeZone",
          "dateTimeZoneSource",
          "dateHasTime",
          "merchant",
          "description",
          "categoryId",
          "splitFromAttachmentId",
          "sha256",
          "version",
          "captures"
        ]
      },
      "AttachmentStatus": {
        "description": "`AttachmentStatus`: whether the bytes behind the key exist yet.",
        "type": "string",
        "enum": [
          "AWAITING_UPLOAD",
          "STORED",
          "EXPIRED"
        ],
        "x-enum-open": true
      },
      "CaptureSummary": {
        "description": "A receipt's reading at summary level (SPINE 26.1: depth 0): what was read from the\n receipt (amounts in minor units of `currency`), the model's `result` and the\n `assessment` the clients' review screens interpret. The raw OCR text and the run's\n internals (model, prompt profile, timing) are not served; its source and whether a\n fallback read it are (the apps' `Capture` decoders require both).",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "attachmentId": {
            "type": [
              "string",
              "null"
            ]
          },
          "domain": {
            "description": "`RECEIPT`, `ACCOMMODATION`, … (`CaptureDomain`).",
            "type": [
              "string",
              "null"
            ]
          },
          "sourceType": {
            "description": "`ATTACHMENT` or `EMAIL_BODY` (`CaptureSourceType`). Absent where a read does not\n select it.",
            "type": [
              "string",
              "null"
            ]
          },
          "fallbackUsed": {
            "description": "Whether the fallback model produced the reading. Absent where a read does not\n select it.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "amount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "amountIncludingVat": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "amountExcludingVat": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "vatRate": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "vatAmount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dateTimeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "dateHasTime": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ]
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "result": {
            "description": "The model's structured answer, as stored."
          },
          "assessment": {
            "description": "The reading's assessment (document class, signals), as stored."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "attachmentId",
          "domain",
          "amount",
          "amountIncludingVat",
          "amountExcludingVat",
          "vatRate",
          "vatAmount",
          "currency",
          "date",
          "dateTimeZone",
          "dateHasTime",
          "merchant",
          "description",
          "categoryId",
          "result",
          "assessment",
          "createdAt"
        ]
      },
      "DriveDetail": {
        "description": "A drive at detail level, and (not slimmed) a list row: `GET /drives/{id}`, `GET\n /drives?reportId=`, and the report detail's `drives[]`.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "version": {
            "description": "SPINE 26.10 item 3: the drive's version (also its `ETag`).",
            "type": "integer",
            "format": "int64"
          },
          "reportId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "date": {
            "description": "The day driven (midnight UTC); `null` until stated.",
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "distanceMeters": {
            "description": "The whole drive's length, integer metres (both ways for a return trip).",
            "type": "integer",
            "format": "int32"
          },
          "distanceSource": {
            "description": "Where `distanceMeters` came from; `null`: unknown.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "ROUTE",
              "MANUAL",
              null
            ],
            "x-enum-open": true
          },
          "returnTrip": {
            "type": "boolean"
          },
          "vehicle": {
            "type": [
              "string",
              "null"
            ]
          },
          "shouldCalculateToll": {
            "type": "boolean"
          },
          "passengerNumber": {
            "type": "integer",
            "format": "int32"
          },
          "passengerNames": {
            "type": [
              "string",
              "null"
            ]
          },
          "isOffroad": {
            "type": "boolean"
          },
          "hasTrailer": {
            "type": "boolean"
          },
          "mileageRate": {
            "description": "Kroner per kilometre (4 decimals), as priced.",
            "type": "number"
          },
          "passengerRate": {
            "type": "number"
          },
          "trailerRate": {
            "type": "number"
          },
          "offroadRate": {
            "type": "number"
          },
          "currency": {
            "description": "The currency of every amount of the drive (the report's base currency).",
            "type": "string"
          },
          "amount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "mileageAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "tollAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "passengerAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "trailerAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "offroadAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "mileageExemptAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "passengerExemptAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "trailerExemptAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "offroadExemptAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "exemptAmount": {
            "description": "The tax lines' exempt total.",
            "type": "integer",
            "format": "int64"
          },
          "taxableAmount": {
            "description": "`max(amount − exemptAmount, 0)`.",
            "type": "integer",
            "format": "int64"
          },
          "taxLines": {
            "description": "The payroll lines: one per non-zero component.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DriveTaxLine"
            }
          },
          "departmentId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "taxCategoryId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "taxFreeCategoryId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "department": {
            "description": "A summary-level department (SPINE 26.1: depth 0).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "title": {
                "type": "string"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "accountingCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "isPublic": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "organizationId",
              "title",
              "accountingCode",
              "isPublic"
            ]
          },
          "project": {
            "description": "A summary-level project (SPINE 26.1: depth 0): a search hit, a facet's label, a\n cross-aggregate embed.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "title": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "accountingCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "deletedAt": {
                "description": "Set when the project was deleted after something was booked on it: an embed keeps\n pointing at it (a line, a report), so the client can mark it (SPINE 26.1).",
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "organizationId",
              "title",
              "description",
              "accountingCode",
              "deletedAt"
            ]
          },
          "taxCategory": {
            "description": "A summary-level category (SPINE 26.1).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "title": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "accountingCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "visibility": {
                "description": "`VISIBLE` or `HIDDEN`.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "organizationId",
              "title",
              "description",
              "accountingCode",
              "visibility"
            ]
          },
          "taxFreeCategory": {
            "description": "A summary-level category (SPINE 26.1).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "title": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "accountingCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "visibility": {
                "description": "`VISIBLE` or `HIDDEN`.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "organizationId",
              "title",
              "description",
              "accountingCode",
              "visibility"
            ]
          },
          "stops": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DriveStop"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "description": "Set only on a soft-deleted drive (a platform operator's report document,\n `deletedLines`); absent on a live one.",
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "version",
          "reportId",
          "organizationId",
          "date",
          "description",
          "distanceMeters",
          "distanceSource",
          "returnTrip",
          "vehicle",
          "shouldCalculateToll",
          "passengerNumber",
          "passengerNames",
          "isOffroad",
          "hasTrailer",
          "mileageRate",
          "passengerRate",
          "trailerRate",
          "offroadRate",
          "currency",
          "amount",
          "mileageAmount",
          "tollAmount",
          "passengerAmount",
          "trailerAmount",
          "offroadAmount",
          "mileageExemptAmount",
          "passengerExemptAmount",
          "trailerExemptAmount",
          "offroadExemptAmount",
          "exemptAmount",
          "taxableAmount",
          "taxLines",
          "departmentId",
          "projectId",
          "taxCategoryId",
          "taxFreeCategoryId",
          "department",
          "project",
          "taxCategory",
          "taxFreeCategory",
          "stops",
          "createdAt",
          "updatedAt"
        ]
      },
      "DriveTaxLine": {
        "description": "One payroll line of a drive (`DriveTaxLine`): a non-zero component, minor units.",
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "amount": {
            "type": "integer",
            "format": "int64"
          },
          "exemptAmount": {
            "type": "integer",
            "format": "int64"
          },
          "taxableAmount": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "kind",
          "amount",
          "exemptAmount",
          "taxableAmount"
        ]
      },
      "DriveStop": {
        "description": "A stop of a drive (an owned child: it rides every level), in route order: its place\n and the slice of the drive its leg (from the previous stop) carries.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "position": {
            "type": "integer",
            "format": "int32"
          },
          "place": {
            "description": "Where the stop is (`null`: a stop stored before places; its address is `address`).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "MAP_SEARCH",
                  "MAP_PIN",
                  "MANUAL",
                  null
                ],
                "x-enum-open": true
              },
              "provider": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "GOOGLE",
                  null
                ],
                "x-enum-open": true
              },
              "providerPlaceId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "formattedAddress": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "street": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "postalCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "region": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "countryName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "countryCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "cityKey": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "coordinatesAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "organizationId",
              "source",
              "provider",
              "providerPlaceId",
              "name",
              "formattedAddress",
              "street",
              "postalCode",
              "city",
              "region",
              "countryName",
              "countryCode",
              "cityKey",
              "lat",
              "lng",
              "coordinatesAt",
              "createdAt",
              "updatedAt"
            ]
          },
          "address": {
            "description": "The address a stop stored before places was saved with (Nest's `address`), when it\n has no place; absent with a place (its `name`).",
            "type": [
              "string",
              "null"
            ]
          },
          "distanceMeters": {
            "description": "The leg ending here, metres; `null` on the first stop.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "mileageAmount": {
            "description": "The leg's slices of the drive's components, minor units of the drive's currency.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "tollAmount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "passengerAmount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "trailerAmount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "offroadAmount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "id",
          "position",
          "place",
          "distanceMeters",
          "mileageAmount",
          "tollAmount",
          "passengerAmount",
          "trailerAmount",
          "offroadAmount"
        ]
      },
      "ExpenseListItem": {
        "description": "An expense as a list (and the report detail) carries it: its row's columns, its\n embeds as summaries, its owned children as their list rows.",
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "costsRevision": {
            "description": "Revision of the cost composition (every financial write bumps it).",
            "type": "integer",
            "format": "int32"
          },
          "id": {
            "description": "As stored (a client-minted id keeps the client's spelling).",
            "type": "string"
          },
          "version": {
            "description": "SPINE 26.10 item 3: the expense's version (also its detail's `ETag`).",
            "type": "integer",
            "format": "int64"
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dateTimeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "dateHasTime": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "amount": {
            "description": "Minor units of `currency`.",
            "type": "integer",
            "format": "int64"
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ]
          },
          "departmentId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "reportId": {
            "type": "string"
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "paymentMethod": {
            "description": "`PaymentMethod`: how an expense was paid.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "CARD",
              "COMPANY_CARD",
              "INVOICE",
              "WALLET",
              null
            ],
            "x-enum-open": true
          },
          "paymentCardId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "walletId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchangeRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "exchangeRateSource": {
            "description": "`ExchangeRateSource`: SERVICE when this server quoted (or priced an identity pair at\n parity), MANUAL when a person typed it; `None` when unknown.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "SERVICE",
              "MANUAL",
              null
            ],
            "x-enum-open": true
          },
          "minorUnitScale": {
            "type": "number"
          },
          "amountInBaseCurrency": {
            "description": "Minor units of the report's base currency.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "vatRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "vatAmount": {
            "description": "Minor units of `currency`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "isVatDeductible": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "category": {
            "description": "A summary-level category (SPINE 26.1).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "title": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "accountingCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "visibility": {
                "description": "`VISIBLE` or `HIDDEN`.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "organizationId",
              "title",
              "description",
              "accountingCode",
              "visibility"
            ]
          },
          "department": {
            "description": "A summary-level department (SPINE 26.1: depth 0).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "title": {
                "type": "string"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "accountingCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "isPublic": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "organizationId",
              "title",
              "accountingCode",
              "isPublic"
            ]
          },
          "project": {
            "description": "A summary-level project (SPINE 26.1: depth 0): a search hit, a facet's label, a\n cross-aggregate embed.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "title": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "accountingCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "deletedAt": {
                "description": "Set when the project was deleted after something was booked on it: an embed keeps\n pointing at it (a line, a report), so the client can mark it (SPINE 26.1).",
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "organizationId",
              "title",
              "description",
              "accountingCode",
              "deletedAt"
            ]
          },
          "paymentCard": {
            "description": "A summary-level payment card (SPINE 26.1: depth 0): what a line that carries one\n embeds (`paymentCard`). Of the card number only its last four digits are served (what\n the receipt prints, so «Betaling» names the card). A removed card still embeds\n (`deletedAt` set): a line names the card it was paid with.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "description": {
                "type": "string"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "last4": {
                "description": "The card number's last four digits.",
                "type": "string"
              },
              "brand": {
                "type": "string"
              },
              "cardType": {
                "description": "`DEBIT` or `CREDIT`; null when not stated.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "isDefault": {
                "type": "boolean"
              },
              "organizationId": {
                "description": "Null on a personal card.",
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "userId": {
                "type": "string",
                "format": "uuid"
              },
              "createdAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "updatedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "deletedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "last4",
              "brand",
              "cardType",
              "description",
              "isDefault",
              "organizationId",
              "userId",
              "deletedAt"
            ]
          },
          "costs": {
            "description": "The stored cost composition, by position (empty for a legacy expense).",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostListItem"
            }
          },
          "attachments": {
            "description": "The live receipts, by id.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentListItem"
            }
          },
          "inboxItems": {
            "description": "The inbox items the expense was made from.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InboxItemSummary"
            }
          },
          "invoiceDetected": {
            "description": "Whether the receipts' readings say an invoice (absent when they do not say).",
            "type": [
              "boolean",
              "null"
            ]
          },
          "deletedAt": {
            "description": "Set only on a soft-deleted expense (a platform operator's report document,\n `deletedLines`); absent on a live one.",
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "costsRevision",
          "id",
          "version",
          "date",
          "dateTimeZone",
          "dateHasTime",
          "amount",
          "title",
          "merchant",
          "description",
          "departmentId",
          "projectId",
          "reportId",
          "categoryId",
          "createdAt",
          "updatedAt",
          "paymentMethod",
          "paymentCardId",
          "walletId",
          "currency",
          "exchangeRate",
          "exchangeRateSource",
          "minorUnitScale",
          "amountInBaseCurrency",
          "vatRate",
          "vatAmount",
          "isVatDeductible",
          "organizationId",
          "category",
          "department",
          "project",
          "paymentCard",
          "costs",
          "attachments",
          "inboxItems"
        ]
      },
      "CostListItem": {
        "description": "One cost as the expense's levels carry it (an owned child, SPINE 26.1): its own\n columns, its tax components and dimension selections (value objects) and its\n category's summary. A cost id is not an expense id (cost views, Q31, are not served).",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "position": {
            "type": "integer",
            "format": "int32"
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "category": {
            "description": "A summary-level category (SPINE 26.1).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "title": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "accountingCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "visibility": {
                "description": "`VISIBLE` or `HIDDEN`.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "organizationId",
              "title",
              "description",
              "accountingCode",
              "visibility"
            ]
          },
          "role": {
            "$ref": "#/components/schemas/CostRole"
          },
          "grossAmount": {
            "description": "Minor units of the expense's currency.",
            "type": "integer",
            "format": "int64"
          },
          "amountInBaseCurrency": {
            "description": "Minor units of the report's base currency.",
            "type": "integer",
            "format": "int64"
          },
          "taxState": {
            "$ref": "#/components/schemas/TaxState"
          },
          "accommodationId": {
            "description": "The stay this cost is claimed under, if any.",
            "type": [
              "string",
              "null"
            ]
          },
          "taxComponents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostTaxDto"
            }
          },
          "dimensions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostDimensionDto"
            }
          },
          "origin": {
            "description": "How the cost came to be (`MANUAL`, or the capture or split that made it).",
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "position",
          "description",
          "categoryId",
          "category",
          "role",
          "grossAmount",
          "amountInBaseCurrency",
          "taxState",
          "accommodationId",
          "taxComponents",
          "dimensions",
          "origin",
          "createdAt",
          "updatedAt"
        ]
      },
      "CostRole": {
        "description": "`ExpenseCostRole`.",
        "type": "string",
        "enum": [
          "GENERAL",
          "LODGING",
          "BREAKFAST"
        ],
        "x-enum-open": true
      },
      "TaxState": {
        "description": "`CostTaxState`.",
        "type": "string",
        "enum": [
          "UNKNOWN",
          "KNOWN"
        ],
        "x-enum-open": true
      },
      "CostTaxDto": {
        "description": "One tax component on the wire.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/TaxKind"
          },
          "jurisdiction": {
            "type": [
              "string",
              "null"
            ]
          },
          "ratePercent": {
            "description": "Percent as decimal text (`\"25\"`, `\"12.5\"`).",
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "description": "Minor units.",
            "type": "integer",
            "format": "int64"
          },
          "recoveryStatus": {
            "description": "Whether its VAT recovery is decided (`UNRESOLVED`, `RESOLVED`): on the expense's\n levels, not on a composition (`/expenses/{id}/costs`).",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "UNRESOLVED",
              "RESOLVED",
              null
            ],
            "x-enum-open": true
          }
        },
        "required": [
          "id",
          "kind",
          "jurisdiction",
          "ratePercent",
          "amount"
        ]
      },
      "TaxKind": {
        "description": "The only tax kind a cost carries today.",
        "type": "string",
        "enum": [
          "VAT"
        ],
        "x-enum-open": true
      },
      "RecoveryStatus": {
        "description": "`recoveryStatus`.",
        "type": "string",
        "enum": [
          "UNRESOLVED",
          "RESOLVED"
        ],
        "x-enum-open": true
      },
      "CostDimensionDto": {
        "description": "One dimension selection on the wire.",
        "type": "object",
        "properties": {
          "definitionId": {
            "type": "string"
          },
          "valueId": {
            "type": "string"
          }
        },
        "required": [
          "definitionId",
          "valueId"
        ]
      },
      "InboxItemSummary": {
        "description": "An inbox item's own scalars (what an item write answers, and what the expense it\n became embeds). `amount` is in minor units.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "from": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ]
          },
          "reservationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "`InboxItemStatus`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "RESERVED",
              "CLEARED",
              null
            ],
            "x-enum-open": true
          },
          "source": {
            "$ref": "#/components/schemas/InboxItemSource"
          },
          "organizationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "expenseId": {
            "type": [
              "string",
              "null"
            ]
          },
          "inboxId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        },
        "required": [
          "id",
          "createdAt",
          "updatedAt",
          "from",
          "amount",
          "currency",
          "date",
          "merchant",
          "description",
          "reservationId",
          "status",
          "source",
          "organizationId",
          "expenseId",
          "inboxId"
        ]
      },
      "InboxItemSource": {
        "description": "`InboxItemSource`.",
        "type": "string",
        "enum": [
          "EMAIL",
          "CHAT",
          "MANUAL",
          "CARD"
        ],
        "x-enum-descriptions": [
          "",
          "",
          "",
          "A purchase on a payment card linked to X-Receipts (Nest #1440, appended last)."
        ],
        "x-enum-open": true
      },
      "InvoiceListItem": {
        "description": "A report document (invoice) as a list row (SPINE 26.1): its scalars (never the\n storage keys), its deliveries' read shapes, the summary computed from them, the holds\n and its organization's summary.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/DocumentStatus"
          },
          "deliveredAs": {
            "type": [
              "string",
              "null"
            ]
          },
          "errorDescription": {
            "type": [
              "string",
              "null"
            ]
          },
          "ehfMessageNumber": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "emailDeliveredAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "ehfSentAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "deliveryRequestedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "destinationsResolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "pdfAttempt": {
            "type": "integer",
            "format": "int32"
          },
          "invoiceNumber": {
            "type": "integer",
            "format": "int32"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "reportId": {
            "type": "string"
          },
          "orgNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "organization": {
            "description": "The organization (the invoice's tenant).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "handle": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              },
              "legalName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "orgNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "isPersonal": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "handle",
              "displayName",
              "legalName",
              "orgNumber",
              "isPersonal"
            ]
          },
          "deliveries": {
            "description": "The read shape of each delivery (never `target`).",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceDelivery"
            }
          },
          "deliverySummary": {
            "description": "Computed per read from the deliveries; absent while the destinations are unknown\n (as the report document embeds the invoice).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "state": {
                "$ref": "#/components/schemas/InvoiceDeliveryRollupState"
              },
              "total": {
                "description": "Destinations counted: every delivery except VOID and SKIPPED.",
                "type": "integer",
                "format": "uint",
                "minimum": 0
              },
              "settled": {
                "type": "integer",
                "format": "uint",
                "minimum": 0
              },
              "failed": {
                "type": "integer",
                "format": "uint",
                "minimum": 0
              },
              "held": {
                "description": "Deliberately waiting for a batch release: neither settled, failed nor pending.",
                "type": "integer",
                "format": "uint",
                "minimum": 0
              },
              "pending": {
                "description": "Neither settled, failed nor held: PENDING, or SENT awaiting confirmation.",
                "type": "integer",
                "format": "uint",
                "minimum": 0
              }
            },
            "required": [
              "state",
              "total",
              "settled",
              "failed",
              "held",
              "pending"
            ]
          },
          "heldDeliveries": {
            "description": "Where each HELD delivery stands; absent when none is held (as the report document\n embeds the invoice).",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HeldDeliveryExpectation"
            }
          },
          "report": {
            "description": "The invoice's report (SPINE 26.1 rule 4: the other aggregate's summary); `null` when\n the caller no longer sees it (removed, or outside its reach).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "title": {
                "description": "The report's name (SPINE 26.2): the user's, or generated from its content; `null`:\n the client shows its own placeholder.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "description": "Deprecated: use `presentation` and `travelId`. The compat type derived from the\n report's content (a søknad serializes `EXPENSEGROUP`; `kind` carries the real\n discriminator).",
                "$ref": "#/components/schemas/ReportType",
                "deprecated": true
              },
              "id": {
                "type": "string"
              },
              "version": {
                "description": "SPINE 26.10 item 3: the report's version; send it back as `If-Match`.",
                "type": "integer",
                "format": "int64"
              },
              "status": {
                "$ref": "#/components/schemas/ReportStatus"
              },
              "amount": {
                "description": "Minor units of `baseCurrency`.",
                "type": "integer",
                "format": "int64"
              },
              "baseCurrency": {
                "type": "string"
              },
              "accountId": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "titleSource": {
                "$ref": "#/components/schemas/ReportTitleSource"
              },
              "shouldReinvoice": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "departmentId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "projectId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "travelId": {
                "description": "The report's travel (SPINE 26.12.2: a relation is its id); `null`: no travel.",
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "reviewComment": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              },
              "deletedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "publishedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "submittedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "_count": {
                "$ref": "#/components/schemas/ReportCounts"
              },
              "presentation": {
                "description": "`SINGLE`: an implicit wrapper of exactly one line, an expense or a drive (a per diem\n counts as a line; no travel or travel request); `GROUP` otherwise, an empty report\n included.",
                "$ref": "#/components/schemas/ReportPresentation"
              },
              "kind": {
                "$ref": "#/components/schemas/ReportKind"
              },
              "leadLine": {
                "description": "On a standalone expense report (`SINGLE` with one expense) its one expense; `null`\n otherwise (a lone drive's too).",
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "title": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "expenseId": {
                    "type": "string"
                  },
                  "merchant": {
                    "description": "The expense's own merchant, else its first live receipt's.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "categoryId": {
                    "description": "The category's id (SPINE 26.12.2: a relation is its id); `null` with `category`.",
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "category": {
                    "description": "A summary-level category (SPINE 26.1).",
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "title": {
                        "type": "string"
                      },
                      "description": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "organizationId": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "accountingCode": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "visibility": {
                        "description": "`VISIBLE` or `HIDDEN`.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "title",
                      "description",
                      "accountingCode",
                      "visibility"
                    ]
                  }
                },
                "required": [
                  "expenseId",
                  "title",
                  "merchant",
                  "categoryId",
                  "category"
                ]
              },
              "period": {
                "description": "`null` when no line has a date.",
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "firstDay": {
                    "type": "string"
                  },
                  "lastDay": {
                    "type": "string"
                  }
                },
                "required": [
                  "firstDay",
                  "lastDay"
                ]
              },
              "missingDateCount": {
                "description": "Live lines with no date that are not still uploading.",
                "type": "integer",
                "format": "int64"
              },
              "travel": {
                "description": "The report's travel (an owned child, SPINE 26.2), or null.",
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "version": {
                    "description": "SPINE 26.10 item 3: the travel's version; send it back as `If-Match`.",
                    "type": "integer",
                    "format": "int64"
                  },
                  "reportId": {
                    "type": "string"
                  },
                  "organizationId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "fromDateTime": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "toDateTime": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "businessStartAt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "businessStartTimeZone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "businessEndAt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "businessEndTimeZone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "privateInterruptions": {
                    "description": "Null when none were declared.",
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "$ref": "#/components/schemas/PrivateInterruption"
                    }
                  },
                  "fromPlace": {
                    "description": "`PlaceEntity`: a stored place, Prisma's field order.",
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "organizationId": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "source": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "MAP_SEARCH",
                          "MAP_PIN",
                          "MANUAL",
                          null
                        ],
                        "x-enum-open": true
                      },
                      "provider": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "GOOGLE",
                          null
                        ],
                        "x-enum-open": true
                      },
                      "providerPlaceId": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "formattedAddress": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "street": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "postalCode": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "city": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "region": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "countryName": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "countryCode": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "cityKey": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "lat": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "double"
                      },
                      "lng": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "double"
                      },
                      "coordinatesAt": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "source",
                      "provider",
                      "providerPlaceId",
                      "name",
                      "formattedAddress",
                      "street",
                      "postalCode",
                      "city",
                      "region",
                      "countryName",
                      "countryCode",
                      "cityKey",
                      "lat",
                      "lng",
                      "coordinatesAt",
                      "createdAt",
                      "updatedAt"
                    ]
                  },
                  "toPlace": {
                    "description": "`PlaceEntity`: a stored place, Prisma's field order.",
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "organizationId": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "source": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "MAP_SEARCH",
                          "MAP_PIN",
                          "MANUAL",
                          null
                        ],
                        "x-enum-open": true
                      },
                      "provider": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "GOOGLE",
                          null
                        ],
                        "x-enum-open": true
                      },
                      "providerPlaceId": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "formattedAddress": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "street": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "postalCode": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "city": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "region": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "countryName": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "countryCode": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "cityKey": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "lat": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "double"
                      },
                      "lng": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "double"
                      },
                      "coordinatesAt": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "source",
                      "provider",
                      "providerPlaceId",
                      "name",
                      "formattedAddress",
                      "street",
                      "postalCode",
                      "city",
                      "region",
                      "countryName",
                      "countryCode",
                      "cityKey",
                      "lat",
                      "lng",
                      "coordinatesAt",
                      "createdAt",
                      "updatedAt"
                    ]
                  },
                  "purpose": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "typeOfAccommodation": {
                    "$ref": "#/components/schemas/TravelAccommodationType"
                  },
                  "currency": {
                    "type": "string"
                  },
                  "advanceAmount": {
                    "description": "Minor units of the currency (øre for NOK).",
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64"
                  },
                  "rateLevel": {
                    "$ref": "#/components/schemas/TravelRateLevel"
                  },
                  "perDiemDisabled": {
                    "type": "boolean"
                  },
                  "travelRequestId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "dietSchemeVersionId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "id",
                  "version",
                  "reportId",
                  "organizationId",
                  "fromDateTime",
                  "toDateTime",
                  "businessStartAt",
                  "businessStartTimeZone",
                  "businessEndAt",
                  "businessEndTimeZone",
                  "privateInterruptions",
                  "fromPlace",
                  "toPlace",
                  "purpose",
                  "typeOfAccommodation",
                  "currency",
                  "advanceAmount",
                  "rateLevel",
                  "perDiemDisabled",
                  "travelRequestId",
                  "dietSchemeVersionId",
                  "createdAt",
                  "updatedAt"
                ]
              },
              "travelRequest": {
                "description": "The søknad (an owned child), or null.",
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "version": {
                    "description": "SPINE 26.10 item 3: the request's version; send it back as `If-Match`.",
                    "type": "integer",
                    "format": "int64"
                  },
                  "reportId": {
                    "type": "string"
                  },
                  "organizationId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "purpose": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "fromDateTime": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "toDateTime": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "fromPlace": {
                    "description": "`PlaceEntity`: a stored place, Prisma's field order.",
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "organizationId": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "source": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "MAP_SEARCH",
                          "MAP_PIN",
                          "MANUAL",
                          null
                        ],
                        "x-enum-open": true
                      },
                      "provider": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "GOOGLE",
                          null
                        ],
                        "x-enum-open": true
                      },
                      "providerPlaceId": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "formattedAddress": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "street": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "postalCode": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "city": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "region": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "countryName": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "countryCode": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "cityKey": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "lat": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "double"
                      },
                      "lng": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "double"
                      },
                      "coordinatesAt": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "source",
                      "provider",
                      "providerPlaceId",
                      "name",
                      "formattedAddress",
                      "street",
                      "postalCode",
                      "city",
                      "region",
                      "countryName",
                      "countryCode",
                      "cityKey",
                      "lat",
                      "lng",
                      "coordinatesAt",
                      "createdAt",
                      "updatedAt"
                    ]
                  },
                  "toPlace": {
                    "description": "`PlaceEntity`: a stored place, Prisma's field order.",
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "organizationId": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "source": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "MAP_SEARCH",
                          "MAP_PIN",
                          "MANUAL",
                          null
                        ],
                        "x-enum-open": true
                      },
                      "provider": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "GOOGLE",
                          null
                        ],
                        "x-enum-open": true
                      },
                      "providerPlaceId": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "formattedAddress": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "street": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "postalCode": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "city": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "region": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "countryName": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "countryCode": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "cityKey": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "lat": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "double"
                      },
                      "lng": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "double"
                      },
                      "coordinatesAt": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "source",
                      "provider",
                      "providerPlaceId",
                      "name",
                      "formattedAddress",
                      "street",
                      "postalCode",
                      "city",
                      "region",
                      "countryName",
                      "countryCode",
                      "cityKey",
                      "lat",
                      "lng",
                      "coordinatesAt",
                      "createdAt",
                      "updatedAt"
                    ]
                  },
                  "currency": {
                    "type": "string"
                  },
                  "estimatedCost": {
                    "description": "Minor units of the currency (øre for NOK).",
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64"
                  },
                  "requestedAdvanceAmount": {
                    "description": "Minor units of the currency (øre for NOK).",
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64"
                  },
                  "ownCarApprovalRequested": {
                    "type": "boolean"
                  },
                  "premiumClassApprovalRequested": {
                    "type": "boolean"
                  },
                  "travelRequestNumber": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int32"
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "id",
                  "version",
                  "reportId",
                  "organizationId",
                  "purpose",
                  "fromDateTime",
                  "toDateTime",
                  "fromPlace",
                  "toPlace",
                  "currency",
                  "estimatedCost",
                  "requestedAdvanceAmount",
                  "ownCarApprovalRequested",
                  "premiumClassApprovalRequested",
                  "travelRequestNumber",
                  "createdAt",
                  "updatedAt"
                ]
              }
            },
            "required": [
              "id",
              "version",
              "status",
              "type",
              "amount",
              "baseCurrency",
              "accountId",
              "organizationId",
              "title",
              "titleSource",
              "description",
              "shouldReinvoice",
              "departmentId",
              "projectId",
              "travelId",
              "reviewComment",
              "createdAt",
              "updatedAt",
              "deletedAt",
              "publishedAt",
              "submittedAt",
              "_count",
              "presentation",
              "kind",
              "leadLine",
              "period",
              "missingDateCount",
              "travel",
              "travelRequest"
            ]
          }
        },
        "required": [
          "id",
          "status",
          "deliveredAs",
          "errorDescription",
          "ehfMessageNumber",
          "emailDeliveredAt",
          "ehfSentAt",
          "deliveryRequestedAt",
          "destinationsResolvedAt",
          "pdfAttempt",
          "invoiceNumber",
          "dueDate",
          "createdAt",
          "updatedAt",
          "organizationId",
          "reportId",
          "orgNumber",
          "organization",
          "deliveries",
          "report"
        ]
      },
      "InvoiceDelivery": {
        "description": "One wanted destination of the document and its state (`ReportDeliveryEntity`).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "$ref": "#/components/schemas/DeliveryChannel"
          },
          "destinationKey": {
            "description": "`EHF` | `EMAIL` | `INTEGRATION:<integrationId>`.",
            "type": "string"
          },
          "integrationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "state": {
            "$ref": "#/components/schemas/DeliveryState"
          },
          "expectsConfirmation": {
            "description": "False: the handoff (SENT) settles it. True: the receiver confirms DELIVERED later.",
            "type": "boolean"
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time"
          },
          "sentAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "confirmedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "errorCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "errorDescription": {
            "type": [
              "string",
              "null"
            ]
          },
          "attempts": {
            "type": "integer",
            "format": "int32"
          },
          "lastAttemptAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "provider": {
            "description": "The integration's provider id (`visma-business-nxt`).",
            "type": [
              "string",
              "null"
            ]
          },
          "latestAttempt": {
            "description": "A delivery's latest attempt (`ReportDeliveryLatestAttemptEntity`).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "number": {
                "type": "integer",
                "format": "int32"
              },
              "trigger": {
                "$ref": "#/components/schemas/AttemptTrigger"
              },
              "outcome": {
                "description": "Null while the attempt is open.",
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "LANDED",
                  "LANDED_NEEDS_ATTENTION",
                  "NOTHING_LANDED",
                  "WRITE_UNKNOWN",
                  "PENDING",
                  "BLOCKED",
                  "SKIPPED",
                  null
                ],
                "x-enum-open": true
              },
              "errorCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "errorDetail": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "openedAt": {
                "type": "string",
                "format": "date-time"
              },
              "closedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "resolvedOutcome": {
                "description": "How an attempt closed (`ReportDeliveryAttemptOutcome`).",
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "LANDED",
                  "LANDED_NEEDS_ATTENTION",
                  "NOTHING_LANDED",
                  "WRITE_UNKNOWN",
                  "PENDING",
                  "BLOCKED",
                  "SKIPPED",
                  null
                ],
                "x-enum-open": true
              },
              "resolvedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "required": [
              "number",
              "trigger",
              "outcome",
              "errorCode",
              "errorDetail",
              "openedAt",
              "closedAt",
              "resolvedOutcome",
              "resolvedAt"
            ]
          }
        },
        "required": [
          "id",
          "channel",
          "destinationKey",
          "integrationId",
          "state",
          "expectsConfirmation",
          "requestedAt",
          "sentAt",
          "confirmedAt",
          "errorCode",
          "errorDescription",
          "attempts",
          "lastAttemptAt",
          "provider",
          "latestAttempt"
        ]
      },
      "DeliveryChannel": {
        "description": "Where a delivery goes (`ReportDeliveryChannel`).",
        "type": "string",
        "enum": [
          "EHF",
          "EMAIL",
          "INTEGRATION"
        ],
        "x-enum-open": true
      },
      "DeliveryState": {
        "description": "A delivery's state (`ReportDeliveryState`): PENDING < SENT < DELIVERED with FAILED\n a side state; SKIPPED and VOID terminal; HELD outside the order (left only by a\n batch release, a leak or a withdrawal).",
        "type": "string",
        "enum": [
          "PENDING",
          "SENT",
          "DELIVERED",
          "FAILED",
          "SKIPPED",
          "VOID",
          "HELD"
        ],
        "x-enum-open": true
      },
      "AttemptTrigger": {
        "description": "Why an attempt opened (`ReportDeliveryAttemptTrigger`).",
        "type": "string",
        "enum": [
          "INITIAL",
          "SWEEP",
          "OPERATOR_REDRIVE",
          "LEGACY_WRITEBACK",
          "BATCH_RELEASE",
          "REAPPROVAL"
        ],
        "x-enum-descriptions": [
          "",
          "",
          "",
          "",
          "",
          "A published report approved again: its FAILED integration delivery sent once\n more (nothing can have landed), so the provider reads the amended report."
        ],
        "x-enum-open": true
      },
      "Payout": {
        "description": "A membership's payout details (`GET /accounts/{id}/payout`, SPINE 26.12.4): a singleton\n sub-resource of the account (AIP-156), read-only projections of the member's user row.",
        "type": "object",
        "properties": {
          "id": {
            "description": "The singleton's id: its account's (`accountId`), so an include keys it by the account.",
            "type": "string",
            "format": "uuid"
          },
          "accountId": {
            "description": "The account (membership) these are the payout details of.",
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "userId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "givenName": {
            "type": [
              "string",
              "null"
            ]
          },
          "familyName": {
            "type": [
              "string",
              "null"
            ]
          },
          "fullName": {
            "type": [
              "string",
              "null"
            ]
          },
          "accountNumber": {
            "description": "The bank account the member's expenses are paid out to (`users.accountNumber`).",
            "type": [
              "string",
              "null"
            ]
          },
          "phoneNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "streetAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "postalCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "accountId",
          "organizationId",
          "userId",
          "givenName",
          "familyName",
          "fullName",
          "accountNumber",
          "phoneNumber",
          "streetAddress",
          "postalCode",
          "region"
        ]
      },
      "PerDiemDetail": {
        "description": "A per diem at detail level, and (not slimmed) a list row: `GET /per-diems/{id}`, `GET\n /per-diems?reportId=`, and the report detail's `perDiems[]`.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "description": "SPINE 26.10 item 3: the per diem's version (also its `ETag`).",
            "type": "integer",
            "format": "int64"
          },
          "reportId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "date": {
            "description": "The døgn's day (midnight UTC).",
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "isHalfDay": {
            "type": "boolean"
          },
          "dognIndex": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "periodStart": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "periodEnd": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "isFullDogn": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "stayBreakfast": {
            "type": "boolean"
          },
          "mealSelections": {
            "description": "The settled meal facts, by date; null on a row that keeps its meals in the three\n flags only (clients read the null: no dated meal edits on it).",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/MealSelection"
            }
          },
          "status": {
            "$ref": "#/components/schemas/PerDiemStatus"
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "countrySource": {
            "description": "Where a per diem's country came from (`PerDiemCountrySource`).",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "STAY",
              "DESTINATION_PROXY",
              "DAY_TRIP",
              null
            ],
            "x-enum-open": true
          },
          "breakfast": {
            "type": "boolean"
          },
          "lunch": {
            "type": "boolean"
          },
          "dinner": {
            "type": "boolean"
          },
          "currency": {
            "description": "The currency of every amount of the per diem (the report's base currency).",
            "type": "string"
          },
          "fullFareAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "fullFareExemptAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "taxAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "exemptAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "amount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "compensationAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "nightSupplementAmount": {
            "description": "Nattillegg uten kvittering folded into `amount` for the nights this døgn holds;\n null when it holds none.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "nightSupplementExemptAmount": {
            "description": "The trekkfri slice of `nightSupplementAmount`, included in `exemptAmount`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "nightSupplementNights": {
            "description": "Statutory nights (22–06) paid as nattillegg on this døgn row.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "fareAmount": {
            "description": "The kost part of `amount`: less kompensasjonstillegg and nattillegg (what a day row\n shows once the supplements are their own lines); null without an amount.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "taxableAmount": {
            "description": "`max(amount − exemptAmount, 0)`.",
            "type": "integer",
            "format": "int64"
          },
          "breakdown": {
            "description": "How a per diem's amount is made (`PerDiemBreakdown`): the rate, the deducted meals,\n the net; minor units of the per diem's currency.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "rateLabelKey": {
                "description": "A code the client words (`PER_DIEM_TAXFREE_…`, a category's title key).",
                "type": "string"
              },
              "rateMinor": {
                "type": "integer",
                "format": "int64"
              },
              "lines": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PerDiemBreakdownLine"
                }
              },
              "netMinor": {
                "type": "integer",
                "format": "int64"
              },
              "compensationMinor": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              },
              "nightSupplementMinor": {
                "description": "Nattillegg folded into the amount; netMinor + compensationMinor +\n nightSupplementMinor is the row amount. A scalar, never a line.",
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              }
            },
            "required": [
              "rateLabelKey",
              "rateMinor",
              "lines",
              "netMinor",
              "compensationMinor",
              "nightSupplementMinor"
            ]
          },
          "exemptCriteria": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "PER_DIEM_TAX_ABROAD_COMPENSATION",
              "PER_DIEM_TAX_FROM_6_TO_12_HOURS",
              "PER_DIEM_TAX_OVER_12_HOURS_WITHOUT_ACCOMMODATION",
              "PER_DIEM_TAX_OVER_12_HOURS_WITH_ACCOMMODATION",
              "DRIVE_TAX_MILEAGE",
              "DRIVE_TAX_MILEAGE_WITH_PASSENGER",
              "DRIVE_TAX_MILEAGE_WITH_TRAILER",
              "DRIVE_TAX_MILEAGE_OFFROAD",
              "PER_DIEM_TAXFREE_FROM_6_TO_12_HOURS",
              "PER_DIEM_TAXFREE_OVER_12_HOURS_WITHOUT_ACCOMMODATION",
              "PER_DIEM_TAXFREE_OVERNIGHT_WITH_HOTEL",
              "PER_DIEM_TAXFREE_OVERNIGHT_WITH_COOKING",
              "PER_DIEM_TAXFREE_OVERNIGHT_WITHOUT_COOKING",
              "PER_DIEM_TAXFREE_OVERNIGHT_TRUCKER",
              "PER_DIEM_TAXFREE_NIGHT_DOMESTIC",
              "DRIVE_TAXFREE_MILEAGE",
              "DRIVE_TAXFREE_MILEAGE_WITH_PASSENGER",
              "DRIVE_TAXFREE_MILEAGE_WITH_TRAILER",
              "DRIVE_TAXFREE_MILEAGE_OFFROAD",
              null
            ],
            "x-enum-open": true
          },
          "taxCategoryId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "taxFreeCategoryId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "rateId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "travelAccommodationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "taxCategory": {
            "description": "A summary-level category (SPINE 26.1).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "title": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "accountingCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "visibility": {
                "description": "`VISIBLE` or `HIDDEN`.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "organizationId",
              "title",
              "description",
              "accountingCode",
              "visibility"
            ]
          },
          "taxFreeCategory": {
            "description": "A summary-level category (SPINE 26.1).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "title": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "accountingCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "visibility": {
                "description": "`VISIBLE` or `HIDDEN`.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "organizationId",
              "title",
              "description",
              "accountingCode",
              "visibility"
            ]
          },
          "rate": {
            "description": "The rate a per diem was priced from (a value object: its id, title and criteria).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "title": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "criteria": {
                "$ref": "#/components/schemas/RateCriteria"
              }
            },
            "required": [
              "id",
              "title",
              "criteria"
            ]
          },
          "projectId": {
            "description": "The covering stay's project, else the report's (derived, not stored).",
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "project": {
            "description": "A summary-level project (SPINE 26.1: depth 0): a search hit, a facet's label, a\n cross-aggregate embed.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "title": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "accountingCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "deletedAt": {
                "description": "Set when the project was deleted after something was booked on it: an embed keeps\n pointing at it (a line, a report), so the client can mark it (SPINE 26.1).",
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "organizationId",
              "title",
              "description",
              "accountingCode",
              "deletedAt"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "description": "Set on a soft-deleted row (`GET /per-diems/{id}` still answers it).",
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "version",
          "reportId",
          "organizationId",
          "date",
          "isHalfDay",
          "dognIndex",
          "periodStart",
          "periodEnd",
          "isFullDogn",
          "stayBreakfast",
          "mealSelections",
          "status",
          "country",
          "countrySource",
          "breakfast",
          "lunch",
          "dinner",
          "currency",
          "fullFareAmount",
          "fullFareExemptAmount",
          "taxAmount",
          "exemptAmount",
          "amount",
          "compensationAmount",
          "nightSupplementAmount",
          "nightSupplementExemptAmount",
          "nightSupplementNights",
          "fareAmount",
          "taxableAmount",
          "breakdown",
          "exemptCriteria",
          "taxCategoryId",
          "taxFreeCategoryId",
          "rateId",
          "travelAccommodationId",
          "taxCategory",
          "taxFreeCategory",
          "rate",
          "projectId",
          "project",
          "createdAt",
          "updatedAt",
          "deletedAt"
        ]
      },
      "MealSelection": {
        "description": "One settled meal fact (`MealSelection`): `isOn` false means the meal was provided.",
        "type": "object",
        "properties": {
          "date": {
            "description": "`YYYY-MM-DD`, Europe/Oslo.",
            "type": "string"
          },
          "meal": {
            "description": "`breakfast`, `lunch` or `dinner`.",
            "type": "string"
          },
          "isOn": {
            "type": "boolean"
          },
          "source": {
            "description": "`STAY` (the stay's breakfast) or `USER`.",
            "type": "string"
          }
        },
        "required": [
          "date",
          "meal",
          "isOn",
          "source"
        ]
      },
      "PerDiemStatus": {
        "description": "A per diem's state (`PerDiemStatus`).",
        "type": "string",
        "enum": [
          "COMPENSATED",
          "EXCLUDED",
          "MISSING_ACCOMMODATION",
          "PRICING_UNAVAILABLE"
        ],
        "x-enum-open": true
      },
      "PerDiemBreakdownLine": {
        "description": "One deducted meal of a breakdown.",
        "type": "object",
        "properties": {
          "mealKey": {
            "type": "string"
          },
          "date": {
            "type": [
              "string",
              "null"
            ]
          },
          "sharePct": {
            "type": "integer",
            "format": "uint8",
            "minimum": 0,
            "maximum": 255
          },
          "deductionMinor": {
            "description": "Minor units.",
            "type": "integer",
            "format": "int64"
          },
          "source": {
            "type": "string"
          }
        },
        "required": [
          "mealKey",
          "date",
          "sharePct",
          "deductionMinor",
          "source"
        ]
      },
      "RateCriteria": {
        "type": "string",
        "enum": [
          "PER_DIEM_TAX_ABROAD_COMPENSATION",
          "PER_DIEM_TAX_FROM_6_TO_12_HOURS",
          "PER_DIEM_TAX_OVER_12_HOURS_WITHOUT_ACCOMMODATION",
          "PER_DIEM_TAX_OVER_12_HOURS_WITH_ACCOMMODATION",
          "DRIVE_TAX_MILEAGE",
          "DRIVE_TAX_MILEAGE_WITH_PASSENGER",
          "DRIVE_TAX_MILEAGE_WITH_TRAILER",
          "DRIVE_TAX_MILEAGE_OFFROAD",
          "PER_DIEM_TAXFREE_FROM_6_TO_12_HOURS",
          "PER_DIEM_TAXFREE_OVER_12_HOURS_WITHOUT_ACCOMMODATION",
          "PER_DIEM_TAXFREE_OVERNIGHT_WITH_HOTEL",
          "PER_DIEM_TAXFREE_OVERNIGHT_WITH_COOKING",
          "PER_DIEM_TAXFREE_OVERNIGHT_WITHOUT_COOKING",
          "PER_DIEM_TAXFREE_OVERNIGHT_TRUCKER",
          "PER_DIEM_TAXFREE_NIGHT_DOMESTIC",
          "DRIVE_TAXFREE_MILEAGE",
          "DRIVE_TAXFREE_MILEAGE_WITH_PASSENGER",
          "DRIVE_TAXFREE_MILEAGE_WITH_TRAILER",
          "DRIVE_TAXFREE_MILEAGE_OFFROAD"
        ],
        "x-enum-open": true
      },
      "StayFinancialModel": {
        "description": "How a stay's money is held (`AccommodationFinancialModel`): its own expense pair\n (`LEGACY_PAIR`: the night and the breakfast) or one expense with costs (`COSTS`).",
        "type": "string",
        "enum": [
          "LEGACY_PAIR",
          "COSTS"
        ],
        "x-enum-open": true
      },
      "NightSupplementEligibility": {
        "description": "Whether a stay can earn nattillegg now (`NightSupplementEligibility`), in the order the\n reasons are checked.",
        "type": "string",
        "enum": [
          "ELIGIBLE",
          "ABROAD",
          "HAS_LODGING_COST",
          "MISSING_DATES",
          "ORG_DISABLED",
          "ORG_NOT_LEVERED",
          "NOT_PRICED",
          "TYPE"
        ],
        "x-enum-descriptions": [
          "",
          "",
          "",
          "",
          "The organization does not pay it.",
          "Not rolled out to the organization yet.",
          "The per-diem engine pays no nattillegg on the travel (its scheme leaves it out,\n diett is off for the trip, or the organization pays no per diem).",
          "A hotel, or no stay."
        ],
        "x-enum-open": true
      },
      "TravelRequest": {
        "description": "A report's travel request (reisesøknad): a singleton the report owns (SPINE 26.1 rule 1),\n what `GET /reports/{id}/travel-request` answers and `include=travelRequest` side-loads\n (its PATCH answers travel's `TravelRequestWritten`). The flat place mirrors\n (`fromLocationName`, `fromLat`, …) and the PDF's storage key are not served (26.5); the\n amounts are minor units of `currency`. Built by travel (`requests`) and nowhere else.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "reportId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "purpose": {
            "type": [
              "string",
              "null"
            ]
          },
          "fromDateTime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "toDateTime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "fromPlace": {
            "description": "`PlaceEntity`: a stored place, Prisma's field order.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "MAP_SEARCH",
                  "MAP_PIN",
                  "MANUAL",
                  null
                ],
                "x-enum-open": true
              },
              "provider": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "GOOGLE",
                  null
                ],
                "x-enum-open": true
              },
              "providerPlaceId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "formattedAddress": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "street": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "postalCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "region": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "countryName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "countryCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "cityKey": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "coordinatesAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "organizationId",
              "source",
              "provider",
              "providerPlaceId",
              "name",
              "formattedAddress",
              "street",
              "postalCode",
              "city",
              "region",
              "countryName",
              "countryCode",
              "cityKey",
              "lat",
              "lng",
              "coordinatesAt",
              "createdAt",
              "updatedAt"
            ]
          },
          "toPlace": {
            "description": "`PlaceEntity`: a stored place, Prisma's field order.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "MAP_SEARCH",
                  "MAP_PIN",
                  "MANUAL",
                  null
                ],
                "x-enum-open": true
              },
              "provider": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "GOOGLE",
                  null
                ],
                "x-enum-open": true
              },
              "providerPlaceId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "formattedAddress": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "street": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "postalCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "region": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "countryName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "countryCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "cityKey": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "coordinatesAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "organizationId",
              "source",
              "provider",
              "providerPlaceId",
              "name",
              "formattedAddress",
              "street",
              "postalCode",
              "city",
              "region",
              "countryName",
              "countryCode",
              "cityKey",
              "lat",
              "lng",
              "coordinatesAt",
              "createdAt",
              "updatedAt"
            ]
          },
          "currency": {
            "type": "string"
          },
          "estimatedCost": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "requestedAdvanceAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "ownCarApprovalRequested": {
            "type": "boolean"
          },
          "premiumClassApprovalRequested": {
            "type": "boolean"
          },
          "travelRequestNumber": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "pdfGeneratedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "version": {
            "description": "SPINE 26.10 item 3: the request's version (also its `ETag`).",
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "id",
          "reportId",
          "organizationId",
          "purpose",
          "fromDateTime",
          "toDateTime",
          "fromPlace",
          "toPlace",
          "currency",
          "estimatedCost",
          "requestedAdvanceAmount",
          "ownCarApprovalRequested",
          "premiumClassApprovalRequested",
          "travelRequestNumber",
          "pdfGeneratedAt",
          "createdAt",
          "updatedAt",
          "version"
        ]
      },
      "ReportAttachmentListItem": {
        "description": "A report file as its list (and the report detail) carries it: its name, its times and\n a signed read link (absent where the read signs none). The storage key is internal.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "description": "SPINE 26.10 item 3: the file's version; send it back as `If-Match` on its delete.",
            "type": "integer",
            "format": "int64"
          },
          "filename": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "url": {
            "description": "A signed read link, valid an hour.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "version",
          "filename",
          "createdAt",
          "updatedAt"
        ]
      },
      "DisburseAdvance": {
        "description": "`POST /advances/:id/disburse`: record an utbetaling.",
        "type": "object",
        "properties": {
          "amount": {
            "description": "Minor units, at least 1.",
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "idempotencyKey": {
            "description": "One per payout; may not start with `settle:`, `reverse:`, `manual:` or `opening:`.",
            "type": "string",
            "minLength": 1,
            "maxLength": 76
          },
          "occurredAt": {
            "description": "An ISO 8601 date or date-time.",
            "type": [
              "string",
              "null"
            ]
          },
          "externalRef": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "amount",
          "idempotencyKey"
        ]
      },
      "AdvanceSummary": {
        "description": "An advance's own scalars (depth 0; Nest's `AdvanceEntity` row). Amounts are minor\n units of `currency`.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/AdvanceKind"
          },
          "travelRequestId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "amount": {
            "type": "integer",
            "format": "int64"
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/AdvanceStatus"
          },
          "grantedById": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "grantedAt": {
            "type": "string",
            "format": "date-time"
          },
          "canceledAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "canceledReason": {
            "description": "`AdvanceCanceledReason`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "REQUEST_WITHDRAWN",
              "REQUEST_REJECTED",
              "MANUAL",
              null
            ],
            "x-enum-open": true
          },
          "grantNotifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "grantNotifiedAmount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "organizationId",
          "accountId",
          "kind",
          "travelRequestId",
          "amount",
          "currency",
          "status",
          "grantedById",
          "grantedAt",
          "canceledAt",
          "canceledReason",
          "grantNotifiedAt",
          "grantNotifiedAmount",
          "createdAt",
          "updatedAt"
        ]
      },
      "AdvanceKind": {
        "description": "`AdvanceKind`.",
        "type": "string",
        "enum": [
          "SOKNAD",
          "OPENING"
        ],
        "x-enum-open": true
      },
      "AdvanceStatus": {
        "description": "`AdvanceStatus` (the stored column; reads fold it from the ledger).",
        "type": "string",
        "enum": [
          "APPROVED",
          "DISBURSED",
          "PARTIALLY_SETTLED",
          "SETTLED",
          "WRITTEN_OFF",
          "CANCELED"
        ],
        "x-enum-open": true
      },
      "RepayAdvance": {
        "description": "`POST /advances/:id/repay`: the holder paid money back.",
        "type": "object",
        "properties": {
          "amount": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 76
          },
          "occurredAt": {
            "description": "An ISO 8601 date or date-time.",
            "type": [
              "string",
              "null"
            ]
          },
          "externalRef": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "amount",
          "idempotencyKey"
        ]
      },
      "AdjustAdvance": {
        "description": "`POST /advances/:id/adjust`: a controlled correction (signed, non-zero).",
        "type": "object",
        "properties": {
          "amount": {
            "description": "Signed, non-zero minor units.",
            "type": "integer",
            "format": "int64"
          },
          "reasonCode": {
            "$ref": "#/components/schemas/AdjustReason"
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 76
          },
          "externalRef": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "amount",
          "reasonCode",
          "idempotencyKey"
        ]
      },
      "AdjustReason": {
        "description": "`AdvanceAdjustReason`.",
        "type": "string",
        "enum": [
          "CORRECTION",
          "PAYROLL_DEDUCTION",
          "RECOVERY_WAIVED"
        ]
      },
      "WriteOffAdvance": {
        "description": "`POST /advances/:id/write-off`: write the whole open balance off.",
        "type": "object",
        "properties": {
          "reasonCode": {
            "$ref": "#/components/schemas/AdjustReason"
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 76
          },
          "externalRef": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "reasonCode",
          "idempotencyKey"
        ]
      },
      "CancelAdvance": {
        "description": "`POST /advances/:id/cancel` (no body).",
        "type": "object"
      },
      "AccountAdvances": {
        "description": "A person's advance saldo and one page of their advances (`GET\n /accounts/:accountId/advances`): a purpose read model (SPINE 26.1), the page in the\n list envelope (26.3).",
        "type": "object",
        "properties": {
          "balances": {
            "description": "The saldo per currency over EVERY ledger row of the person in the org, not just\n this page; the same on every page.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdvanceBalance"
            }
          },
          "advances": {
            "description": "One page, newest grant first (`grantedAt` desc, `id` desc); `nextCursor` is the\n next page's `cursor`.",
            "$ref": "#/components/schemas/ListPage_AdvanceListItem"
          }
        },
        "required": [
          "balances",
          "advances"
        ]
      },
      "AdvanceBalance": {
        "description": "One currency's slice of a holder's saldo: the signed net of every ledger row in that\n currency (negative: the organization owes the person). A zero net is not listed.",
        "type": "object",
        "properties": {
          "currency": {
            "type": "string"
          },
          "amount": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "currency",
          "amount"
        ]
      },
      "ListPage_AdvanceListItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdvanceListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "AdvanceListItem": {
        "description": "One advance of the person read: `status` and `openBalance` are folded from the same\n ledger rows (never the stored column), so they cannot disagree.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/AdvanceKind"
          },
          "travelRequestReportId": {
            "description": "The søknad report this item was granted on; `null` on an `OPENING` item.",
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "type": "integer",
            "format": "int64"
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/AdvanceStatus"
          },
          "grantedAt": {
            "type": "string",
            "format": "date-time"
          },
          "grantedById": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "canceledAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "canceledReason": {
            "description": "`AdvanceCanceledReason`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "REQUEST_WITHDRAWN",
              "REQUEST_REJECTED",
              "MANUAL",
              null
            ],
            "x-enum-open": true
          },
          "openBalance": {
            "type": "integer",
            "format": "int64"
          },
          "transactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdvanceTransaction"
            }
          }
        },
        "required": [
          "id",
          "kind",
          "travelRequestReportId",
          "amount",
          "currency",
          "status",
          "grantedAt",
          "grantedById",
          "canceledAt",
          "canceledReason",
          "openBalance",
          "transactions"
        ]
      },
      "AdvanceTransaction": {
        "description": "One ledger row of an advance (a value: the ledger is append-only).",
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/TxType"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "integer",
            "format": "int64"
          },
          "currency": {
            "type": "string"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "$ref": "#/components/schemas/TxSource"
          },
          "reportId": {
            "type": [
              "string",
              "null"
            ]
          },
          "reversesId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "externalRef": {
            "type": [
              "string",
              "null"
            ]
          },
          "reasonCode": {
            "description": "`AdvanceAdjustReason`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "CORRECTION",
              "PAYROLL_DEDUCTION",
              "RECOVERY_WAIVED",
              null
            ],
            "x-enum-open": true
          },
          "createdById": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        },
        "required": [
          "id",
          "type",
          "amount",
          "currency",
          "occurredAt",
          "source",
          "reportId",
          "reversesId",
          "externalRef",
          "reasonCode",
          "createdById"
        ]
      },
      "TxType": {
        "description": "`AdvanceTransactionType`.",
        "type": "string",
        "enum": [
          "DISBURSED",
          "SETTLED",
          "REVERSED",
          "REPAID",
          "ADJUSTED",
          "WRITTEN_OFF"
        ],
        "x-enum-open": true
      },
      "TxSource": {
        "description": "`AdvanceTransactionSource`.",
        "type": "string",
        "enum": [
          "MANUAL",
          "SYSTEM",
          "INTEGRATION"
        ],
        "x-enum-open": true
      },
      "OpeningAdvance": {
        "description": "`POST /accounts/:accountId/advances/opening`: an advance carried over from the\n previous system, minted already disbursed.",
        "type": "object",
        "properties": {
          "amount": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 76
          },
          "occurredAt": {
            "description": "The date the balance was carried over: `grantedAt` on the item and `occurredAt` on\n its DISBURSED row (its place in the oldest-first clearing order).",
            "type": "string"
          },
          "externalRef": {
            "description": "The previous system's reference for this balance.",
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "currency": {
            "description": "Defaults to the holder's effective base currency, and must equal it when sent.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "amount",
          "idempotencyKey",
          "occurredAt",
          "externalRef"
        ]
      },
      "ListPage_WalletDetail": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WalletDetail"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "WalletDetail": {
        "description": "A wallet with its holder and its computed balance (`GET /wallets/{id}`; the list rows).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "accountId": {
            "description": "The holder; `accountId=me` is the caller's account.",
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/WalletStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "closedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "account": {
            "description": "The holder (removed holders included).",
            "$ref": "#/components/schemas/AccountSummary"
          },
          "balance": {
            "description": "Computed per page (one grouped statement); not a filter.",
            "$ref": "#/components/schemas/WalletBalance"
          }
        },
        "required": [
          "id",
          "organizationId",
          "accountId",
          "name",
          "currency",
          "status",
          "createdAt",
          "updatedAt",
          "closedAt",
          "account",
          "balance"
        ]
      },
      "WalletStatus": {
        "description": "`WalletStatus`.",
        "type": "string",
        "enum": [
          "ACTIVE",
          "CLOSED"
        ],
        "x-enum-open": true
      },
      "WalletBalance": {
        "description": "A wallet's computed balance: minor units of the wallet's currency. Never stored and\n never blocking: overspend is reported, not refused.",
        "type": "object",
        "properties": {
          "credited": {
            "type": "integer",
            "format": "int64"
          },
          "spent": {
            "type": "integer",
            "format": "int64"
          },
          "reserved": {
            "type": "integer",
            "format": "int64"
          },
          "available": {
            "type": "integer",
            "format": "int64"
          },
          "isOverspent": {
            "type": "boolean"
          },
          "overspentAmount": {
            "description": "How far over the funded amount the wallet is (0 when not overspent).",
            "type": "integer",
            "format": "int64"
          },
          "mismatchedExpenseCount": {
            "description": "Wallet-linked expenses on submitted or approved reports based in another currency,\n left out of the sums because their amounts are not comparable (0 normally).",
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "credited",
          "spent",
          "reserved",
          "available",
          "isOverspent",
          "overspentAmount",
          "mismatchedExpenseCount"
        ]
      },
      "CreateWallet": {
        "description": "`POST /wallets`.",
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "accountId": {
            "description": "The single holder (an account of the organization).",
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "initialAmount": {
            "description": "Optional initial funding, minor units.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "organizationId",
          "accountId"
        ]
      },
      "WalletSummary": {
        "description": "A wallet's own scalars (SPINE 26.1: depth 0): what its writes answer, and a search hit.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "accountId": {
            "description": "The holder (an account of the organization).",
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "description": "Pinned to the holder's effective base currency at creation, never re-pinned.",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/WalletStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "closedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "organizationId",
          "accountId",
          "name",
          "currency",
          "status",
          "createdAt",
          "updatedAt",
          "closedAt"
        ]
      },
      "UpdateWallet": {
        "description": "`PATCH /wallets/:id`: an absent `name` keeps it, `null` clears it.",
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ListPage_WalletActivityEntry": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WalletActivityEntry"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "WalletActivityEntry": {
        "description": "One row of a wallet's activity feed, newest first (a computed collection: one plain\n type, answered whole).",
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "$ref": "#/components/schemas/WalletActivityKind"
          },
          "amount": {
            "description": "Signed minor units: positive funds the wallet, negative draws it down.",
            "type": "integer",
            "format": "int64"
          },
          "currency": {
            "description": "The wallet's currency, restated on every row.",
            "type": "string"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "note": {
            "description": "Funding rows only (`null` when none was given).",
            "type": [
              "string",
              "null"
            ]
          },
          "expenseId": {
            "type": [
              "string",
              "null"
            ]
          },
          "reportStatus": {
            "description": "Expense rows: PENDING/BLOCKED is reserved, APPROVED is spent.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "DRAFT",
              "PENDING",
              "APPROVED",
              "REJECTED",
              "BLOCKED",
              null
            ],
            "x-enum-open": true
          }
        },
        "required": [
          "kind",
          "amount",
          "currency",
          "occurredAt"
        ]
      },
      "WalletActivityKind": {
        "description": "`WalletActivityKind`: CREDIT (the company funded the wallet), ADJUSTMENT (an admin\n correction), EXPENSE (a wallet-linked expense, reserved or spent by its report's\n status).",
        "type": "string",
        "enum": [
          "CREDIT",
          "ADJUSTMENT",
          "EXPENSE"
        ],
        "x-enum-open": true
      },
      "AdjustWallet": {
        "description": "`POST /wallets/:id/adjust`: an admin correction (signed minor units).",
        "type": "object",
        "properties": {
          "amount": {
            "type": "integer",
            "format": "int64"
          },
          "note": {
            "type": "string",
            "maxLength": 512
          }
        },
        "required": [
          "amount",
          "note"
        ]
      },
      "CloseWallet": {
        "description": "`POST /wallets/:id/close` (no body).",
        "type": "object"
      },
      "CreditWallet": {
        "description": "`POST /wallets/:id/credit`: top up (minor units, at least 1).",
        "type": "object",
        "properties": {
          "amount": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "amount"
        ]
      },
      "ReassignWallet": {
        "description": "`POST /wallets/:id/reassign`: move the wallet to another holder in the organization.",
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "accountId"
        ]
      },
      "TransferReport": {
        "description": "The body (`TransferReportDto`); the caller is the route's, not the client's.",
        "type": "object",
        "properties": {
          "targetOrganizationId": {
            "description": "The organization to transfer the report to.",
            "type": "string"
          }
        },
        "required": [
          "targetOrganizationId"
        ]
      },
      "TransferResult": {
        "description": "The answer (Nest's `TransferResult`): an action's outcome, 200 (SPINE 26.5).",
        "type": "object",
        "properties": {
          "sourceReportId": {
            "type": "string"
          },
          "targetReportId": {
            "type": "string"
          },
          "sourceOrganizationId": {
            "type": "string",
            "format": "uuid"
          },
          "targetOrganizationId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "sourceReportId",
          "targetReportId",
          "sourceOrganizationId",
          "targetOrganizationId"
        ]
      },
      "CreateExpense": {
        "description": "The body (Nest `CreateExpenseSchema`).",
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "Client-minted id; a retry with the same id and payload replays the first create.",
            "type": [
              "string",
              "null"
            ]
          },
          "reportId": {
            "description": "The report to file the expense on; absent: an implicit wrapper is provisioned on\n `accountId` (`wrapper::ImplicitExpense`).",
            "type": [
              "string",
              "null"
            ]
          },
          "accountId": {
            "type": [
              "string",
              "null"
            ]
          },
          "wrapperId": {
            "description": "Legacy implicit wrapper id; never together with `reportId` (`expense_conflict`).",
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "description": "The transaction's true instant (UTC midnight of the day when date-only), read as\n Nest's `clientDate()` reads it.",
            "type": [
              "string",
              "null"
            ],
            "format": "client-date"
          },
          "dateTimeZone": {
            "description": "IANA zone of a timed date; required when `dateHasTime` is true.",
            "type": [
              "string",
              "null"
            ]
          },
          "dateHasTime": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "amount": {
            "description": "Minor units of `currency`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "projectId": {
            "description": "Absent: the report's project; `null`: none.",
            "type": [
              "string",
              "null"
            ]
          },
          "departmentId": {
            "type": [
              "string",
              "null"
            ]
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "paymentMethod": {
            "description": "Absent: CARD; `null`: none.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "CARD",
              "COMPANY_CARD",
              "INVOICE",
              "WALLET",
              null
            ]
          },
          "paymentCardId": {
            "type": [
              "string",
              "null"
            ]
          },
          "walletId": {
            "description": "A company wallet (\"Prodkasse\"); forces `paymentMethod` WALLET.",
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "description": "Absent: NOK; `null`: none (read as NOK).",
            "type": [
              "string",
              "null"
            ]
          },
          "exchangeRate": {
            "description": "Rate from `currency` to the report's base currency (a hand-correction).",
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "isManualExchangeRate": {
            "description": "Deprecated: true when the user typed `exchangeRate` in this edit.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "fx": {
            "description": "An explicit FX decision (AUTO or MANUAL).",
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "quoteId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "AUTO"
                    ]
                  }
                },
                "additionalProperties": false,
                "required": [
                  "mode"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "exchangeRate": {
                    "description": "Up to ten integer digits and six decimals; exactly one of this and\n `baseAmount`.",
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^\\d{1,10}(\\.\\d{1,6})?$"
                  },
                  "baseAmount": {
                    "description": "The actual charge in the report currency's minor units.",
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "referenceQuoteId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "MANUAL"
                    ]
                  }
                },
                "additionalProperties": false,
                "required": [
                  "mode",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "KEEP"
                    ]
                  }
                },
                "required": [
                  "mode"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 191
          },
          "vatRate": {
            "description": "VAT rate in percent (25 for 25 %).",
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "vatAmount": {
            "description": "VAT in minor units.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "isVatDeductible": {
            "description": "`null`: derived (Norwegian transaction with VAT).",
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "FxCommand": {
        "description": "An explicit FX decision on a write (Nest `fxCommandSchema`; `KEEP` only on updates).",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "quoteId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "mode": {
                "type": "string",
                "enum": [
                  "AUTO"
                ]
              }
            },
            "additionalProperties": false,
            "required": [
              "mode"
            ]
          },
          {
            "type": "object",
            "properties": {
              "exchangeRate": {
                "description": "Up to ten integer digits and six decimals; exactly one of this and\n `baseAmount`.",
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^\\d{1,10}(\\.\\d{1,6})?$"
              },
              "baseAmount": {
                "description": "The actual charge in the report currency's minor units.",
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              },
              "reason": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              "referenceQuoteId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "mode": {
                "type": "string",
                "enum": [
                  "MANUAL"
                ]
              }
            },
            "additionalProperties": false,
            "required": [
              "mode",
              "reason"
            ]
          },
          {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "KEEP"
                ]
              }
            },
            "required": [
              "mode"
            ],
            "additionalProperties": false
          }
        ]
      },
      "ExpenseWritten": {
        "description": "What an expense write answers (SPINE 26.1 rule 10, 26.2): the expense's one summary\n beside its report's summary after the write, so a client refreshes the report's totals\n and amend state without a refetch.",
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "version": {
            "description": "SPINE 26.10 item 3: the expense's version.",
            "type": "integer",
            "format": "int64"
          },
          "reportId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "description": "Minor units of `currency`.",
            "type": "integer",
            "format": "int64"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "amountInBaseCurrency": {
            "description": "Minor units of the report's base currency.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "vatAmount": {
            "description": "Minor units of `currency`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "isVatDeductible": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dateTimeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "dateHasTime": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "paymentMethod": {
            "description": "`PaymentMethod`: how an expense was paid.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "CARD",
              "COMPANY_CARD",
              "INVOICE",
              "WALLET",
              null
            ],
            "x-enum-open": true
          },
          "paymentCardId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "walletId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "departmentId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "costsRevision": {
            "description": "Revision of the cost composition (a cost write names the one it read).",
            "type": "integer",
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "report": {
            "description": "The expense's report after the write.",
            "$ref": "#/components/schemas/ReportSummary"
          },
          "merged": {
            "description": "The write merged over changes made since its `If-Match` version (SPINE 26.10 item\n 3); false for every write but such an update.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "version",
          "reportId",
          "organizationId",
          "title",
          "merchant",
          "description",
          "amount",
          "currency",
          "amountInBaseCurrency",
          "vatAmount",
          "isVatDeductible",
          "date",
          "dateTimeZone",
          "dateHasTime",
          "paymentMethod",
          "paymentCardId",
          "walletId",
          "categoryId",
          "departmentId",
          "projectId",
          "costsRevision",
          "createdAt",
          "updatedAt",
          "report",
          "merged"
        ]
      },
      "ListPage_ExpenseListItem": {
        "description": "The envelope of a list whose item declares relations (SPINE 26.12.2): [`ListPage`]'s\n members and the side-loads, `{ items, hasMore, nextCursor?, total?, included? }`. Its\n schema keeps `ListPage`'s name: a route answers one or the other for an item, never\n both.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExpenseListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "included": {
            "description": "The side-loaded resources by type (`include=`); absent when nothing was asked for.",
            "$ref": "#/components/schemas/ExpenseIncluded"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "ExpenseIncluded": {
        "description": "The side-loaded resources (SPINE 26.12.2): one array per type, each resource once, ordered by id",
        "type": "object",
        "properties": {
          "attachment": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentListItem"
            }
          },
          "category": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CategoryDetail"
            }
          },
          "department": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DepartmentDetail"
            }
          },
          "organization": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrganizationDetail"
            }
          },
          "project": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectDetail"
            }
          }
        },
        "additionalProperties": false
      },
      "ListPage_ExpenseCurrency": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExpenseCurrency"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "ExpenseCurrency": {
        "description": "One filable currency.",
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "exponent": {
            "description": "Decimal places of the minor unit.",
            "type": "integer",
            "format": "uint32",
            "minimum": 0
          },
          "autoQuoted": {
            "description": "Whether a rate is quoted automatically (false: the user supplies it).",
            "type": "boolean"
          }
        },
        "required": [
          "code",
          "exponent",
          "autoQuoted"
        ]
      },
      "ExchangeRateRequest": {
        "description": "The body (Nest `ExchangeRateSchema`).",
        "type": "object",
        "properties": {
          "currency": {
            "type": "string"
          },
          "baseCurrency": {
            "description": "The base the rate is anchored to (the report's); NOK when omitted.",
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "$ref": "#/components/schemas/RequestDate"
          }
        },
        "required": [
          "currency",
          "date"
        ]
      },
      "RequestDate": {
        "description": "A calendar day (Nest `RequestDate`).",
        "type": "object",
        "properties": {
          "year": {
            "type": "integer",
            "format": "int16",
            "minimum": 1970,
            "maximum": 2100
          },
          "month": {
            "type": "integer",
            "format": "int8",
            "minimum": 1,
            "maximum": 12
          },
          "day": {
            "type": "integer",
            "format": "int8",
            "minimum": 1,
            "maximum": 31
          }
        },
        "required": [
          "year",
          "month",
          "day"
        ]
      },
      "FxQuoteRequestDto": {
        "description": "The body (Nest `FxQuoteRequestDto`, a strict object).",
        "type": "object",
        "properties": {
          "reportId": {
            "description": "The report the line is on; exactly one of this and `accountId`.",
            "type": [
              "string",
              "null"
            ]
          },
          "accountId": {
            "description": "The account a new report would be filed for (no report yet).",
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "description": "The line's currency (ISO 4217, either case).",
            "type": "string"
          },
          "date": {
            "description": "The day the rate is for (the latest when omitted).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "year": {
                "type": "integer",
                "format": "int16",
                "minimum": 1970,
                "maximum": 2100
              },
              "month": {
                "type": "integer",
                "format": "int8",
                "minimum": 1,
                "maximum": 12
              },
              "day": {
                "type": "integer",
                "format": "int8",
                "minimum": 1,
                "maximum": 31
              }
            },
            "required": [
              "year",
              "month",
              "day"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "currency"
        ]
      },
      "FxQuoteDto": {
        "description": "A quote as issued, previewed and snapshotted (Nest `FxQuote`, `fxQuoteSchema`).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "provider": {
            "$ref": "#/components/schemas/QuoteSource"
          },
          "transport": {
            "description": "How a Norges Bank quote travelled (absent: directly).",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "FRANKFURTER",
              null
            ],
            "x-enum-open": true
          },
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "rate": {
            "description": "`1 from = rate to`, six decimals.",
            "type": "number"
          },
          "requestedDate": {
            "description": "A requested day on the wire (Nest `RequestDate`).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "year": {
                "type": "integer",
                "format": "int16",
                "minimum": -32768,
                "maximum": 32767
              },
              "month": {
                "type": "integer",
                "format": "int8",
                "minimum": -128,
                "maximum": 127
              },
              "day": {
                "type": "integer",
                "format": "int8",
                "minimum": -128,
                "maximum": 127
              }
            },
            "required": [
              "year",
              "month",
              "day"
            ]
          },
          "observations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuoteObservation"
            }
          },
          "retrievedAt": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "provider",
          "from",
          "to",
          "rate",
          "requestedDate",
          "observations",
          "retrievedAt",
          "expiresAt"
        ]
      },
      "QuoteSource": {
        "description": "Who priced a quote.",
        "type": "string",
        "enum": [
          "NORGES_BANK",
          "IDENTITY",
          "FRANKFURTER"
        ],
        "x-enum-open": true
      },
      "QuoteObservation": {
        "description": "One observation behind a quote (Nest `FxObservation`).",
        "type": "object",
        "properties": {
          "currency": {
            "type": "string"
          },
          "rate": {
            "type": "number"
          },
          "date": {
            "description": "The day the provider published the rate, `YYYY-MM-DD`.",
            "type": "string"
          },
          "retrievedAt": {
            "type": "string"
          },
          "quoteCurrency": {
            "description": "A blended pair's quote side; absent on a NOK leg.",
            "type": [
              "string",
              "null"
            ]
          },
          "providers": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/QuoteContribution"
            }
          }
        },
        "required": [
          "currency",
          "rate",
          "date",
          "retrievedAt"
        ]
      },
      "QuoteContribution": {
        "description": "One provider's contribution to a blended rate (Nest `fxProviderSchema`).",
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "date": {
            "description": "`YYYY-MM-DD`.",
            "type": "string"
          },
          "rate": {
            "type": "number",
            "format": "double"
          },
          "excluded": {
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "required": [
          "key",
          "date",
          "rate"
        ]
      },
      "ExpenseDetail": {
        "description": "An expense at detail level (`GET /expenses/{id}`).",
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "costsRevision": {
            "description": "Revision of the cost composition (every financial write bumps it).",
            "type": "integer",
            "format": "int32"
          },
          "id": {
            "description": "As stored (a client-minted id keeps the client's spelling).",
            "type": "string"
          },
          "version": {
            "description": "SPINE 26.10 item 3: the expense's version (also its detail's `ETag`).",
            "type": "integer",
            "format": "int64"
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dateTimeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "dateHasTime": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "amount": {
            "description": "Minor units of `currency`.",
            "type": "integer",
            "format": "int64"
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ]
          },
          "departmentId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "reportId": {
            "type": "string"
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "paymentMethod": {
            "description": "`PaymentMethod`: how an expense was paid.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "CARD",
              "COMPANY_CARD",
              "INVOICE",
              "WALLET",
              null
            ],
            "x-enum-open": true
          },
          "paymentCardId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "walletId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchangeRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "exchangeRateSource": {
            "description": "`ExchangeRateSource`: SERVICE when this server quoted (or priced an identity pair at\n parity), MANUAL when a person typed it; `None` when unknown.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "SERVICE",
              "MANUAL",
              null
            ],
            "x-enum-open": true
          },
          "minorUnitScale": {
            "type": "number"
          },
          "amountInBaseCurrency": {
            "description": "Minor units of the report's base currency.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "vatRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "vatAmount": {
            "description": "Minor units of `currency`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "isVatDeductible": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "category": {
            "description": "A summary-level category (SPINE 26.1).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "title": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "accountingCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "visibility": {
                "description": "`VISIBLE` or `HIDDEN`.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "organizationId",
              "title",
              "description",
              "accountingCode",
              "visibility"
            ]
          },
          "department": {
            "description": "A summary-level department (SPINE 26.1: depth 0).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "title": {
                "type": "string"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "accountingCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "isPublic": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "organizationId",
              "title",
              "accountingCode",
              "isPublic"
            ]
          },
          "project": {
            "description": "A summary-level project (SPINE 26.1: depth 0): a search hit, a facet's label, a\n cross-aggregate embed.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "title": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "accountingCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "deletedAt": {
                "description": "Set when the project was deleted after something was booked on it: an embed keeps\n pointing at it (a line, a report), so the client can mark it (SPINE 26.1).",
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "organizationId",
              "title",
              "description",
              "accountingCode",
              "deletedAt"
            ]
          },
          "paymentCard": {
            "description": "A summary-level payment card (SPINE 26.1: depth 0): what a line that carries one\n embeds (`paymentCard`). Of the card number only its last four digits are served (what\n the receipt prints, so «Betaling» names the card). A removed card still embeds\n (`deletedAt` set): a line names the card it was paid with.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "description": {
                "type": "string"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "last4": {
                "description": "The card number's last four digits.",
                "type": "string"
              },
              "brand": {
                "type": "string"
              },
              "cardType": {
                "description": "`DEBIT` or `CREDIT`; null when not stated.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "isDefault": {
                "type": "boolean"
              },
              "organizationId": {
                "description": "Null on a personal card.",
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "userId": {
                "type": "string",
                "format": "uuid"
              },
              "createdAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "updatedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "deletedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "last4",
              "brand",
              "cardType",
              "description",
              "isDefault",
              "organizationId",
              "userId",
              "deletedAt"
            ]
          },
          "costs": {
            "description": "The stored cost composition, by position (empty for a legacy expense).",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostListItem"
            }
          },
          "attachments": {
            "description": "The live receipts, by id.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentListItem"
            }
          },
          "inboxItems": {
            "description": "The inbox items the expense was made from.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InboxItemSummary"
            }
          },
          "invoiceDetected": {
            "description": "Whether the receipts' readings say an invoice (absent when they do not say).",
            "type": [
              "boolean",
              "null"
            ]
          },
          "deletedAt": {
            "description": "Set only on a soft-deleted expense (a platform operator's report document,\n `deletedLines`); absent on a live one.",
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "report": {
            "description": "The expense's report.",
            "$ref": "#/components/schemas/ReportSummary"
          },
          "included": {
            "description": "The side-loaded resources by type (`include=`); absent when nothing was asked for.",
            "$ref": "#/components/schemas/ExpenseIncluded"
          }
        },
        "required": [
          "costsRevision",
          "id",
          "version",
          "date",
          "dateTimeZone",
          "dateHasTime",
          "amount",
          "title",
          "merchant",
          "description",
          "departmentId",
          "projectId",
          "reportId",
          "categoryId",
          "createdAt",
          "updatedAt",
          "paymentMethod",
          "paymentCardId",
          "walletId",
          "currency",
          "exchangeRate",
          "exchangeRateSource",
          "minorUnitScale",
          "amountInBaseCurrency",
          "vatRate",
          "vatAmount",
          "isVatDeductible",
          "organizationId",
          "category",
          "department",
          "project",
          "paymentCard",
          "costs",
          "attachments",
          "inboxItems",
          "report"
        ]
      },
      "UpdateExpense": {
        "description": "The body (Nest `UpdateExpenseSchema`). `Some(None)` is an explicit `null`.",
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "Echoed by whole-object clients; never changes the stored id.",
            "type": [
              "string",
              "null"
            ]
          },
          "reportId": {
            "description": "The report to move the expense to (moves are not served yet; the expense's own\n report, echoed, is fine).",
            "type": [
              "string",
              "null"
            ]
          },
          "accountId": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "client-date"
          },
          "dateTimeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "dateHasTime": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "amount": {
            "description": "Minor units of `currency`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ]
          },
          "departmentId": {
            "type": [
              "string",
              "null"
            ]
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "paymentMethod": {
            "description": "`PaymentMethod`: how an expense was paid.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "CARD",
              "COMPANY_CARD",
              "INVOICE",
              "WALLET",
              null
            ]
          },
          "paymentCardId": {
            "type": [
              "string",
              "null"
            ]
          },
          "walletId": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchangeRate": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "isManualExchangeRate": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "fx": {
            "description": "An explicit FX decision (AUTO, MANUAL or KEEP).",
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "quoteId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "AUTO"
                    ]
                  }
                },
                "additionalProperties": false,
                "required": [
                  "mode"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "exchangeRate": {
                    "description": "Up to ten integer digits and six decimals; exactly one of this and\n `baseAmount`.",
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^\\d{1,10}(\\.\\d{1,6})?$"
                  },
                  "baseAmount": {
                    "description": "The actual charge in the report currency's minor units.",
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "referenceQuoteId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "MANUAL"
                    ]
                  }
                },
                "additionalProperties": false,
                "required": [
                  "mode",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "KEEP"
                    ]
                  }
                },
                "required": [
                  "mode"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ]
          },
          "vatRate": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "vatAmount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "isVatDeductible": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "paymentDefaultOnly": {
            "description": "Apply a scan default only while payment is empty (capture's autofill).",
            "type": [
              "boolean",
              "null"
            ]
          },
          "paymentDefaultAttachmentId": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "DetachExpense": {
        "description": "`ExpensesController_detach` (no body).",
        "type": "object"
      },
      "ListPage_AttachmentListItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "UploadAttachmentIntentDto": {
        "description": "The shared JSON body (`UploadAttachmentRequestSchema`): every key optional, the\n expense named as `expenseId` or the legacy `cashExpenseId`.",
        "type": "object",
        "properties": {
          "attachmentId": {
            "description": "Client-minted attachment id: the idempotency key and the object's basename.",
            "type": [
              "string",
              "null"
            ]
          },
          "expenseId": {
            "type": [
              "string",
              "null"
            ]
          },
          "cashExpenseId": {
            "description": "Deprecated: use `expenseId`.",
            "type": [
              "string",
              "null"
            ]
          },
          "correlationId": {
            "description": "Deprecated: no longer used.",
            "type": [
              "string",
              "null"
            ]
          },
          "performCapture": {
            "description": "Ask for server-side OCR; deferred to the intake (it reads the object).",
            "type": [
              "string",
              "null"
            ]
          },
          "performScan": {
            "description": "Deprecated alias for `performCapture`.",
            "type": [
              "string",
              "null"
            ]
          },
          "ocrText": {
            "description": "Device-side OCR text.",
            "type": [
              "string",
              "null"
            ]
          },
          "captureRef": {
            "description": "The instant-scan handoff's `captureRef`.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64
          },
          "populateExpense": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "none",
              "empty",
              "all",
              null
            ]
          },
          "deviceTimeZone": {
            "description": "IANA zone of the capturing device.",
            "type": [
              "string",
              "null"
            ]
          },
          "sourceInboxItemId": {
            "description": "The inbox item this receipt is promoted from: consumed when the upload is\n confirmed.",
            "type": [
              "string",
              "null"
            ]
          },
          "fileName": {
            "description": "The client's file name (at most 255 characters; recorded, never part of a key).",
            "type": [
              "string",
              "null"
            ]
          },
          "size": {
            "description": "The file's exact size in bytes: the storage policy admits nothing else.",
            "type": [
              "integer",
              "null"
            ],
            "format": "uint64",
            "minimum": 0
          },
          "contentType": {
            "description": "The file's media type (one the purpose accepts): the storage policy's\n `Content-Type`, and what its magic bytes must be.",
            "type": [
              "string",
              "null"
            ]
          },
          "sha256": {
            "description": "The file's SHA-256 (hex): the confirm checks the stored bytes against it.",
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UploadAttachmentResponseDto": {
        "description": "The intent's 201 and its confirm's result. An intent carries `upload` (where the bytes\n go, then `POST /uploads/{id}:confirm`) unless its bytes already landed (a replay of a\n stored receipt is a state read), and `autofill` only on its first call (and not when\n the capture was deferred to the confirm); the confirm carries the deferred capture's\n `autofill` and the consumed inbox item.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "expenseId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/AttachmentStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "amountIncludingVat": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "amountExcludingVat": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "vatRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "vatAmount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dateTimeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "dateTimeZoneSource": {
            "type": [
              "string",
              "null"
            ]
          },
          "dateHasTime": {
            "type": "boolean"
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ]
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "splitFromAttachmentId": {
            "type": [
              "string",
              "null"
            ]
          },
          "sha256": {
            "description": "The stored bytes' SHA-256 (hex); null until they are verified.",
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "description": "SPINE 26.10 item 3: the receipt's version (also its detail's `ETag`).",
            "type": "integer",
            "format": "int64"
          },
          "url": {
            "description": "A signed read link, valid an hour; absent while the bytes are not stored.",
            "type": [
              "string",
              "null"
            ]
          },
          "autofill": {
            "description": "`AttachmentAutofillOutcome` (the assessment's keys only when there was one).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "status": {
                "$ref": "#/components/schemas/Status"
              },
              "appliedFields": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "clearedFields": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "skippedFields": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "documentClass": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "extractability": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "confidenceScore": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "reviewRecommended": {
                "type": [
                  "boolean",
                  "null"
                ]
              }
            },
            "required": [
              "status",
              "appliedFields",
              "clearedFields",
              "skippedFields",
              "warnings"
            ]
          },
          "consumedInboxItemId": {
            "description": "Confirms the inbox item named in `sourceInboxItemId` was consumed with the receipt.",
            "type": [
              "string",
              "null"
            ]
          },
          "upload": {
            "description": "Where an intent's bytes go: a `multipart/form-data` POST to `url` with `fields` before\n the file part (a single upload), or parts (`multipart`: ask `POST /uploads/{id}/parts`\n for their URLs). Then `POST /uploads/{id}:confirm`.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "description": "The intent's id (the confirm's path).",
                "type": "string",
                "format": "uuid"
              },
              "purpose": {
                "$ref": "#/components/schemas/Purpose"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fields": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": {
                  "type": "string"
                }
              },
              "expiresAt": {
                "description": "When the form lapses (15 minutes; a multipart intent: when the intent does).",
                "type": "string"
              },
              "intentExpiresAt": {
                "description": "When the intent lapses (24 hours): confirm before then.",
                "type": "string",
                "format": "date-time"
              },
              "multipart": {
                "description": "A multipart intent's plan.",
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "partSize": {
                    "description": "Every part but the last is exactly this many bytes.",
                    "type": "integer",
                    "format": "uint64",
                    "minimum": 0
                  },
                  "partCount": {
                    "type": "integer",
                    "format": "uint32",
                    "minimum": 0
                  }
                },
                "required": [
                  "partSize",
                  "partCount"
                ]
              }
            },
            "required": [
              "id",
              "purpose",
              "expiresAt",
              "intentExpiresAt"
            ]
          },
          "captureAdoption": {
            "description": "`captureAdoption`: whether a presented instant-scan ref was adopted (present only\n when the upload carried one).",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "hit",
              "miss",
              null
            ],
            "x-enum-open": true
          }
        },
        "required": [
          "id",
          "expenseId",
          "status",
          "createdAt",
          "updatedAt",
          "amountIncludingVat",
          "amountExcludingVat",
          "vatRate",
          "vatAmount",
          "currency",
          "date",
          "dateTimeZone",
          "dateTimeZoneSource",
          "dateHasTime",
          "merchant",
          "description",
          "categoryId",
          "splitFromAttachmentId",
          "sha256",
          "version"
        ]
      },
      "UploadTicket": {
        "description": "Where an intent's bytes go: a `multipart/form-data` POST to `url` with `fields` before\n the file part (a single upload), or parts (`multipart`: ask `POST /uploads/{id}/parts`\n for their URLs). Then `POST /uploads/{id}:confirm`.",
        "type": "object",
        "properties": {
          "id": {
            "description": "The intent's id (the confirm's path).",
            "type": "string",
            "format": "uuid"
          },
          "purpose": {
            "$ref": "#/components/schemas/Purpose"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "fields": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "expiresAt": {
            "description": "When the form lapses (15 minutes; a multipart intent: when the intent does).",
            "type": "string"
          },
          "intentExpiresAt": {
            "description": "When the intent lapses (24 hours): confirm before then.",
            "type": "string",
            "format": "date-time"
          },
          "multipart": {
            "description": "A multipart intent's plan.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "partSize": {
                "description": "Every part but the last is exactly this many bytes.",
                "type": "integer",
                "format": "uint64",
                "minimum": 0
              },
              "partCount": {
                "type": "integer",
                "format": "uint32",
                "minimum": 0
              }
            },
            "required": [
              "partSize",
              "partCount"
            ]
          }
        },
        "required": [
          "id",
          "purpose",
          "expiresAt",
          "intentExpiresAt"
        ]
      },
      "AttachmentDetail": {
        "description": "A receipt at detail level (`GET /attachments/{id}`).",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "expenseId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/AttachmentStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "amountIncludingVat": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "amountExcludingVat": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "vatRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "vatAmount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dateTimeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "dateTimeZoneSource": {
            "type": [
              "string",
              "null"
            ]
          },
          "dateHasTime": {
            "type": "boolean"
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ]
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "splitFromAttachmentId": {
            "type": [
              "string",
              "null"
            ]
          },
          "sha256": {
            "description": "The stored bytes' SHA-256 (hex); null until they are verified.",
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "description": "SPINE 26.10 item 3: the receipt's version (also its detail's `ETag`).",
            "type": "integer",
            "format": "int64"
          },
          "captures": {
            "description": "The receipt's readings: on a list row its latest one (none before the first); on\n the detail every one, oldest first.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaptureSummary"
            }
          },
          "url": {
            "description": "A signed read link, valid an hour; absent while the bytes are not stored.",
            "type": [
              "string",
              "null"
            ]
          },
          "expense": {
            "description": "The receipt's expense.",
            "$ref": "#/components/schemas/ExpenseSummary"
          }
        },
        "required": [
          "id",
          "expenseId",
          "status",
          "createdAt",
          "updatedAt",
          "amountIncludingVat",
          "amountExcludingVat",
          "vatRate",
          "vatAmount",
          "currency",
          "date",
          "dateTimeZone",
          "dateTimeZoneSource",
          "dateHasTime",
          "merchant",
          "description",
          "categoryId",
          "splitFromAttachmentId",
          "sha256",
          "version",
          "captures",
          "expense"
        ]
      },
      "ExpenseSummary": {
        "description": "A summary-level expense (SPINE 26.1: depth 0, its own scalars): what an expense write\n answers (beside its report's summary: reports' `ExpenseWritten`), a search hit and every\n cross-aggregate embed show of a receipt line. Its report rides only as `reportId`.\n Built only by reports' expense read module (`expenses::read::summary`).",
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "version": {
            "description": "SPINE 26.10 item 3: the expense's version.",
            "type": "integer",
            "format": "int64"
          },
          "reportId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "description": "Minor units of `currency`.",
            "type": "integer",
            "format": "int64"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "amountInBaseCurrency": {
            "description": "Minor units of the report's base currency.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "vatAmount": {
            "description": "Minor units of `currency`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "isVatDeductible": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dateTimeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "dateHasTime": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "paymentMethod": {
            "description": "`PaymentMethod`: how an expense was paid.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "CARD",
              "COMPANY_CARD",
              "INVOICE",
              "WALLET",
              null
            ],
            "x-enum-open": true
          },
          "paymentCardId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "walletId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "departmentId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "costsRevision": {
            "description": "Revision of the cost composition (a cost write names the one it read).",
            "type": "integer",
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "version",
          "reportId",
          "organizationId",
          "title",
          "merchant",
          "description",
          "amount",
          "currency",
          "amountInBaseCurrency",
          "vatAmount",
          "isVatDeductible",
          "date",
          "dateTimeZone",
          "dateHasTime",
          "paymentMethod",
          "paymentCardId",
          "walletId",
          "categoryId",
          "departmentId",
          "projectId",
          "costsRevision",
          "createdAt",
          "updatedAt"
        ]
      },
      "ReportFileUploadRequest": {
        "description": "`POST /reports/{reportId}/attachments`' body: the file the client is about to upload.",
        "type": "object",
        "properties": {
          "id": {
            "description": "Client-minted (a UUID): the upload's id and the report file's.",
            "type": "string",
            "format": "uuid"
          },
          "fileName": {
            "description": "The client's file name (at most 255 characters; recorded, never part of a key).",
            "type": [
              "string",
              "null"
            ]
          },
          "size": {
            "description": "The file's exact size in bytes: the storage policy admits nothing else.",
            "type": [
              "integer",
              "null"
            ],
            "format": "uint64",
            "minimum": 0
          },
          "contentType": {
            "description": "The file's media type (one the purpose accepts): the storage policy's\n `Content-Type`, and what its magic bytes must be.",
            "type": [
              "string",
              "null"
            ]
          },
          "sha256": {
            "description": "The file's SHA-256 (hex): the confirm checks the stored bytes against it.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id"
        ]
      },
      "ReportFileUpload": {
        "description": "The intent's 201: where the bytes go.",
        "type": "object",
        "properties": {
          "upload": {
            "$ref": "#/components/schemas/UploadTicket"
          }
        },
        "required": [
          "upload"
        ]
      },
      "PromoteReportFile": {
        "description": "`PromoteReportAttachmentDto`.",
        "type": "object",
        "properties": {
          "populateExpense": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "none",
              "empty",
              "all",
              null
            ],
            "description": "`none` (default), `empty` or `all`: whether the file is read to fill the new line."
          }
        }
      },
      "Promoted": {
        "description": "What a promotion answers (SPINE 26.2: a line write answers the line's summary beside\n the report's): the new expense's and receipt's summaries, the report after the write,\n and the codes of what the reading could not keep (`invalid_category_dropped`).",
        "type": "object",
        "properties": {
          "expense": {
            "$ref": "#/components/schemas/ExpenseSummary"
          },
          "attachment": {
            "$ref": "#/components/schemas/AttachmentSummary"
          },
          "report": {
            "$ref": "#/components/schemas/ReportSummary"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "expense",
          "attachment",
          "report",
          "warnings"
        ]
      },
      "AttachmentSummary": {
        "description": "A receipt at summary level (SPINE 26.1: depth 0, pure over its row). The reference\n amounts are what the receipt reads as, minor units of `currency`.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "expenseId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/AttachmentStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "amountIncludingVat": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "amountExcludingVat": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "vatRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "vatAmount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dateTimeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "dateTimeZoneSource": {
            "type": [
              "string",
              "null"
            ]
          },
          "dateHasTime": {
            "type": "boolean"
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ]
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "splitFromAttachmentId": {
            "type": [
              "string",
              "null"
            ]
          },
          "sha256": {
            "description": "The stored bytes' SHA-256 (hex); null until they are verified.",
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "description": "SPINE 26.10 item 3: the receipt's version (also its detail's `ETag`).",
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "id",
          "expenseId",
          "status",
          "createdAt",
          "updatedAt",
          "amountIncludingVat",
          "amountExcludingVat",
          "vatRate",
          "vatAmount",
          "currency",
          "date",
          "dateTimeZone",
          "dateTimeZoneSource",
          "dateHasTime",
          "merchant",
          "description",
          "categoryId",
          "splitFromAttachmentId",
          "sha256",
          "version"
        ]
      },
      "ListPage_ReportAttachmentListItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportAttachmentListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "ReceiptRemainderWriteDto": {
        "description": "`ReceiptRemainderWriteDto`.",
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "additionalCosts": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ReceiptRemainderCostDto"
            }
          },
          "proposal": {
            "$ref": "#/components/schemas/ReceiptRemainderProposalDto"
          },
          "costId": {
            "type": "string"
          },
          "amount": {
            "type": "integer",
            "format": "int64"
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "proposal",
          "costId",
          "amount",
          "description"
        ]
      },
      "ReceiptRemainderCostDto": {
        "description": "`ReceiptRemainderCostDto`.",
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "costId": {
            "type": "string"
          },
          "amount": {
            "type": "integer",
            "format": "int64"
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "costId",
          "amount",
          "description"
        ]
      },
      "ReceiptRemainderProposalDto": {
        "description": "`ReceiptRemainderProposalDto`, Nest's key order.",
        "type": "object",
        "properties": {
          "expenseId": {
            "type": "string"
          },
          "attachmentId": {
            "type": "string"
          },
          "captureId": {
            "type": "integer",
            "format": "int32"
          },
          "sha256": {
            "type": "string"
          },
          "evidenceHash": {
            "type": "string"
          },
          "expectedCostsRevision": {
            "type": "integer",
            "format": "int32"
          },
          "currency": {
            "type": "string"
          },
          "declinedUnpriced": {
            "description": "A declined item whose evidence carries no usable amount subtracted nothing\n (Nest's `z.boolean().default(false)`: absent reads as `false`; answers always\n carry it).",
            "type": [
              "boolean",
              "null"
            ]
          },
          "documentTotal": {
            "type": "integer",
            "format": "int64"
          },
          "claimedAmount": {
            "type": "integer",
            "format": "int64"
          },
          "remainingAmount": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false,
        "required": [
          "expenseId",
          "attachmentId",
          "captureId",
          "sha256",
          "evidenceHash",
          "expectedCostsRevision",
          "currency",
          "documentTotal",
          "claimedAmount",
          "remainingAmount"
        ]
      },
      "ExpenseCosts": {
        "description": "`ExpenseCostsDto`.",
        "type": "object",
        "properties": {
          "expenseId": {
            "type": "string"
          },
          "costsRevision": {
            "type": "integer",
            "format": "int32"
          },
          "header": {
            "$ref": "#/components/schemas/CostsHeader"
          },
          "costs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostDto"
            }
          },
          "baseCurrency": {
            "type": "string"
          },
          "exchangeRate": {
            "description": "The stored rate as decimal text.",
            "type": "string"
          },
          "exchangeRateSource": {
            "description": "`ExchangeRateSource`: SERVICE when this server quoted (or priced an identity pair at\n parity), MANUAL when a person typed it; `None` when unknown.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "SERVICE",
              "MANUAL",
              null
            ],
            "x-enum-open": true
          },
          "fxSnapshot": true,
          "minorUnitScale": {
            "description": "Decimal text.",
            "type": "string"
          },
          "amountInBaseCurrency": {
            "description": "Minor units of `baseCurrency`.",
            "type": "integer",
            "format": "int64"
          },
          "baseAmounts": {
            "description": "Each cost's share of `amountInBaseCurrency`, by cost id.",
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int64"
            }
          }
        },
        "required": [
          "expenseId",
          "costsRevision",
          "header",
          "costs",
          "baseCurrency",
          "exchangeRate",
          "exchangeRateSource",
          "fxSnapshot",
          "minorUnitScale",
          "amountInBaseCurrency",
          "baseAmounts"
        ]
      },
      "CostsHeader": {
        "description": "What the costs are written against (`costsHeaderSchema`).",
        "type": "object",
        "properties": {
          "amount": {
            "description": "Minor units of `currency`.",
            "type": "integer",
            "format": "int64"
          },
          "currency": {
            "type": "string"
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dateHasTime": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "dateTimeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "paymentMethod": {
            "description": "`PaymentMethod`: how an expense was paid.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "CARD",
              "COMPANY_CARD",
              "INVOICE",
              "WALLET",
              null
            ],
            "x-enum-open": true
          },
          "paymentCardId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "walletId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        },
        "required": [
          "amount",
          "currency",
          "date",
          "dateHasTime",
          "dateTimeZone",
          "paymentMethod",
          "paymentCardId",
          "walletId"
        ]
      },
      "CostDto": {
        "description": "One cost on the wire (`ExpenseCostDto`).",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "position": {
            "type": "integer",
            "format": "int32"
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "$ref": "#/components/schemas/CostRole"
          },
          "grossAmount": {
            "description": "Minor units of the expense's currency.",
            "type": "integer",
            "format": "int64"
          },
          "taxState": {
            "$ref": "#/components/schemas/TaxState"
          },
          "taxComponents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostTaxDto"
            }
          },
          "dimensions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostDimensionDto"
            }
          }
        },
        "required": [
          "id",
          "position",
          "description",
          "categoryId",
          "role",
          "grossAmount",
          "taxState",
          "taxComponents",
          "dimensions"
        ]
      },
      "ReceiptRemainderPreviewRequest": {
        "description": "The preview's body: the shared receipt's SHA-256 (hex). The receipt is stored already;\n its bytes never pass through the API again (SPINE 26.10 item 5).",
        "type": "object",
        "properties": {
          "sha256": {
            "description": "The receipt file's SHA-256, 64 hexadecimal characters.",
            "type": "string"
          }
        },
        "additionalProperties": false,
        "required": [
          "sha256"
        ]
      },
      "ReceiptRemainderPreviewDto": {
        "description": "`ReceiptRemainderPreviewDto`.",
        "type": "object",
        "properties": {
          "proposal": {
            "description": "`ReceiptRemainderProposalDto`, Nest's key order.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "expenseId": {
                "type": "string"
              },
              "attachmentId": {
                "type": "string"
              },
              "captureId": {
                "type": "integer",
                "format": "int32"
              },
              "sha256": {
                "type": "string"
              },
              "evidenceHash": {
                "type": "string"
              },
              "expectedCostsRevision": {
                "type": "integer",
                "format": "int32"
              },
              "currency": {
                "type": "string"
              },
              "declinedUnpriced": {
                "description": "A declined item whose evidence carries no usable amount subtracted nothing\n (Nest's `z.boolean().default(false)`: absent reads as `false`; answers always\n carry it).",
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "documentTotal": {
                "type": "integer",
                "format": "int64"
              },
              "claimedAmount": {
                "type": "integer",
                "format": "int64"
              },
              "remainingAmount": {
                "type": "integer",
                "format": "int64"
              }
            },
            "additionalProperties": false,
            "required": [
              "expenseId",
              "attachmentId",
              "captureId",
              "sha256",
              "evidenceHash",
              "expectedCostsRevision",
              "currency",
              "documentTotal",
              "claimedAmount",
              "remainingAmount"
            ]
          }
        },
        "required": [
          "proposal"
        ]
      },
      "ReceiptRemainderSuggestionsDto": {
        "description": "`ReceiptRemainderSuggestionsDto`.",
        "type": "object",
        "properties": {
          "proposal": {
            "$ref": "#/components/schemas/ReceiptRemainderProposalDto"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "`SUGGESTED` or `MANUAL`.",
            "type": "string"
          },
          "expenses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReceiptRemainderSuggestionDto"
            }
          }
        },
        "required": [
          "proposal",
          "organizationId",
          "merchant",
          "date",
          "status",
          "expenses"
        ]
      },
      "ReceiptRemainderSuggestionDto": {
        "description": "`ReceiptRemainderSuggestionDto`.",
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "amount": {
            "type": "integer",
            "format": "int64"
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "categoryTitle": {
            "type": [
              "string",
              "null"
            ]
          },
          "sourceText": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "description",
          "categoryId",
          "categoryTitle",
          "sourceText"
        ]
      },
      "ReceiptRemainderDeclineDto": {
        "description": "`ReceiptRemainderDeclineDto`.",
        "type": "object",
        "properties": {
          "proposal": {
            "$ref": "#/components/schemas/ReceiptRemainderProposalDto"
          },
          "reason": {
            "$ref": "#/components/schemas/DeclineReason"
          }
        },
        "additionalProperties": false,
        "required": [
          "proposal",
          "reason"
        ]
      },
      "DeclineReason": {
        "description": "Why a declined entry was declined.",
        "type": "string",
        "enum": [
          "PRIVATE",
          "OTHER"
        ],
        "x-enum-open": true
      },
      "CostsCreateDto": {
        "description": "`CostsCreateDto`: one strict object, two modes.",
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 2000
          },
          "id": {
            "description": "The new expense's id (client-minted).",
            "type": "string"
          },
          "reportId": {
            "description": "The report the expense lands on.",
            "type": "string"
          },
          "header": {
            "description": "Compose: the header (its FX decision AUTO or MANUAL).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "amount": {
                "description": "Minor units of `currency`.",
                "type": "integer",
                "format": "int64"
              },
              "currency": {
                "type": "string"
              },
              "date": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "dateHasTime": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "dateTimeZone": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 64
              },
              "paymentMethod": {
                "description": "`PaymentMethod`: how an expense was paid.",
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "CARD",
                  "COMPANY_CARD",
                  "INVOICE",
                  "WALLET",
                  null
                ]
              },
              "paymentCardId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "walletId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "fx": {
                "$ref": "#/components/schemas/FxCommand"
              }
            },
            "additionalProperties": false,
            "required": [
              "amount",
              "currency",
              "date",
              "dateHasTime",
              "dateTimeZone",
              "paymentMethod",
              "paymentCardId",
              "walletId",
              "fx"
            ]
          },
          "costs": {
            "description": "Compose: the complete composition.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/CostWire"
            }
          },
          "splitContext": {
            "description": "The editor's context on a cost write (`splitContextSchema`).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "expectedVersion": {
                "type": "integer",
                "format": "int32"
              },
              "groups": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/GroupInput"
                }
              },
              "declined": {
                "description": "Absent keeps the stored decisions; `[]` clears them.",
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "$ref": "#/components/schemas/DeclinedEntry"
                }
              }
            },
            "additionalProperties": false,
            "required": [
              "expectedVersion",
              "groups"
            ]
          },
          "expectedSplitContextVersion": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "from": {
            "description": "Separate: where the money comes from.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "expenseId": {
                "type": "string"
              },
              "costIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1,
                "maxItems": 100
              },
              "expectedCostsRevision": {
                "type": "integer",
                "format": "int32",
                "minimum": 0
              },
              "mode": {
                "$ref": "#/components/schemas/SeparateMode",
                "default": "MOVE"
              }
            },
            "additionalProperties": false,
            "required": [
              "expenseId",
              "costIds",
              "expectedCostsRevision",
              "mode"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "reportId"
        ]
      },
      "CostsHeaderWire": {
        "description": "The header the costs are written against, with the FX decision.",
        "type": "object",
        "properties": {
          "amount": {
            "description": "Minor units of `currency`.",
            "type": "integer",
            "format": "int64"
          },
          "currency": {
            "type": "string"
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dateHasTime": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "dateTimeZone": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64
          },
          "paymentMethod": {
            "description": "`PaymentMethod`: how an expense was paid.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "CARD",
              "COMPANY_CARD",
              "INVOICE",
              "WALLET",
              null
            ]
          },
          "paymentCardId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "walletId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "fx": {
            "$ref": "#/components/schemas/FxCommand"
          }
        },
        "additionalProperties": false,
        "required": [
          "amount",
          "currency",
          "date",
          "dateHasTime",
          "dateTimeZone",
          "paymentMethod",
          "paymentCardId",
          "walletId",
          "fx"
        ]
      },
      "CostWire": {
        "description": "One cost on the wire (`costSchema`), serialized back as the schema parsed it.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "position": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "maximum": 99
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "role": {
            "$ref": "#/components/schemas/CostRole"
          },
          "grossAmount": {
            "type": "integer",
            "format": "int64"
          },
          "taxState": {
            "$ref": "#/components/schemas/TaxState"
          },
          "taxComponents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostTaxWire"
            },
            "maxItems": 5
          },
          "dimensions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostDimensionWire"
            },
            "maxItems": 20
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "position",
          "role",
          "grossAmount",
          "taxState",
          "taxComponents",
          "dimensions"
        ]
      },
      "CostTaxWire": {
        "description": "A tax component on the wire. It serializes back as the schema parsed it (a key the\n client left out stays out; an explicit `null` stays): the line's fact records it so.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/TaxKind"
          },
          "jurisdiction": {
            "type": [
              "string",
              "null"
            ]
          },
          "ratePercent": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "kind",
          "amount"
        ]
      },
      "CostDimensionWire": {
        "description": "A dimension selection on the wire.",
        "type": "object",
        "properties": {
          "definitionId": {
            "type": "string",
            "format": "uuid"
          },
          "valueId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "definitionId",
          "valueId"
        ]
      },
      "GroupInput": {
        "description": "A split group as the editor writes it (`splitGroupSchema`).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "costIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "selections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SelectionInput"
            }
          },
          "adjustments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdjustmentInput"
            }
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "costIds",
          "selections",
          "adjustments"
        ]
      },
      "SelectionInput": {
        "description": "An item portion as the editor writes it.",
        "type": "object",
        "properties": {
          "itemizationId": {
            "type": "string",
            "format": "uuid"
          },
          "itemId": {
            "type": "string",
            "format": "uuid"
          },
          "numerator": {
            "type": "string"
          },
          "denominator": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "required": [
          "itemizationId",
          "itemId",
          "numerator",
          "denominator"
        ]
      },
      "AdjustmentInput": {
        "description": "An adjustment as the editor writes it.",
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "amount": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false,
        "required": [
          "description",
          "amount"
        ]
      },
      "DeclinedEntry": {
        "description": "A decision not to claim money (`declinedEntrySchema`): an item the person refused,\n or the remaining balance (\"resten er privat\").",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "itemizationId": {
                "type": "string",
                "format": "uuid"
              },
              "itemId": {
                "type": "string",
                "format": "uuid"
              },
              "reason": {
                "$ref": "#/components/schemas/DeclineReason"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "ITEM"
                ],
                "x-enum-open": true
              }
            },
            "additionalProperties": false,
            "required": [
              "kind",
              "itemizationId",
              "itemId",
              "reason"
            ]
          },
          {
            "type": "object",
            "properties": {
              "amount": {
                "description": "Minor units, positive.",
                "type": "integer",
                "format": "int64"
              },
              "reason": {
                "$ref": "#/components/schemas/DeclineReason"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "BALANCE"
                ],
                "x-enum-open": true
              }
            },
            "additionalProperties": false,
            "required": [
              "kind",
              "amount",
              "reason"
            ]
          }
        ]
      },
      "SeparateMode": {
        "description": "MOVE takes the money with it; COPY makes a second claim.",
        "type": "string",
        "enum": [
          "MOVE",
          "COPY"
        ]
      },
      "AttachmentItemizationDto": {
        "description": "`AttachmentItemizationDto`, Nest's key order.",
        "type": "object",
        "properties": {
          "attachmentId": {
            "type": "string"
          },
          "status": {
            "description": "`NOT_REQUESTED`, `PENDING`, `AVAILABLE`, `PARTIAL`, `UNAVAILABLE` or `FAILED`.",
            "type": "string"
          },
          "latestAttemptStatus": {
            "description": "The latest attempt for the current source (`PENDING`, `AVAILABLE`, `PARTIAL`,\n `UNAVAILABLE`, `FAILED`), `null` when none was made.",
            "type": [
              "string",
              "null"
            ]
          },
          "snapshotId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "generation": {
            "type": "integer",
            "format": "int32"
          },
          "schemaVersion": {
            "type": "integer",
            "format": "int32"
          },
          "documentCurrency": {
            "type": [
              "string",
              "null"
            ]
          },
          "documentTotal": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "reconciliation": {
            "description": "`RECONCILED`, `MISMATCH`, `UNKNOWN` or `PARTIAL`.",
            "type": [
              "string",
              "null"
            ]
          },
          "difference": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "adjustments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdjustmentView"
            }
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentItemDto"
            }
          }
        },
        "required": [
          "attachmentId",
          "status",
          "latestAttemptStatus",
          "snapshotId",
          "generation",
          "schemaVersion",
          "documentCurrency",
          "documentTotal",
          "reconciliation",
          "difference",
          "adjustments",
          "items"
        ]
      },
      "AdjustmentView": {
        "description": "A signed adjustment as read back.",
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "amount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "inclusion": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "amount",
          "inclusion"
        ]
      },
      "AttachmentItemDto": {
        "description": "One printed line (`AttachmentItemDto`).",
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ordinal": {
            "type": "integer",
            "format": "int32"
          },
          "quantity": {
            "type": [
              "string",
              "null"
            ]
          },
          "unit": {
            "type": [
              "string",
              "null"
            ]
          },
          "unitPrice": {
            "type": [
              "string",
              "null"
            ]
          },
          "extendedAmount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "amountBasis": {
            "type": "string"
          },
          "taxAmount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "taxRate": {
            "type": [
              "string",
              "null"
            ]
          },
          "sourcePage": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "sourceText": {
            "type": [
              "string",
              "null"
            ]
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "ordinal",
          "description",
          "quantity",
          "unit",
          "unitPrice",
          "extendedAmount",
          "amountBasis",
          "taxAmount",
          "taxRate",
          "sourcePage",
          "sourceText",
          "warnings"
        ]
      },
      "AttachmentItemizationRequestDto": {
        "description": "`AttachmentItemizationRequestDto`.",
        "type": "object",
        "properties": {
          "requestId": {
            "description": "The client's idempotency key for the request.",
            "type": "string"
          },
          "reextract": {
            "description": "Always new work (REEXTRACTION) rather than reusing the source's.",
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "requestId"
        ]
      },
      "WriteCosts": {
        "description": "The body (`costsWriteSchema`).",
        "type": "object",
        "properties": {
          "splitContext": {
            "description": "The editor's context; `null` drops the editor history (at\n `expectedSplitContextVersion`).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "expectedVersion": {
                "type": "integer",
                "format": "int32"
              },
              "groups": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/GroupInput"
                }
              },
              "declined": {
                "description": "Absent keeps the stored decisions; `[]` clears them.",
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "$ref": "#/components/schemas/DeclinedEntry"
                }
              }
            },
            "additionalProperties": false,
            "required": [
              "expectedVersion",
              "groups"
            ]
          },
          "expectedSplitContextVersion": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "expectedCostsRevision": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "header": {
            "$ref": "#/components/schemas/CostsHeaderWire"
          },
          "costs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostWire"
            },
            "minItems": 1,
            "maxItems": 100
          }
        },
        "additionalProperties": false,
        "required": [
          "expectedCostsRevision",
          "header",
          "costs"
        ]
      },
      "VatRecovery": {
        "description": "An expense's VAT recovery (Nest `TaxRecoveryDto`).",
        "type": "object",
        "properties": {
          "expenseId": {
            "type": "string"
          },
          "reportId": {
            "type": "string"
          },
          "costsRevision": {
            "type": "integer",
            "format": "int32"
          },
          "currency": {
            "type": "string"
          },
          "canEdit": {
            "description": "Whether the caller may write a decision now.",
            "type": "boolean"
          },
          "unavailableReason": {
            "description": "Why not: `tax_recovery_unavailable`, or layer 2's refusal code.",
            "type": [
              "string",
              "null"
            ]
          },
          "costs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostVatRecovery"
            }
          }
        },
        "required": [
          "expenseId",
          "reportId",
          "costsRevision",
          "currency",
          "canEdit",
          "unavailableReason",
          "costs"
        ]
      },
      "CostVatRecovery": {
        "description": "One cost's VAT recovery.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/CostRole"
          },
          "taxState": {
            "$ref": "#/components/schemas/TaxState"
          },
          "accountCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "accountCodeStatus": {
            "$ref": "#/components/schemas/AccountCodeStatus"
          },
          "taxComponents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VatComponentRecovery"
            }
          }
        },
        "required": [
          "id",
          "role",
          "description",
          "taxState",
          "accountCode",
          "accountCodeStatus",
          "taxComponents"
        ]
      },
      "AccountCodeStatus": {
        "description": "Where a cost's account code comes from (only its category's default today).",
        "type": "string",
        "enum": [
          "CATEGORY_DEFAULT"
        ],
        "x-enum-open": true
      },
      "VatComponentRecovery": {
        "description": "One VAT component's recovery (wire `taxComponents[]`).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "amount": {
            "description": "Minor units of the expense's currency.",
            "type": "integer",
            "format": "int64"
          },
          "recoverableAmount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "recoveryStatus": {
            "$ref": "#/components/schemas/RecoveryStatus"
          },
          "recoverySource": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "amount",
          "recoverableAmount",
          "recoveryStatus",
          "recoverySource"
        ]
      },
      "WriteVatRecovery": {
        "description": "The body (`taxRecoveryWriteSchema`).",
        "type": "object",
        "properties": {
          "expectedCostsRevision": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "reason": {
            "description": "Why (recorded in the fact, trimmed).",
            "type": "string"
          },
          "decisions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VatDecision"
            },
            "minItems": 1,
            "maxItems": 500
          }
        },
        "additionalProperties": false,
        "required": [
          "expectedCostsRevision",
          "reason",
          "decisions"
        ]
      },
      "VatDecision": {
        "description": "One decision (`MANUAL` carries `recoverableAmount`, `AUTO` none).",
        "type": "object",
        "properties": {
          "costId": {
            "type": "string",
            "format": "uuid"
          },
          "taxComponentId": {
            "type": "string",
            "format": "uuid"
          },
          "mode": {
            "$ref": "#/components/schemas/DecisionMode"
          },
          "recoverableAmount": {
            "description": "Minor units; within `[0, amount]` (or `[amount, 0]` for a negative component).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "additionalProperties": false,
        "required": [
          "costId",
          "taxComponentId",
          "mode"
        ]
      },
      "DecisionMode": {
        "description": "A decision's mode.",
        "type": "string",
        "enum": [
          "AUTO",
          "MANUAL"
        ],
        "x-enum-descriptions": [
          "Clear the manual decision: the component is unresolved again.",
          "The reviewer's recoverable amount."
        ]
      },
      "CostSplitContextDto": {
        "description": "`CostSplitContextDto`.",
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "schemaVersion": {
            "type": "integer",
            "format": "int32"
          },
          "groups": {
            "type": "array",
            "items": true
          },
          "declined": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeclinedEntry"
            }
          },
          "snapshots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContextSnapshot"
            }
          }
        },
        "required": [
          "version",
          "schemaVersion",
          "groups",
          "declined",
          "snapshots"
        ]
      },
      "ContextSnapshot": {
        "description": "An itemization a reachable selection comes from.",
        "type": "object",
        "properties": {
          "itemizationId": {
            "type": "string",
            "format": "uuid"
          },
          "attachmentId": {
            "type": "string"
          }
        },
        "required": [
          "itemizationId",
          "attachmentId"
        ]
      },
      "CostDimensionCatalog": {
        "description": "`CostDimensionCatalogDto`.",
        "type": "object",
        "properties": {
          "nextDefinitionCursor": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "definitions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogDefinition"
            }
          }
        },
        "required": [
          "nextDefinitionCursor",
          "definitions"
        ]
      },
      "CatalogDefinition": {
        "description": "One definition with a page of its values.",
        "type": "object",
        "properties": {
          "title": {
            "description": "The organization's title of a custom definition; null on a built-in one (the\n client words `kind`).",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "key": {
            "type": "string"
          },
          "kind": {
            "description": "PROJECT, DEPARTMENT or CUSTOM.",
            "type": "string"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogValue"
            }
          }
        },
        "required": [
          "id",
          "key",
          "title",
          "kind",
          "nextCursor",
          "values"
        ]
      },
      "CatalogValue": {
        "description": "One value.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "departmentId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        },
        "required": [
          "id",
          "title",
          "projectId",
          "departmentId"
        ]
      },
      "CreateFlowDto": {
        "description": "`CreateFlowDto`.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "trigger": {
            "description": "Deprecated: use `triggers` (shim F1, kept while the recorded catalog sends it).",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "REPORT_SUBMITTED",
              "REPORT_REVIEWED",
              "FINDING_DETECTED",
              "FINDING_RESOLVED",
              null
            ],
            "x-enum-descriptions": [
              "",
              "",
              "A finding opened (or reopened) on a submitted report.",
              "A finding was resolved (human triage or machine auto-close)."
            ],
            "deprecated": true
          },
          "triggers": {
            "description": "The triggers that activate this flow.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/FlowTrigger"
            }
          },
          "isActive": {
            "description": "Ignored: a new flow is always an inactive draft.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "rootNodeId": {
            "description": "Null means no explicit root, which turns sequential auto-linking on.",
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "nodes": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/CreateFlowNodeDto"
            }
          }
        },
        "required": [
          "name"
        ]
      },
      "CreateFlowNodeDto": {
        "description": "`CreateFlowNodeDto`: one draft node as the editor sends it.",
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/FlowNodeType"
          },
          "id": {
            "description": "The editor's client-minted id; minted here when absent or null.",
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "config": {
            "description": "Node configuration (type-specific); a draft may hold an incomplete one (opaque at the\n edge, as Nest's: validate and publish judge it).",
            "anyOf": [
              {
                "$ref": "#/components/schemas/FlowNodeConfig"
              },
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "nextNodeId": {
            "description": "Null cuts the link.",
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "positionX": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "positionY": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          }
        },
        "required": [
          "name",
          "type"
        ]
      },
      "FlowNodeType": {
        "description": "`FlowNodeType`.",
        "type": "string",
        "enum": [
          "CONDITION",
          "ACTION",
          "WAIT"
        ],
        "x-enum-descriptions": [
          "Branching on context fields.",
          "Executes an action (approve, reject, require review, …).",
          "Pauses until a condition holds (or times out)."
        ],
        "x-enum-open": true
      },
      "FlowNodeDraftConfig": {
        "description": "A FlowNodeConfig, or a draft's work in progress (any object): validate and publish judge it.",
        "anyOf": [
          {
            "$ref": "#/components/schemas/FlowNodeConfig"
          },
          {
            "type": "object"
          }
        ]
      },
      "FlowNodeConfig": {
        "description": "A node's config, by its `type`: CONDITION (`branches`), ACTION (`actionType`) or WAIT\n (`condition`, `onTimeout`).",
        "anyOf": [
          {
            "$ref": "#/components/schemas/ConditionNodeConfig"
          },
          {
            "$ref": "#/components/schemas/ActionNodeConfig"
          },
          {
            "$ref": "#/components/schemas/WaitNodeConfig"
          }
        ]
      },
      "ConditionNodeConfig": {
        "description": "A CONDITION node's config.",
        "type": "object",
        "properties": {
          "branches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConditionBranch"
            }
          },
          "defaultNodeId": {
            "description": "Where the walk goes when no branch matches.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "branches"
        ]
      },
      "ConditionBranch": {
        "description": "One branch of a CONDITION node: the first that matches wins.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "field": {
            "description": "Dot-notation context path (`report.totalAmount`).",
            "type": "string"
          },
          "operator": {
            "$ref": "#/components/schemas/NodeConditionOperator"
          },
          "value": {
            "type": "string"
          },
          "collectionCriteria": {
            "description": "A collection operator's item criteria (`ONE_OF`/`ALL`/`NONE`).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "field": {
                "description": "Relative path within the item (`amount`).",
                "type": "string"
              },
              "operator": {
                "$ref": "#/components/schemas/NodeConditionOperator"
              },
              "value": {
                "description": "Compared as the operator parses it (stored as a string).",
                "type": "string"
              }
            },
            "required": [
              "field",
              "operator",
              "value"
            ]
          },
          "nextNodeId": {
            "description": "The node this branch leads to. `null` in a draft while the branch is not connected\n yet (the editor autosaves it so); validate and publish require it.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "field",
          "operator",
          "value",
          "nextNodeId"
        ]
      },
      "NodeConditionOperator": {
        "description": "`ConditionOperator`.",
        "type": "string",
        "enum": [
          "EQUALS",
          "NOT_EQUALS",
          "GT",
          "GTE",
          "LT",
          "LTE",
          "IN",
          "NOT_IN",
          "MATCHES",
          "IS_NULL",
          "IS_NOT_NULL",
          "ONE_OF",
          "ALL",
          "NONE"
        ],
        "x-enum-open": true
      },
      "ActionNodeConfig": {
        "description": "An ACTION node's config: `actionType` and its section.",
        "type": "object",
        "properties": {
          "actionType": {
            "$ref": "#/components/schemas/NodeActionType"
          },
          "requireReview": {
            "description": "`REQUIRE_REVIEW`: who must review (the reviewer criteria) and how.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "accountRole": {
                "description": "`AccountRole` (0 owner … 3 user).",
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              },
              "departmentRole": {
                "description": "`DepartmentRole`.",
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              },
              "projectRole": {
                "description": "`ProjectRole`.",
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              },
              "accountId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "customRoleId": {
                "description": "One of the organization's custom roles (`GET /organizations/{id}/member-roles`,\n `type: CUSTOM`): the members holding it review. Combines with `departmentRole` and\n `projectRole` as `accountRole` does; org-specific, so an exported flow carries an id\n another org refuses.",
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "managerOfSubmitter": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "allowSubmitterMatch": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "message": {
                "description": "Shown when the review is requested.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "noReviewersNodeId": {
                "description": "Where the walk goes when no reviewer matches.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "invalidateOnChange": {
                "description": "The report fields whose change invalidates an approval (`amount`, `departmentId`,\n `projectId`; all of them when absent).",
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "string"
                }
              },
              "projectScope": {
                "description": "`EACH`, `ANY` or `ALL`.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "function": {
                "description": "What deciding the step means: `APPROVE` (default) or `ATTEST`.",
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "APPROVE",
                  "ATTEST",
                  null
                ],
                "x-enum-open": true
              }
            }
          },
          "comment": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "message": {
                "type": "string"
              },
              "isInternal": {
                "type": [
                  "boolean",
                  "null"
                ]
              }
            },
            "required": [
              "message"
            ]
          },
          "update": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "field": {
                "type": "string"
              },
              "value": {
                "type": "string"
              }
            },
            "required": [
              "field",
              "value"
            ]
          },
          "httpRequest": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "url": {
                "type": "string"
              },
              "method": {
                "$ref": "#/components/schemas/HttpRequestMethod"
              },
              "headers": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": {
                  "type": "string"
                }
              },
              "body": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "onError": {
                "$ref": "#/components/schemas/HttpRequestOnError"
              },
              "timeout": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              },
              "retry": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "maxRetries": {
                    "description": "At most 5.",
                    "type": "integer",
                    "format": "int64"
                  },
                  "initialDelayMs": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64"
                  },
                  "maxDelayMs": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64"
                  }
                },
                "required": [
                  "maxRetries"
                ]
              }
            },
            "required": [
              "url",
              "method",
              "onError"
            ]
          },
          "reject": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "reason": {
                "type": "string"
              }
            },
            "required": [
              "reason"
            ]
          },
          "autoDecide": {
            "description": "`AUTO_DECIDE`: the flow decides a step itself, recorded as an AUTOMATIC decision with the\n flow version; the version's publisher is accountable for it.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "function": {
                "description": "`APPROVE` (default) or `ATTEST`.",
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "APPROVE",
                  "ATTEST",
                  null
                ],
                "x-enum-open": true
              },
              "label": {
                "description": "What the decision is called on the report's approval path.",
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "blocking": {
            "description": "Pause the flow until the action resolves.",
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "required": [
          "actionType"
        ]
      },
      "NodeActionType": {
        "description": "`FlowActionType`.",
        "type": "string",
        "enum": [
          "APPROVE",
          "REJECT",
          "REQUIRE_REVIEW",
          "COMMENT",
          "UPDATE",
          "HTTP_REQUEST",
          "AUTO_DECIDE"
        ],
        "x-enum-open": true
      },
      "HttpRequestMethod": {
        "type": "string",
        "enum": [
          "GET",
          "POST",
          "PUT",
          "PATCH",
          "DELETE"
        ],
        "x-enum-open": true
      },
      "HttpRequestOnError": {
        "type": "string",
        "enum": [
          "continue",
          "block",
          "fail"
        ],
        "x-enum-open": true
      },
      "WaitNodeConfig": {
        "description": "A WAIT node's config.",
        "type": "object",
        "properties": {
          "condition": {
            "$ref": "#/components/schemas/WaitCondition"
          },
          "timeoutAt": {
            "description": "When to stop waiting (ISO 8601).",
            "type": [
              "string",
              "null"
            ]
          },
          "onTimeout": {
            "$ref": "#/components/schemas/WaitOnTimeout"
          }
        },
        "required": [
          "condition",
          "onTimeout"
        ]
      },
      "WaitCondition": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "operator": {
            "$ref": "#/components/schemas/NodeConditionOperator"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "field",
          "operator",
          "value"
        ]
      },
      "WaitOnTimeout": {
        "type": "string",
        "enum": [
          "continue",
          "fail"
        ],
        "x-enum-open": true
      },
      "ListPage_FlowListItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlowListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "FlowListItem": {
        "description": "A flow in `GET /flows` (every field of [`FlowDetail`] but the nodes and the published\n snapshot).",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "triggers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlowTrigger"
            }
          },
          "isActive": {
            "type": "boolean"
          },
          "rootNodeId": {
            "type": [
              "string",
              "null"
            ]
          },
          "nodeCount": {
            "type": "integer",
            "format": "uint64",
            "minimum": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "isPublished": {
            "description": "Published at least once.",
            "type": "boolean"
          },
          "hasDraftChanges": {
            "type": "boolean"
          },
          "publishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "organizationId",
          "name",
          "description",
          "triggers",
          "isActive",
          "rootNodeId",
          "nodeCount",
          "createdAt",
          "updatedAt",
          "isPublished",
          "hasDraftChanges",
          "publishedAt"
        ]
      },
      "ImportFlowDto": {
        "description": "An exported flow document: name, description, triggers and nodes with symbolic ids.",
        "type": "object",
        "additionalProperties": true
      },
      "ListPage_TriggerInfoDto": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TriggerInfoDto"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "TriggerInfoDto": {
        "description": "`TriggerInfoDto`.",
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "trigger": {
            "$ref": "#/components/schemas/FlowTrigger"
          },
          "name": {
            "type": "string"
          },
          "subjectType": {
            "type": "string"
          },
          "isAvailable": {
            "description": "True when no live flow of the org uses the trigger yet.",
            "type": "boolean"
          }
        },
        "required": [
          "trigger",
          "name",
          "description",
          "subjectType",
          "isAvailable"
        ]
      },
      "TriggerSchemaDto": {
        "description": "`TriggerSchemaDto`.",
        "type": "object",
        "properties": {
          "trigger": {
            "$ref": "#/components/schemas/FlowTrigger"
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContextFieldSchemaDto"
            }
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContextFieldGroupDto"
            }
          }
        },
        "required": [
          "trigger",
          "fields",
          "groups"
        ]
      },
      "ContextFieldSchemaDto": {
        "description": "One context field (`ContextFieldSchema`).",
        "type": "object",
        "properties": {
          "description": {
            "description": "Help text (legacy, English; equals descriptions.en). No field carries one yet (Nest\n declared it and set none).",
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "description": "Field data type (string, number, boolean, date, array).",
            "type": "string"
          },
          "format": {
            "type": [
              "string",
              "null"
            ]
          },
          "path": {
            "description": "Dot-notation path (e.g. \"report.amount\").",
            "type": "string"
          },
          "label": {
            "description": "Human-readable label (legacy, English; equals labels.en).",
            "type": "string"
          },
          "labels": {
            "$ref": "#/components/schemas/LocalizedTextDto"
          },
          "descriptions": {
            "description": "A label pair (`LocalizedText`).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "en": {
                "description": "English label.",
                "type": "string"
              },
              "nb": {
                "description": "Norwegian bokmål label.",
                "type": "string"
              }
            },
            "required": [
              "en",
              "nb"
            ]
          },
          "enumValues": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/EnumValueDto"
            }
          },
          "refEntity": {
            "type": [
              "string",
              "null"
            ]
          },
          "group": {
            "description": "Group id for UI grouping; present in the response's \"groups\" list.",
            "type": [
              "string",
              "null"
            ]
          },
          "usage": {
            "description": "Usage hint: \"condition\", \"action\" or \"all\" (absent means all).",
            "type": [
              "string",
              "null"
            ]
          },
          "deprecated": {
            "description": "Retired from authoring (still resolvable and validated).",
            "type": "boolean"
          },
          "itemFields": {
            "description": "For array fields: the item fields collection operators may name.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/CollectionItemFieldSchemaDto"
            }
          }
        },
        "required": [
          "path",
          "type",
          "label",
          "labels"
        ]
      },
      "LocalizedTextDto": {
        "description": "A label pair (`LocalizedText`).",
        "type": "object",
        "properties": {
          "en": {
            "description": "English label.",
            "type": "string"
          },
          "nb": {
            "description": "Norwegian bokmål label.",
            "type": "string"
          }
        },
        "required": [
          "en",
          "nb"
        ]
      },
      "EnumValueDto": {
        "description": "One enum member with display labels.",
        "type": "object",
        "properties": {
          "value": {
            "description": "Wire value of the enum member.",
            "type": "string"
          },
          "labels": {
            "$ref": "#/components/schemas/LocalizedTextDto"
          }
        },
        "required": [
          "value",
          "labels"
        ]
      },
      "CollectionItemFieldSchemaDto": {
        "description": "A field inside a collection item (ONE_OF / ALL / NONE criteria).",
        "type": "object",
        "properties": {
          "description": {
            "description": "Help text (legacy, English; equals descriptions.en). No field carries one yet (Nest\n declared it and set none).",
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "description": "Collection item field data type (string, number, boolean, date).",
            "type": "string"
          },
          "format": {
            "description": "Value format hint. \"amountMinor\": integer minor currency units (øre).",
            "type": [
              "string",
              "null"
            ]
          },
          "path": {
            "description": "Relative field path within a collection item (e.g. \"amount\", \"projectId\").",
            "type": "string"
          },
          "label": {
            "description": "Human-readable label (legacy, English; equals labels.en).",
            "type": "string"
          },
          "labels": {
            "$ref": "#/components/schemas/LocalizedTextDto"
          },
          "descriptions": {
            "description": "A label pair (`LocalizedText`).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "en": {
                "description": "English label.",
                "type": "string"
              },
              "nb": {
                "description": "Norwegian bokmål label.",
                "type": "string"
              }
            },
            "required": [
              "en",
              "nb"
            ]
          },
          "enumValues": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/EnumValueDto"
            }
          },
          "refEntity": {
            "description": "Entity kind this id-field references: render an entity picker.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "path",
          "type",
          "label",
          "labels"
        ]
      },
      "ContextFieldGroupDto": {
        "description": "A field group (`ContextFieldGroup`).",
        "type": "object",
        "properties": {
          "id": {
            "description": "Stable group id that fields reference via their \"group\".",
            "type": "string"
          },
          "labels": {
            "$ref": "#/components/schemas/LocalizedTextDto"
          },
          "order": {
            "description": "Display order (ascending).",
            "type": "integer",
            "format": "uint32",
            "minimum": 0
          }
        },
        "required": [
          "id",
          "labels",
          "order"
        ]
      },
      "FlowDomain": {
        "description": "`FlowDomain`: the subject family a flow's triggers and actions belong to.",
        "type": "string",
        "enum": [
          "REPORT"
        ],
        "x-enum-open": true
      },
      "DomainSchemaDto": {
        "description": "`DomainSchemaDto`.",
        "type": "object",
        "properties": {
          "domain": {
            "$ref": "#/components/schemas/FlowDomain"
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContextFieldSchemaDto"
            }
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContextFieldGroupDto"
            }
          }
        },
        "required": [
          "domain",
          "fields",
          "groups"
        ]
      },
      "FlowDetail": {
        "description": "A flow (`GET /flows/{id}`, and what a status transition answers): the row, triggers as\n an array, the publish state and the draft nodes.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "triggers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlowTrigger"
            }
          },
          "isActive": {
            "type": "boolean"
          },
          "rootNodeId": {
            "description": "The draft entrypoint (not used for execution).",
            "type": [
              "string",
              "null"
            ]
          },
          "nodeCount": {
            "description": "The draft's node count.",
            "type": "integer",
            "format": "uint64",
            "minimum": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "publishedNodes": {
            "description": "The published snapshot that executes."
          },
          "publishedRootNodeId": {
            "description": "The published snapshot's entrypoint; null until the first publish.",
            "type": [
              "string",
              "null"
            ]
          },
          "publishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "currentVersionId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "nodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlowNode"
            }
          },
          "isPublished": {
            "description": "Published at least once.",
            "type": "boolean"
          },
          "hasDraftChanges": {
            "description": "The draft differs from the published snapshot (positions ignored).",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "organizationId",
          "name",
          "description",
          "triggers",
          "isActive",
          "rootNodeId",
          "nodeCount",
          "createdAt",
          "updatedAt",
          "publishedNodes",
          "publishedRootNodeId",
          "publishedAt",
          "currentVersionId",
          "nodes",
          "isPublished",
          "hasDraftChanges"
        ]
      },
      "FlowNode": {
        "description": "One draft node of a flow (a `flow_nodes` row).",
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/FlowNodeType"
          },
          "id": {
            "type": "string"
          },
          "flowId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "config": {
            "description": "A draft node's config: complete, or the work in progress a draft holds (a\n CONDITION's `{}` before its first branch).",
            "$ref": "#/components/schemas/FlowNodeDraftConfig"
          },
          "nextNodeId": {
            "type": [
              "string",
              "null"
            ]
          },
          "positionX": {
            "type": "number",
            "format": "double"
          },
          "positionY": {
            "type": "number",
            "format": "double"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "flowId",
          "type",
          "name",
          "config",
          "nextNodeId",
          "positionX",
          "positionY",
          "createdAt",
          "updatedAt"
        ]
      },
      "UpdateFlowDto": {
        "description": "`UpdateFlowDto`: a wholesale draft edit (QUIRKS Q7). Absent fields are kept.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "triggers": {
            "description": "Null keeps the triggers, as absent does.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/FlowTrigger"
            }
          },
          "isActive": {
            "type": "boolean"
          },
          "rootNodeId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "nodes": {
            "description": "Replaces every draft node when sent (null keeps them).",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/CreateFlowNodeDto"
            }
          }
        }
      },
      "FlowValidationResultDto": {
        "description": "The validate route's answer (`FlowValidationResultDto`).",
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationErrorDto"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationErrorDto"
            }
          }
        },
        "required": [
          "valid",
          "errors",
          "warnings"
        ]
      },
      "ValidationErrorDto": {
        "description": "`ValidationErrorDto`: an issue without its details.",
        "type": "object",
        "properties": {
          "nodeId": {
            "type": [
              "string",
              "null"
            ]
          },
          "field": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "message": {
            "type": "string"
          },
          "severity": {
            "$ref": "#/components/schemas/Severity"
          }
        },
        "required": [
          "message",
          "severity"
        ]
      },
      "Severity": {
        "description": "`error` or `warning`.",
        "type": "string",
        "enum": [
          "error",
          "warning"
        ],
        "x-enum-open": true
      },
      "FlowSimulationRequestDto": {
        "description": "`FlowSimulationRequestDto`.",
        "type": "object",
        "properties": {
          "trigger": {
            "description": "One of the flow's triggers (default: its first).",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "REPORT_SUBMITTED",
              "REPORT_REVIEWED",
              "FINDING_DETECTED",
              "FINDING_RESOLVED",
              null
            ],
            "x-enum-descriptions": [
              "",
              "",
              "A finding opened (or reopened) on a submitted report.",
              "A finding was resolved (human triage or machine auto-close)."
            ]
          },
          "data": {
            "description": "Test values keyed by dot-path field name, e.g. `{\"account.employeeNumber\": \"70043\"}`.",
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "continueAfterBlocking": {
            "description": "Walk on past blocking steps (default true).",
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "FlowSimulationResultDto": {
        "description": "A walk's outcome (`FlowEvaluationResult`, the simulate routes' body).",
        "type": "object",
        "properties": {
          "flowId": {
            "type": "string"
          },
          "flowName": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/RunStatus"
          },
          "nodeResults": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NodeSimulationResultDto"
            }
          },
          "blockedAtNodeId": {
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "cycles": {
            "description": "Cycles in the graph (simulation only).",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "warnings": {
            "description": "Template and other warnings collected from the node results (simulation only).",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "flowId",
          "flowName",
          "status",
          "nodeResults"
        ]
      },
      "RunStatus": {
        "description": "How a run (or simulation) ended.",
        "type": "string",
        "enum": [
          "COMPLETED",
          "BLOCKED",
          "FAILED"
        ],
        "x-enum-open": true
      },
      "NodeSimulationResultDto": {
        "description": "One evaluated node (`NodeEvaluationResult`): `result` is a branch, wait or action\n result object.",
        "type": "object",
        "properties": {
          "nodeId": {
            "type": "string"
          },
          "nodeName": {
            "type": "string"
          },
          "nodeType": {
            "$ref": "#/components/schemas/FlowNodeType"
          },
          "result": {
            "$ref": "#/components/schemas/NodeEvaluationResult"
          },
          "nextNodeId": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "nodeId",
          "nodeName",
          "nodeType",
          "result",
          "nextNodeId"
        ]
      },
      "NodeEvaluationResult": {
        "description": "What evaluating a node answered (`NodeSimulationResultDto.result`, a trace log's\n `result`): a branch's match, a wait's state or an action's outcome.",
        "type": "object",
        "properties": {
          "type": {
            "description": "`branch`, `wait` or the action's type.",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "blocking": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "terminal": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "branchMatched": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "branchId": {
            "type": [
              "string",
              "null"
            ]
          },
          "conditionMet": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "data": {
            "description": "The action's own details.",
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          }
        }
      },
      "DuplicateFlowDto": {
        "description": "`POST /flows/{id}/duplicate`'s body (Nest read `@Body('name')` raw).",
        "type": "object",
        "properties": {
          "name": {
            "description": "Defaults to `\"<name> (copy)\"`.",
            "type": "string",
            "maxLength": 255
          }
        }
      },
      "PublishFlowDto": {
        "description": "`POST /flows/{id}/publish`'s body (Nest read `@Body('changeNote')` raw).",
        "type": "object",
        "properties": {
          "changeNote": {
            "type": "string",
            "maxLength": 500
          }
        }
      },
      "DiscardDraftBody": {
        "description": "`POST /flows/{id}/discard`: the draft back to the published snapshot (Q9).",
        "type": "object"
      },
      "ListPage_FlowTraceListItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlowTraceListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "FlowTraceListItem": {
        "description": "One trace in `GET /flows/{id}/traces`: the row and its log count.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "flowId": {
            "type": "string",
            "format": "uuid"
          },
          "flowVersionId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "subjectType": {
            "type": "string"
          },
          "subjectId": {
            "type": "string"
          },
          "status": {
            "description": "RUNNING, COMPLETED, BLOCKED or FAILED.",
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "_count": {
            "$ref": "#/components/schemas/LogCount"
          }
        },
        "required": [
          "id",
          "flowId",
          "flowVersionId",
          "subjectType",
          "subjectId",
          "status",
          "startedAt",
          "completedAt",
          "error",
          "_count"
        ]
      },
      "LogCount": {
        "description": "`{ logs: n }`.",
        "type": "object",
        "properties": {
          "logs": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "logs"
        ]
      },
      "FlowTraceDetail": {
        "description": "One trace (`GET /flows/{id}/traces/{traceId}`): its list row's fields, its logs in\n entry order and its flow's summary.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "flowId": {
            "type": "string",
            "format": "uuid"
          },
          "flowVersionId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "subjectType": {
            "type": "string"
          },
          "subjectId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "_count": {
            "$ref": "#/components/schemas/LogCount"
          },
          "logs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlowTraceLog"
            }
          },
          "flow": {
            "$ref": "#/components/schemas/FlowSummary"
          }
        },
        "required": [
          "id",
          "flowId",
          "flowVersionId",
          "subjectType",
          "subjectId",
          "status",
          "startedAt",
          "completedAt",
          "error",
          "_count",
          "logs",
          "flow"
        ]
      },
      "FlowTraceLog": {
        "description": "One log line of a trace (a `flow_trace_logs` row).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "traceId": {
            "type": "string",
            "format": "uuid"
          },
          "nodeId": {
            "type": "string"
          },
          "nodeSnapshot": {
            "description": "The node as it was when the run entered it.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "type": {
                "$ref": "#/components/schemas/FlowNodeType"
              },
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "config": {
                "$ref": "#/components/schemas/FlowNodeConfig"
              },
              "nextNodeId": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "type",
              "config"
            ]
          },
          "enteredAt": {
            "type": "string",
            "format": "date-time"
          },
          "exitedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "result": {
            "description": "The node's branch, wait or action result.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "type": {
                "description": "`branch`, `wait` or the action's type.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "message": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "blocking": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "terminal": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "branchMatched": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "branchId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "conditionMet": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "data": {
                "description": "The action's own details.",
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": true
              }
            }
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "traceId",
          "nodeId",
          "nodeSnapshot",
          "enteredAt",
          "exitedAt",
          "result",
          "error"
        ]
      },
      "ListPage_FlowVersionListItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlowVersionListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "FlowVersionListItem": {
        "description": "One published version in `GET /flows/{id}/versions`.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "flowId": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "rootNodeId": {
            "type": [
              "string",
              "null"
            ]
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time"
          },
          "publishedBy": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "changeNote": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "flowId",
          "version",
          "rootNodeId",
          "publishedAt",
          "publishedBy",
          "changeNote"
        ]
      },
      "FlowVersionDetail": {
        "description": "A published version (`GET /flows/{id}/versions/{versionId}`), its snapshot included.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "flowId": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "nodes": {
            "description": "The published node snapshot."
          },
          "rootNodeId": {
            "type": [
              "string",
              "null"
            ]
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time"
          },
          "publishedBy": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "changeNote": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "flowId",
          "version",
          "nodes",
          "rootNodeId",
          "publishedAt",
          "publishedBy",
          "changeNote"
        ]
      },
      "RestoreVersionBody": {
        "description": "`POST /flows/{id}/versions/{versionId}/restore`: a version's snapshot into the\n draft (not published).",
        "type": "object"
      },
      "ReportFindingsOverview": {
        "description": "A report's findings as its review screens read them (a purpose read model): the open\n and require counts and every finding the caller may see.",
        "type": "object",
        "properties": {
          "openCount": {
            "description": "Open, non-baseline findings.",
            "type": "integer",
            "format": "uint32",
            "minimum": 0
          },
          "requireCount": {
            "description": "Of those, findings whose consequence blocks approval.",
            "type": "integer",
            "format": "uint32",
            "minimum": 0
          },
          "findings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FindingDetail"
            }
          }
        },
        "required": [
          "openCount",
          "requireCount",
          "findings"
        ]
      },
      "FindingDetail": {
        "description": "`FindingDto`.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "checkId": {
            "description": "Catalog check id, e.g. amountMismatch.",
            "type": "string"
          },
          "subjectType": {
            "$ref": "#/components/schemas/SubjectType"
          },
          "subjectId": {
            "type": "string"
          },
          "reportId": {
            "type": "string"
          },
          "variant": {
            "description": "Check-specific variant, e.g. 'over'.",
            "type": [
              "string",
              "null"
            ]
          },
          "detection": {
            "$ref": "#/components/schemas/Detection"
          },
          "triage": {
            "$ref": "#/components/schemas/Triage"
          },
          "confidence": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "tier": {
            "description": "Detector-assigned evidence tier the consequence rules key on.",
            "type": [
              "string",
              "null"
            ]
          },
          "evidence": {
            "description": "Check-specific evidence payload."
          },
          "consequence": {
            "description": "Consequence resolved at read time from catalog defaults + org CheckPolicy.",
            "$ref": "#/components/schemas/Consequence"
          },
          "baseline": {
            "description": "Backfilled finding: informs, never gates.",
            "type": "boolean"
          },
          "resolvedByUserId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "resolvedBySystem": {
            "description": "Resolved by re-evaluation, not a person.",
            "type": "boolean"
          },
          "resolveReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "resolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lastEvaluatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "expenseId": {
            "description": "The line (expense) the finding is about; null for report-level findings. Absent\n on a mutation echo of a finding the caller can no longer see.",
            "type": [
              "string",
              "null"
            ]
          },
          "presentation": {
            "description": "What to show and what this viewer may do. Absent only on a mutation echo of a\n finding the caller can no longer see (its check was just disabled).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "messageKey": {
                "type": "string"
              },
              "facts": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FindingFact"
                }
              },
              "severity": {
                "$ref": "#/components/schemas/FindingSeverity"
              },
              "strength": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "certain",
                  "strong",
                  null
                ],
                "x-enum-open": true
              },
              "kind": {
                "$ref": "#/components/schemas/FindingKind"
              },
              "actions": {
                "description": "Verdict buttons for THIS viewer, mapped to POST /findings/{id}/verdict. A confirmed\n authenticity finding offers refute (the overrule, note required) and undo to a\n Kontrollansvarlig only, and escalate to any other approver of a pending report. A\n check that states a fact (missingReceipt) never offers refute, only confirm\n («Godtas uten kvittering»).",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FindingAction"
                }
              },
              "fixes": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FindingFix"
                }
              },
              "previouslyConfirmed": {
                "type": "boolean"
              },
              "previouslyEscalated": {
                "type": "boolean"
              }
            },
            "required": [
              "messageKey",
              "facts",
              "severity",
              "strength",
              "kind",
              "actions",
              "fixes",
              "previouslyConfirmed",
              "previouslyEscalated"
            ]
          }
        },
        "required": [
          "id",
          "checkId",
          "subjectType",
          "subjectId",
          "reportId",
          "variant",
          "detection",
          "triage",
          "confidence",
          "tier",
          "evidence",
          "consequence",
          "baseline",
          "resolvedByUserId",
          "resolvedBySystem",
          "resolveReason",
          "resolvedAt",
          "lastEvaluatedAt",
          "createdAt"
        ]
      },
      "SubjectType": {
        "description": "`FindingSubjectType`: what a finding is about.",
        "type": "string",
        "enum": [
          "EXPENSE",
          "ATTACHMENT",
          "REPORT",
          "DUPLICATE_GROUP"
        ],
        "x-enum-open": true
      },
      "Detection": {
        "description": "`FindingDetectionState`: the machine-owned axis (Q2).",
        "type": "string",
        "enum": [
          "OPEN",
          "NOT_DETECTED",
          "SUBJECT_GONE"
        ],
        "x-enum-open": true
      },
      "Triage": {
        "description": "`FindingTriageState`: the human-owned axis (Q2).",
        "type": "string",
        "enum": [
          "PENDING",
          "DISMISSED",
          "CONFIRMED"
        ],
        "x-enum-open": true
      },
      "Consequence": {
        "description": "A finding's consequence, resolved at read time from the catalog and the org's\n CheckPolicy (never stored, Q11).",
        "type": "string",
        "enum": [
          "INFO",
          "WARN",
          "REQUIRE_RESOLUTION"
        ],
        "x-enum-open": true
      },
      "FindingFact": {
        "description": "A typed fact (`FindingFact`), tagged by `kind`.",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "role": {
                "type": "string"
              },
              "amountMinor": {
                "type": "string"
              },
              "currency": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "kind": {
                "type": "string",
                "enum": [
                  "money"
                ],
                "x-enum-open": true
              }
            },
            "required": [
              "kind",
              "role",
              "amountMinor",
              "currency"
            ]
          },
          {
            "type": "object",
            "properties": {
              "role": {
                "type": "string"
              },
              "firstMinor": {
                "type": "string"
              },
              "secondMinor": {
                "type": "string"
              },
              "differenceMinor": {
                "type": "string"
              },
              "currency": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "kind": {
                "type": "string",
                "enum": [
                  "moneyPair"
                ],
                "x-enum-open": true
              }
            },
            "required": [
              "kind",
              "role",
              "firstMinor",
              "secondMinor",
              "differenceMinor",
              "currency"
            ]
          },
          {
            "type": "object",
            "properties": {
              "role": {
                "type": "string"
              },
              "text": {
                "type": "string"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "phrase"
                ],
                "x-enum-open": true
              }
            },
            "required": [
              "kind",
              "role",
              "text"
            ]
          },
          {
            "type": "object",
            "properties": {
              "role": {
                "type": "string"
              },
              "text": {
                "type": "string"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "name"
                ],
                "x-enum-open": true
              }
            },
            "required": [
              "kind",
              "role",
              "text"
            ]
          },
          {
            "type": "object",
            "properties": {
              "source": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "generator"
                ],
                "x-enum-open": true
              }
            },
            "required": [
              "kind",
              "source",
              "name"
            ]
          },
          {
            "type": "object",
            "properties": {
              "signal": {
                "type": "string"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "signal"
                ],
                "x-enum-open": true
              }
            },
            "required": [
              "kind",
              "signal"
            ]
          },
          {
            "type": "object",
            "properties": {
              "role": {
                "type": "string"
              },
              "value": {
                "type": "number",
                "format": "double"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "percent"
                ],
                "x-enum-open": true
              }
            },
            "required": [
              "kind",
              "role",
              "value"
            ]
          },
          {
            "type": "object",
            "properties": {
              "date": {
                "type": "string"
              },
              "printedWeekday": {
                "type": "string"
              },
              "actualWeekday": {
                "type": "string"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "weekday"
                ],
                "x-enum-open": true
              }
            },
            "required": [
              "kind",
              "date",
              "printedWeekday",
              "actualWeekday"
            ]
          },
          {
            "description": "The other receipt of a duplicate pair, redacted for this viewer at read time.",
            "type": "object",
            "properties": {
              "methods": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "sameUser": {
                "type": "boolean"
              },
              "visible": {
                "type": "boolean"
              },
              "expenseId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reportId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reportTitle": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reportStatus": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "expenseDate": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "amountMinor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "currency": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "personName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "kind": {
                "type": "string",
                "enum": [
                  "counterpart"
                ],
                "x-enum-open": true
              }
            },
            "required": [
              "kind",
              "methods",
              "sameUser",
              "visible",
              "expenseId",
              "reportId",
              "reportTitle",
              "reportStatus",
              "expenseDate",
              "amountMinor",
              "currency",
              "personName"
            ]
          }
        ]
      },
      "FindingSeverity": {
        "description": "«Til info» / «Bør sjekkes» / «Må avklares».",
        "type": "string",
        "enum": [
          "info",
          "check",
          "resolve"
        ],
        "x-enum-open": true
      },
      "FindingKind": {
        "description": "What a confirmed finding means (`findingKind`): `ordinary` (a true warning can\n still be fine) or `authenticity` (is the receipt genuine at all?). Derived from the\n check's submitter visibility.",
        "type": "string",
        "enum": [
          "ordinary",
          "authenticity"
        ],
        "x-enum-open": true
      },
      "FindingAction": {
        "type": "string",
        "enum": [
          "refute",
          "confirm",
          "confirmAndReject",
          "escalate",
          "rejectReport",
          "undo"
        ],
        "x-enum-open": true
      },
      "FindingFix": {
        "type": "string",
        "enum": [
          "replaceReceipt",
          "useReceiptAmount",
          "addReceipt",
          "removeDuplicate",
          "shareCost"
        ],
        "x-enum-open": true
      },
      "DismissFindingDto": {
        "description": "`POST /findings/{id}/dismiss`.",
        "type": "object",
        "properties": {
          "reason": {
            "description": "Reason for dismissing the finding.",
            "$ref": "#/components/schemas/DismissReason"
          },
          "note": {
            "description": "Additional notes about the dismissal.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "reason"
        ]
      },
      "DismissReason": {
        "description": "`FindingResolveReason`.",
        "type": "string",
        "enum": [
          "FALSE_POSITIVE",
          "ACCEPTED",
          "OTHER"
        ]
      },
      "ConfirmFindingDto": {
        "description": "`POST /findings/{id}/confirm`.",
        "type": "object",
        "properties": {
          "note": {
            "description": "Additional notes about the confirmation.",
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "FindingVerdictDto": {
        "description": "`FindingVerdictDto`.",
        "type": "object",
        "properties": {
          "verdict": {
            "description": "refuted = «Avkreftet» (the warning is wrong); confirmed = «Bekreftet» (it is\n true). Omit only with then: escalate. A check that states a fact (missingReceipt)\n cannot be refuted: finding_not_refutable.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "refuted",
              "confirmed",
              null
            ]
          },
          "then": {
            "description": "Authenticity findings only: what happens to the report. reject = «Bekreft og\n avslå» (needs verdict: confirmed); escalate = «Eskaler».",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "reject",
              "escalate",
              null
            ]
          },
          "note": {
            "description": "The approver's internal note. Required when a Kontrollansvarlig refutes an\n already confirmed authenticity finding.",
            "type": [
              "string",
              "null"
            ]
          },
          "message": {
            "description": "then: reject only — the text the submitter reads, as the approver sent it. Becomes\n the rejection comment and the body of the request pinned to the line. Omitted, the\n pinned request carries only its messageKey.",
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "FindingVerdictOutcome": {
        "description": "`FindingVerdictResponseDto`.",
        "type": "object",
        "properties": {
          "finding": {
            "$ref": "#/components/schemas/FindingDetail"
          },
          "reportStatus": {
            "description": "The report status after the command. Escalation keeps it PENDING (the submitter\n still sees «Til godkjenning»).",
            "type": "string"
          },
          "annotationId": {
            "description": "then: reject — the request pinned to the line (visible to the submitter).",
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "escalatedReviewId": {
            "description": "then: escalate — the new pending review for the Kontrollansvarlig.",
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        },
        "required": [
          "finding",
          "reportStatus",
          "annotationId",
          "escalatedReviewId"
        ]
      },
      "UnresolveFinding": {
        "description": "`POST /findings/{id}/unresolve` (no body).",
        "type": "object"
      },
      "ListPage_EffectiveCheckPolicy": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EffectiveCheckPolicy"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "EffectiveCheckPolicy": {
        "description": "`EffectiveCheckPolicy`.",
        "type": "object",
        "properties": {
          "displayKey": {
            "description": "Localization-free key for the check's name in each client's copy table.",
            "type": "string"
          },
          "kind": {
            "description": "What «Bekreftet» means for this check.",
            "$ref": "#/components/schemas/FindingKind"
          },
          "usage90d": {
            "description": "The org's own last 90 days: findings raised (weak AI excluded) over receipts or\n lines created.",
            "$ref": "#/components/schemas/Usage"
          },
          "checkId": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "defaultEnabled": {
            "type": "boolean"
          },
          "hasPolicyRow": {
            "type": "boolean"
          },
          "params": {
            "type": "object",
            "additionalProperties": true
          },
          "consequenceRules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsequenceRule"
            }
          },
          "variants": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "tiers": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "visibleToSubmitter": {
            "type": "boolean"
          }
        },
        "required": [
          "displayKey",
          "kind",
          "usage90d",
          "checkId",
          "domain",
          "enabled",
          "defaultEnabled",
          "hasPolicyRow",
          "params",
          "consequenceRules",
          "visibleToSubmitter"
        ]
      },
      "Usage": {
        "description": "`usage90d`.",
        "type": "object",
        "properties": {
          "hits": {
            "type": "integer",
            "format": "uint64",
            "minimum": 0
          },
          "evaluated": {
            "type": "integer",
            "format": "uint64",
            "minimum": 0
          }
        },
        "required": [
          "hits",
          "evaluated"
        ]
      },
      "ConsequenceRule": {
        "description": "One consequence rule; the first matching rule of a set wins. The one type for the\n catalog's rules, a policy's stored and answered rules, and the rules a policy write\n carries (validated: a confidence lies in 0..=1).",
        "type": "object",
        "properties": {
          "when": {
            "description": "`ConsequenceRule.when`: every present field must match (null is no condition).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "variant": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "minConfidence": {
                "description": "Matches when the finding's confidence is at least this (unset never matches).",
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "tier": {
                "description": "Matches the finding's evidence tier; must be one the check declares (integrity\n aiOrigin: proof | corroborated | uncorroborated). An untiered finding never\n matches.",
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "consequence": {
            "$ref": "#/components/schemas/Consequence"
          }
        },
        "required": [
          "consequence"
        ]
      },
      "UpdateCheckPolicyDto": {
        "description": "`PUT /organizations/{organizationId}/check-policies/{checkId}` (`UpdateCheckPolicyDto`).",
        "type": "object",
        "properties": {
          "enabled": {
            "description": "null clears the override (falls back to the catalog/legacy toggle).",
            "type": [
              "boolean",
              "null"
            ]
          },
          "params": {
            "description": "Check-specific tuning, validated against the catalog schema. Replaces the stored\n params override; preserve existing keys when editing.",
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "consequenceRules": {
            "description": "Ordered first-match-wins rules; replaces the catalog set.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ConsequenceRule"
            }
          }
        }
      },
      "ControlOfficersDto": {
        "description": "`ControlOfficersDto`.",
        "type": "object",
        "properties": {
          "designated": {
            "description": "Accounts the organization named as Kontrollansvarlig.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "effective": {
            "description": "Who decides now: the designated accounts, or the organization admins (owners and\n admins) while nobody is designated. Escalations go to these accounts.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "designated",
          "effective"
        ]
      },
      "DesignateControlOfficersDto": {
        "description": "`PUT /organizations/{organizationId}/control-officers`.",
        "type": "object",
        "properties": {
          "accountIds": {
            "description": "The organization's Kontrollansvarlige, as account ids. An empty list returns to\n the default: the organization's admins.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 100
          }
        },
        "required": [
          "accountIds"
        ]
      },
      "ListPage_DuplicateGroupDetail": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DuplicateGroupDetail"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "DuplicateGroupDetail": {
        "description": "A duplicate group (what its transitions answer, SPINE 26.1 rule 10).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "size": {
            "description": "Number of attachments in the group.",
            "type": "integer",
            "format": "uint32",
            "minimum": 0
          },
          "canonicalAttachmentId": {
            "description": "Canonical (earliest) attachment id.",
            "type": "string"
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ]
          },
          "businessDay": {
            "description": "Local calendar day 'yyyy-MM-dd'.",
            "type": [
              "string",
              "null"
            ]
          },
          "amountIncludingVat": {
            "description": "Amount in minor units, as a string (BigInt-safe).",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "Group-level resolution status (duplicates are advisory).",
            "$ref": "#/components/schemas/GroupStatus"
          },
          "resolvedByUserId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "resolveReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "resolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DuplicateGroupMember"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "size",
          "canonicalAttachmentId",
          "merchant",
          "businessDay",
          "amountIncludingVat",
          "status",
          "resolvedByUserId",
          "resolveReason",
          "resolvedAt",
          "members",
          "createdAt"
        ]
      },
      "GroupStatus": {
        "description": "`FingerprintMatchStatus`, reused for duplicate groups (shim S8: the spelling stays).",
        "type": "string",
        "enum": [
          "PENDING",
          "DISMISSED",
          "CONFIRMED"
        ],
        "x-enum-open": true
      },
      "DuplicateGroupMember": {
        "description": "`DuplicateGroupMemberDto`.",
        "type": "object",
        "properties": {
          "attachmentId": {
            "description": "Attachment in the duplicate group.",
            "type": "string"
          },
          "expenseId": {
            "description": "Expense id — null for another user's member (redacted).",
            "type": [
              "string",
              "null"
            ]
          },
          "reportId": {
            "description": "Report id — null for another user's member (redacted).",
            "type": [
              "string",
              "null"
            ]
          },
          "sameUser": {
            "description": "True when this member belongs to the requesting user.",
            "type": "boolean"
          },
          "isCanonical": {
            "description": "True for the canonical (representative) member.",
            "type": "boolean"
          },
          "joinedViaMethod": {
            "description": "High-precision method that placed this member in the group.",
            "$ref": "#/components/schemas/DetectionMethod"
          },
          "joinedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "attachmentId",
          "expenseId",
          "reportId",
          "sameUser",
          "isCanonical",
          "joinedViaMethod",
          "joinedAt"
        ]
      },
      "DetectionMethod": {
        "description": "`DetectionMethod`: how a duplicate (or an integrity signal) was found.",
        "type": "string",
        "enum": [
          "EXACT_FILE",
          "PERCEPTUAL",
          "FIELD_MATCH",
          "EMBEDDING",
          "EXIF_ANOMALY",
          "ELA_ANOMALY",
          "C2PA_AI_ORIGIN",
          "EMBEDDING_CLASSIFIER",
          "SPECTRAL_ANOMALY",
          "ENHANCED_EXIF",
          "DDA_CLASSIFIER"
        ],
        "x-enum-open": true
      },
      "DismissMatchDto": {
        "description": "`POST /duplicate-groups/{id}/dismiss` (`DismissMatchDto`).",
        "type": "object",
        "properties": {
          "reason": {
            "description": "Reason for dismissing the match.",
            "$ref": "#/components/schemas/GroupDismissReason"
          },
          "note": {
            "description": "Additional notes about the dismissal. Accepted and not stored (Nest passes only\n the reason on).",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "reason"
        ]
      },
      "GroupDismissReason": {
        "description": "`ResolveReason` (published inline, no component name).",
        "type": "string",
        "enum": [
          "FALSE_POSITIVE",
          "LEGITIMATE_RESUBMISSION",
          "KNOWN_DUPLICATE",
          "OTHER"
        ]
      },
      "ConfirmMatchDto": {
        "description": "`POST /duplicate-groups/{id}/confirm` (`ConfirmMatchDto`).",
        "type": "object",
        "properties": {
          "note": {
            "description": "Additional notes about the confirmation.",
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UnresolveGroup": {
        "description": "`POST /duplicate-groups/{id}/unresolve` (no body).",
        "type": "object"
      },
      "ListPage_DuplicateGroupResolution": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DuplicateGroupResolution"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "DuplicateGroupResolution": {
        "description": "`DuplicateGroupResolutionDto`.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "duplicateGroupId": {
            "type": "string"
          },
          "action": {
            "$ref": "#/components/schemas/ResolutionAction"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "userId": {
            "description": "The resolving user, or `deleted-user` when the user is gone (Nest's spelling).",
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "duplicateGroupId",
          "action",
          "userId",
          "createdAt"
        ]
      },
      "ResolutionAction": {
        "description": "`FingerprintResolutionAction`: what a `resolutions` row records.",
        "type": "string",
        "enum": [
          "DISMISSED",
          "CONFIRMED",
          "UNRESOLVED",
          "AUTO_RESOLVED"
        ],
        "x-enum-open": true
      },
      "TravelerReadDto": {
        "description": "`TravelerReadDto`.",
        "type": "object",
        "properties": {
          "attachmentId": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "status": {
            "description": "NOT_REQUESTED, PENDING, AVAILABLE, PARTIAL, UNAVAILABLE or FAILED.",
            "type": "string"
          },
          "failureCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "latestAttemptStatus": {
            "description": "The latest work's status (PENDING, RUNNING, COMPLETE, FAILED, CANCELLED).",
            "type": [
              "string",
              "null"
            ]
          },
          "resultId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "outcome": {
            "description": "MATCH, MISMATCH, UNKNOWN or NOT_APPLICABLE.",
            "type": "string"
          },
          "evidenceKey": {
            "type": [
              "string",
              "null"
            ]
          },
          "expectedName": {
            "type": [
              "string",
              "null"
            ]
          },
          "documentKind": {
            "type": [
              "string",
              "null"
            ]
          },
          "people": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TravelerPersonDto"
            }
          },
          "findingId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "acknowledgment": {
            "description": "The acknowledgment as the read shows it (`TravelerAcknowledgmentDto`).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "actorId": {
                "type": "string",
                "format": "uuid"
              },
              "actorType": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              },
              "explanation": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "actorId",
              "actorType",
              "reason",
              "explanation",
              "createdAt"
            ]
          }
        },
        "required": [
          "attachmentId",
          "enabled",
          "status",
          "failureCode",
          "latestAttemptStatus",
          "resultId",
          "outcome",
          "evidenceKey",
          "expectedName",
          "documentKind",
          "people",
          "findingId",
          "acknowledgment"
        ]
      },
      "TravelerPersonDto": {
        "description": "`TravelerPersonDto`.",
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "role": {
            "description": "PASSENGER, GUEST, BOOKING_CONTACT, PAYER or UNKNOWN.",
            "type": "string"
          },
          "legible": {
            "type": "boolean"
          },
          "roleCertain": {
            "type": "boolean"
          },
          "sourceText": {
            "type": "string"
          },
          "page": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "name",
          "role",
          "legible",
          "roleCertain",
          "sourceText",
          "page"
        ]
      },
      "TravelerCaptureRequestDto": {
        "description": "`TravelerCaptureRequestDto`.",
        "type": "object",
        "properties": {
          "requestId": {
            "description": "The client's idempotency key for the request.",
            "type": "string"
          }
        },
        "additionalProperties": false,
        "required": [
          "requestId"
        ]
      },
      "TravelerAcknowledgeDto": {
        "description": "`TravelerAcknowledgeDto`.",
        "type": "object",
        "properties": {
          "evidenceKey": {
            "type": "string"
          },
          "reason": {
            "$ref": "#/components/schemas/AckReason"
          },
          "explanation": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "evidenceKey",
          "reason"
        ]
      },
      "AckReason": {
        "description": "`ON_BEHALF`, `NAME_VARIATION` or `OTHER`.",
        "type": "string",
        "enum": [
          "ON_BEHALF",
          "NAME_VARIATION",
          "OTHER"
        ]
      },
      "TravelerAcknowledgment": {
        "description": "An acknowledgment row (Nest answered the Prisma row).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "findingId": {
            "type": "string",
            "format": "uuid"
          },
          "attachmentId": {
            "type": "string"
          },
          "evidenceKey": {
            "type": "string"
          },
          "actorType": {
            "type": "string"
          },
          "actorId": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": "string"
          },
          "explanation": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "organizationId",
          "findingId",
          "attachmentId",
          "evidenceKey",
          "actorType",
          "actorId",
          "reason",
          "explanation",
          "createdAt"
        ]
      },
      "ListPage_TravelListItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TravelListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "CreateTravelDto": {
        "description": "`CreateTravelDto`.",
        "type": "object",
        "properties": {
          "fromDateTime": {
            "type": "string"
          },
          "toDateTime": {
            "type": "string"
          },
          "businessStartAt": {
            "description": "Business travel starts here after a leading private stay. Set or clear together\n with businessStartTimeZone; omission preserves the saved value.",
            "type": [
              "string",
              "null"
            ]
          },
          "businessStartTimeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "businessEndAt": {
            "description": "Business travel ends here before a trailing private stay. Set or clear\n together with businessEndTimeZone; omission preserves the saved value.",
            "type": [
              "string",
              "null"
            ]
          },
          "businessEndTimeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "privateInterruptions": {
            "description": "Private time inside the business window. A supplied list replaces the saved\n one whole; null or [] clears it; omission preserves it.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/PrivateInterruptionInputDto"
            },
            "maxItems": 20
          },
          "fromLocationName": {
            "description": "Deprecated: use fromPlace.name.",
            "type": [
              "string",
              "null"
            ]
          },
          "toLocationName": {
            "description": "Deprecated: use toPlace.name.",
            "type": [
              "string",
              "null"
            ]
          },
          "fromLocationPlaceId": {
            "type": [
              "string",
              "null"
            ]
          },
          "toLocationPlaceId": {
            "type": [
              "string",
              "null"
            ]
          },
          "fromLocationCity": {
            "type": [
              "string",
              "null"
            ]
          },
          "toLocationCity": {
            "type": [
              "string",
              "null"
            ]
          },
          "fromLocationCountry": {
            "type": [
              "string",
              "null"
            ]
          },
          "toLocationCountry": {
            "type": [
              "string",
              "null"
            ]
          },
          "fromLocationRegion": {
            "type": [
              "string",
              "null"
            ]
          },
          "toLocationRegion": {
            "type": [
              "string",
              "null"
            ]
          },
          "fromLocationSource": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "MAP_SEARCH",
              "MAP_PIN",
              "MANUAL",
              null
            ]
          },
          "toLocationSource": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "MAP_SEARCH",
              "MAP_PIN",
              "MANUAL",
              null
            ]
          },
          "fromLat": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "minimum": -90.0,
            "maximum": 90.0
          },
          "fromLng": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "minimum": -180.0,
            "maximum": 180.0
          },
          "toLat": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "minimum": -90.0,
            "maximum": 90.0
          },
          "toLng": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "minimum": -180.0,
            "maximum": 180.0
          },
          "fromPlace": {
            "description": "The endpoint. Required unless the flat location name is set.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "MAP_SEARCH",
                  "MAP_PIN",
                  "MANUAL",
                  null
                ]
              },
              "provider": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "GOOGLE",
                  null
                ]
              },
              "providerPlaceId": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "formattedAddress": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 512
              },
              "street": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "postalCode": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 16
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "region": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "countryName": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "countryCode": {
                "description": "Accepted so a place candidate round-trips unchanged, then ignored: the stored\n country code is derived from the coordinates. Use countryName to state a country.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double",
                "minimum": -90.0,
                "maximum": 90.0
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double",
                "minimum": -180.0,
                "maximum": 180.0
              }
            }
          },
          "toPlace": {
            "description": "The endpoint. Required unless the flat location name is set.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "MAP_SEARCH",
                  "MAP_PIN",
                  "MANUAL",
                  null
                ]
              },
              "provider": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "GOOGLE",
                  null
                ]
              },
              "providerPlaceId": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "formattedAddress": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 512
              },
              "street": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "postalCode": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 16
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "region": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "countryName": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "countryCode": {
                "description": "Accepted so a place candidate round-trips unchanged, then ignored: the stored\n country code is derived from the coordinates. Use countryName to state a country.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double",
                "minimum": -90.0,
                "maximum": 90.0
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double",
                "minimum": -180.0,
                "maximum": 180.0
              }
            }
          },
          "purpose": {
            "type": "string"
          },
          "typeOfAccommodation": {
            "description": "Deprecated: accommodation is recorded per stay under the travel; omit and the\n travel defaults to NONE.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "HOTEL",
              "COOKING_AVAILABLE",
              "COOKING_UNAVAILABLE",
              "NONE",
              "TRANSPORT",
              null
            ],
            "x-enum-descriptions": [
              "",
              "",
              "",
              "",
              "A night in transit; written only where `per-diem.night-supplement` is on for the\n organization (else `accommodation_type_not_available`)."
            ]
          },
          "advanceAmount": {
            "description": "Minor units of the report's base currency.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "disablePerDiemCalculation": {
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "required": [
          "fromDateTime",
          "toDateTime",
          "purpose"
        ]
      },
      "PrivateInterruptionInputDto": {
        "description": "`PrivateInterruptionInputDto`.",
        "type": "object",
        "properties": {
          "startAt": {
            "type": "string"
          },
          "endAt": {
            "type": "string"
          },
          "timeZone": {
            "type": "string"
          }
        },
        "required": [
          "startAt",
          "endAt",
          "timeZone"
        ]
      },
      "TravelWritten": {
        "description": "What a travel write answers (SPINE 26.1 rule 10, 26.2): the travel's one summary\n (travel-api's [`TravelSummary`]) beside its report's summary after the write.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "description": "SPINE 26.10 item 3: the travel's version; send it back as `If-Match`.",
            "type": "integer",
            "format": "int64"
          },
          "reportId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "fromDateTime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "toDateTime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "businessStartAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "businessStartTimeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "businessEndAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "businessEndTimeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "privateInterruptions": {
            "description": "Null when none were declared.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/PrivateInterruption"
            }
          },
          "fromPlace": {
            "description": "`PlaceEntity`: a stored place, Prisma's field order.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "MAP_SEARCH",
                  "MAP_PIN",
                  "MANUAL",
                  null
                ],
                "x-enum-open": true
              },
              "provider": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "GOOGLE",
                  null
                ],
                "x-enum-open": true
              },
              "providerPlaceId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "formattedAddress": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "street": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "postalCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "region": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "countryName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "countryCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "cityKey": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "coordinatesAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "organizationId",
              "source",
              "provider",
              "providerPlaceId",
              "name",
              "formattedAddress",
              "street",
              "postalCode",
              "city",
              "region",
              "countryName",
              "countryCode",
              "cityKey",
              "lat",
              "lng",
              "coordinatesAt",
              "createdAt",
              "updatedAt"
            ]
          },
          "toPlace": {
            "description": "`PlaceEntity`: a stored place, Prisma's field order.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "MAP_SEARCH",
                  "MAP_PIN",
                  "MANUAL",
                  null
                ],
                "x-enum-open": true
              },
              "provider": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "GOOGLE",
                  null
                ],
                "x-enum-open": true
              },
              "providerPlaceId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "formattedAddress": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "street": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "postalCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "region": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "countryName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "countryCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "cityKey": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "coordinatesAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "organizationId",
              "source",
              "provider",
              "providerPlaceId",
              "name",
              "formattedAddress",
              "street",
              "postalCode",
              "city",
              "region",
              "countryName",
              "countryCode",
              "cityKey",
              "lat",
              "lng",
              "coordinatesAt",
              "createdAt",
              "updatedAt"
            ]
          },
          "purpose": {
            "type": [
              "string",
              "null"
            ]
          },
          "typeOfAccommodation": {
            "$ref": "#/components/schemas/TravelAccommodationType"
          },
          "currency": {
            "type": "string"
          },
          "advanceAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "rateLevel": {
            "$ref": "#/components/schemas/TravelRateLevel"
          },
          "perDiemDisabled": {
            "type": "boolean"
          },
          "travelRequestId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "dietSchemeVersionId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "report": {
            "description": "The travel's report after the write (SPINE 26.2).",
            "$ref": "#/components/schemas/ReportSummary"
          },
          "merged": {
            "description": "SPINE 26.10 item 3: the `If-Match` version was older and this write merged over\n the changes since it.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "version",
          "reportId",
          "organizationId",
          "fromDateTime",
          "toDateTime",
          "businessStartAt",
          "businessStartTimeZone",
          "businessEndAt",
          "businessEndTimeZone",
          "privateInterruptions",
          "fromPlace",
          "toPlace",
          "purpose",
          "typeOfAccommodation",
          "currency",
          "advanceAmount",
          "rateLevel",
          "perDiemDisabled",
          "travelRequestId",
          "dietSchemeVersionId",
          "createdAt",
          "updatedAt",
          "report",
          "merged"
        ]
      },
      "DraftTravel": {
        "description": "`TravelsController_createDraft` (no body): an empty placeholder travel for scanning\n before the trip is known (Q31). 201 with the travel's summary, the existing one when\n the report already has a travel (Nest answered an empty 201).",
        "type": "object"
      },
      "UpdateTravelDto": {
        "description": "`UpdateTravelDto`: every field optional; `null` clears a nullable column.",
        "type": "object",
        "properties": {
          "fromDateTime": {
            "type": [
              "string",
              "null"
            ]
          },
          "toDateTime": {
            "type": [
              "string",
              "null"
            ]
          },
          "businessStartAt": {
            "description": "Business travel starts here after a leading private stay. Set or clear together\n with businessStartTimeZone; omission preserves the saved value.",
            "type": [
              "string",
              "null"
            ]
          },
          "businessStartTimeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "businessEndAt": {
            "description": "Business travel ends here before a trailing private stay. Set or clear\n together with businessEndTimeZone; omission preserves the saved value.",
            "type": [
              "string",
              "null"
            ]
          },
          "businessEndTimeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "privateInterruptions": {
            "description": "Private time inside the business window. A supplied list replaces the saved\n one whole; null or [] clears it; omission preserves it.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/PrivateInterruptionInputDto"
            },
            "maxItems": 20
          },
          "fromLocationName": {
            "description": "Deprecated: use fromPlace.name.",
            "type": [
              "string",
              "null"
            ]
          },
          "toLocationName": {
            "description": "Deprecated: use toPlace.name.",
            "type": [
              "string",
              "null"
            ]
          },
          "fromLocationPlaceId": {
            "type": [
              "string",
              "null"
            ]
          },
          "toLocationPlaceId": {
            "type": [
              "string",
              "null"
            ]
          },
          "fromLocationCity": {
            "type": [
              "string",
              "null"
            ]
          },
          "toLocationCity": {
            "type": [
              "string",
              "null"
            ]
          },
          "fromLocationCountry": {
            "type": [
              "string",
              "null"
            ]
          },
          "toLocationCountry": {
            "type": [
              "string",
              "null"
            ]
          },
          "fromLocationRegion": {
            "type": [
              "string",
              "null"
            ]
          },
          "toLocationRegion": {
            "type": [
              "string",
              "null"
            ]
          },
          "fromLocationSource": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "MAP_SEARCH",
              "MAP_PIN",
              "MANUAL",
              null
            ]
          },
          "toLocationSource": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "MAP_SEARCH",
              "MAP_PIN",
              "MANUAL",
              null
            ]
          },
          "fromLat": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "minimum": -90.0,
            "maximum": 90.0
          },
          "fromLng": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "minimum": -180.0,
            "maximum": 180.0
          },
          "toLat": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "minimum": -90.0,
            "maximum": 90.0
          },
          "toLng": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "minimum": -180.0,
            "maximum": 180.0
          },
          "fromPlace": {
            "description": "Partial merge over the stored place: omitted properties are kept, an explicit null clears one, null for the whole object clears the place.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "MAP_SEARCH",
                  "MAP_PIN",
                  "MANUAL",
                  null
                ]
              },
              "provider": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "GOOGLE",
                  null
                ]
              },
              "providerPlaceId": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "formattedAddress": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 512
              },
              "street": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "postalCode": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 16
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "region": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "countryName": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "countryCode": {
                "description": "Accepted so a place candidate round-trips unchanged, then ignored: the stored\n country code is derived from the coordinates. Use countryName to state a country.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double",
                "minimum": -90.0,
                "maximum": 90.0
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double",
                "minimum": -180.0,
                "maximum": 180.0
              }
            }
          },
          "toPlace": {
            "description": "Partial merge over the stored place: omitted properties are kept, an explicit null clears one, null for the whole object clears the place.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "MAP_SEARCH",
                  "MAP_PIN",
                  "MANUAL",
                  null
                ]
              },
              "provider": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "GOOGLE",
                  null
                ]
              },
              "providerPlaceId": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "formattedAddress": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 512
              },
              "street": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "postalCode": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 16
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "region": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "countryName": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "countryCode": {
                "description": "Accepted so a place candidate round-trips unchanged, then ignored: the stored\n country code is derived from the coordinates. Use countryName to state a country.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double",
                "minimum": -90.0,
                "maximum": 90.0
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double",
                "minimum": -180.0,
                "maximum": 180.0
              }
            }
          },
          "purpose": {
            "type": [
              "string",
              "null"
            ]
          },
          "typeOfAccommodation": {
            "description": "Deprecated: accommodation is recorded per stay under the travel; omit and the\n travel defaults to NONE.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "HOTEL",
              "COOKING_AVAILABLE",
              "COOKING_UNAVAILABLE",
              "NONE",
              "TRANSPORT",
              null
            ],
            "x-enum-descriptions": [
              "",
              "",
              "",
              "",
              "A night in transit; written only where `per-diem.night-supplement` is on for the\n organization (else `accommodation_type_not_available`)."
            ]
          },
          "advanceAmount": {
            "description": "Minor units of the report's base currency.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "disablePerDiemCalculation": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "CreateAccommodationDto": {
        "description": "`CreateAccommodationDto`.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "description": "`TravelAccommodationType` on the wire.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "HOTEL",
              "COOKING_AVAILABLE",
              "COOKING_UNAVAILABLE",
              "NONE",
              "TRANSPORT",
              null
            ],
            "x-enum-descriptions": [
              "",
              "",
              "",
              "",
              "A night in transit; written only where `per-diem.night-supplement` is on for the\n organization (else `accommodation_type_not_available`)."
            ]
          },
          "name": {
            "description": "Deprecated: use place.name.",
            "type": [
              "string",
              "null"
            ]
          },
          "placeId": {
            "description": "Deprecated: use place.providerPlaceId.",
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "description": "Deprecated: use place.city.",
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "description": "Deprecated: use place.countryName.",
            "type": [
              "string",
              "null"
            ]
          },
          "countrySource": {
            "description": "How the client chose country. PLACE_RESOLVED is server-assigned and is\n rejected on writes.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "USER",
              "PREFILL_ACCEPTED",
              null
            ]
          },
          "region": {
            "description": "Deprecated: use place.region.",
            "type": [
              "string",
              "null"
            ]
          },
          "lat": {
            "description": "Deprecated: use place.lat.",
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "minimum": -90.0,
            "maximum": 90.0
          },
          "lng": {
            "description": "Deprecated: use place.lng.",
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "minimum": -180.0,
            "maximum": 180.0
          },
          "place": {
            "description": "The stay's place.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "MAP_SEARCH",
                  "MAP_PIN",
                  "MANUAL",
                  null
                ]
              },
              "provider": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "GOOGLE",
                  null
                ]
              },
              "providerPlaceId": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "formattedAddress": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 512
              },
              "street": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "postalCode": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 16
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "region": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "countryName": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "countryCode": {
                "description": "Accepted so a place candidate round-trips unchanged, then ignored: the stored\n country code is derived from the coordinates. Use countryName to state a country.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double",
                "minimum": -90.0,
                "maximum": 90.0
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double",
                "minimum": -180.0,
                "maximum": 180.0
              }
            }
          },
          "checkInAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "checkOutAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "description": "Minor units of `currency`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchangeRate": {
            "description": "Rate from `currency` to the report's base currency, mirrored onto the\n stay's expenses.",
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "isManualExchangeRate": {
            "description": "Deprecated: true when the user typed `exchangeRate` in this edit.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "fx": {
            "description": "An explicit FX decision.",
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "quoteId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "AUTO"
                    ]
                  }
                },
                "additionalProperties": false,
                "required": [
                  "mode"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "exchangeRate": {
                    "description": "Up to ten integer digits and six decimals; exactly one of this and\n `baseAmount`.",
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^\\d{1,10}(\\.\\d{1,6})?$"
                  },
                  "baseAmount": {
                    "description": "The actual charge in the report currency's minor units.",
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "referenceQuoteId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "MANUAL"
                    ]
                  }
                },
                "additionalProperties": false,
                "required": [
                  "mode",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "KEEP"
                    ]
                  }
                },
                "required": [
                  "mode"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "paymentMethod": {
            "description": "`PaymentMethod`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "CARD",
              "COMPANY_CARD",
              "INVOICE",
              "WALLET",
              null
            ]
          },
          "paymentCardId": {
            "type": [
              "string",
              "null"
            ]
          },
          "transactionDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "breakfastAmount": {
            "description": "Minor units of `currency`; `null` clears a stored one.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "breakfastIncluded": {
            "description": "Whether breakfast came with the stay. Omit it and it follows the amount.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "nightSupplement": {
            "description": "Claim (`claimed: true`, with `disclosureVersion` and `answers`) or withdraw\n (`claimed: false`) nattillegg uten kvittering on this stay. Only the report\n owner may write it, only while the report is DRAFT or REJECTED.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "claimed": {
                "type": "boolean"
              },
              "disclosureVersion": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1,
                "maxLength": 32
              },
              "answers": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "$ref": "#/components/schemas/NightSupplementAnswerBody"
                },
                "maxItems": 32
              }
            },
            "required": [
              "claimed"
            ]
          }
        }
      },
      "NightSupplementAnswerBody": {
        "description": "One answer of a nattillegg claim.",
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "value": {
            "type": "boolean"
          }
        },
        "required": [
          "key",
          "value"
        ]
      },
      "StayWritten": {
        "description": "What a stay create or update answers (SPINE 26.1 rule 10, 26.2): the stay's one summary\n (travel-api's [`travel_api::StaySummary`], with its `nightSupplement` projection) beside\n its report's summary after the write. The legacy contract answers Nest's\n `TravelAccommodationEntity` document instead (`compat::routes::stays`, through\n [`legacy::documents`]).",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "$ref": "#/components/schemas/TravelAccommodationType"
          },
          "id": {
            "type": "string"
          },
          "version": {
            "description": "SPINE 26.10 item 3: the stay's version; send it back as `If-Match`.",
            "type": "integer",
            "format": "int64"
          },
          "travelId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "place": {
            "description": "`PlaceEntity`: a stored place, Prisma's field order.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "MAP_SEARCH",
                  "MAP_PIN",
                  "MANUAL",
                  null
                ],
                "x-enum-open": true
              },
              "provider": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "GOOGLE",
                  null
                ],
                "x-enum-open": true
              },
              "providerPlaceId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "formattedAddress": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "street": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "postalCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "region": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "countryName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "countryCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "cityKey": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "coordinatesAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "organizationId",
              "source",
              "provider",
              "providerPlaceId",
              "name",
              "formattedAddress",
              "street",
              "postalCode",
              "city",
              "region",
              "countryName",
              "countryCode",
              "cityKey",
              "lat",
              "lng",
              "coordinatesAt",
              "createdAt",
              "updatedAt"
            ]
          },
          "checkInAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "checkOutAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "rateLevel": {
            "$ref": "#/components/schemas/TravelRateLevel"
          },
          "financialModel": {
            "$ref": "#/components/schemas/StayFinancialModel"
          },
          "amount": {
            "description": "Minor units of `currency`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "breakfastAmount": {
            "description": "Minor units of `currency`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "breakfastIncluded": {
            "type": "boolean"
          },
          "paymentMethod": {
            "description": "`PaymentMethod`'s stored spelling (`CARD`, `COMPANY_CARD`, `INVOICE`, `WALLET`).",
            "type": [
              "string",
              "null"
            ]
          },
          "paymentCardId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "exchangeRate": {
            "description": "`currency` → the report's base currency, as stored.",
            "type": [
              "number",
              "null"
            ]
          },
          "exchangeRateSource": {
            "description": "`ExchangeRateSource`'s stored spelling.",
            "type": [
              "string",
              "null"
            ]
          },
          "transactionDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "expenseId": {
            "description": "The night's expense (a line of the report).",
            "type": [
              "string",
              "null"
            ]
          },
          "breakfastExpenseId": {
            "description": "The breakfast's expense (`LEGACY_PAIR`), when it has one.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "nightSupplement": {
            "description": "Nattillegg uten kvittering on the stay (detail reads only: absent on a list or an\n embed that does not judge it; null for a type with no questionnaire, a hotel or no\n stay). The stored claim columns never reach the wire; this is served in their place.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "eligibility": {
                "description": "Whether the stay can earn nattillegg now. A claimed stay that stops qualifying keeps\n its claim and pays nothing until it qualifies again.",
                "$ref": "#/components/schemas/NightSupplementEligibility"
              },
              "claimed": {
                "description": "The traveller has attested the stay.",
                "type": "boolean"
              },
              "attestedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "attestedByName": {
                "description": "The person who attested the stay (identity's display name).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "attestedNights": {
                "description": "Nights the attestation covers; null without a claim.",
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "paidNights": {
                "description": "Nights the per-diem rows pay the stay (as the recalc stored them).",
                "type": "integer",
                "format": "int32"
              },
              "ratePerNight": {
                "description": "The statutory sats per night in NOK minor units (øre); null while the organization\n does not offer nattillegg or no sats is configured for the year.",
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              },
              "amount": {
                "description": "What the per-diem rows pay the stay, in minor units of the report's base currency,\n as paid (a filed report keeps it after a rate change).",
                "type": "integer",
                "format": "int64"
              },
              "needsReconfirmation": {
                "description": "The stay now holds more nights than were attested: the traveller must confirm again\n before the rest is paid.",
                "type": "boolean"
              }
            },
            "required": [
              "eligibility",
              "claimed",
              "attestedAt",
              "attestedByName",
              "attestedNights",
              "paidNights",
              "ratePerNight",
              "amount",
              "needsReconfirmation"
            ]
          },
          "report": {
            "description": "The stay's report after the write (SPINE 26.2).",
            "$ref": "#/components/schemas/ReportSummary"
          },
          "merged": {
            "description": "SPINE 26.10 item 3: the `If-Match` version was older and this write merged over\n the changes since it.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "version",
          "travelId",
          "name",
          "description",
          "place",
          "checkInAt",
          "checkOutAt",
          "type",
          "rateLevel",
          "financialModel",
          "amount",
          "currency",
          "breakfastAmount",
          "breakfastIncluded",
          "paymentMethod",
          "paymentCardId",
          "exchangeRate",
          "exchangeRateSource",
          "transactionDate",
          "projectId",
          "expenseId",
          "breakfastExpenseId",
          "createdAt",
          "updatedAt",
          "report",
          "merged"
        ]
      },
      "UpdateAccommodationDto": {
        "description": "`UpdateAccommodationDto`: every field optional; `null` clears a nullable column.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "description": "`TravelAccommodationType` on the wire.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "HOTEL",
              "COOKING_AVAILABLE",
              "COOKING_UNAVAILABLE",
              "NONE",
              "TRANSPORT",
              null
            ],
            "x-enum-descriptions": [
              "",
              "",
              "",
              "",
              "A night in transit; written only where `per-diem.night-supplement` is on for the\n organization (else `accommodation_type_not_available`)."
            ]
          },
          "name": {
            "description": "Deprecated: use place.name.",
            "type": [
              "string",
              "null"
            ]
          },
          "placeId": {
            "description": "Deprecated: use place.providerPlaceId.",
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "description": "Deprecated: use place.city.",
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "description": "Deprecated: use place.countryName.",
            "type": [
              "string",
              "null"
            ]
          },
          "countrySource": {
            "description": "How the client chose country. PLACE_RESOLVED is server-assigned and is\n rejected on writes.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "USER",
              "PREFILL_ACCEPTED",
              null
            ]
          },
          "region": {
            "description": "Deprecated: use place.region.",
            "type": [
              "string",
              "null"
            ]
          },
          "lat": {
            "description": "Deprecated: use place.lat.",
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "minimum": -90.0,
            "maximum": 90.0
          },
          "lng": {
            "description": "Deprecated: use place.lng.",
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "minimum": -180.0,
            "maximum": 180.0
          },
          "place": {
            "description": "Partial merge over the stored place: omitted properties are kept, an explicit null clears one, null for the whole object clears the place.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "MAP_SEARCH",
                  "MAP_PIN",
                  "MANUAL",
                  null
                ]
              },
              "provider": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "GOOGLE",
                  null
                ]
              },
              "providerPlaceId": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "formattedAddress": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 512
              },
              "street": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "postalCode": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 16
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "region": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "countryName": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "countryCode": {
                "description": "Accepted so a place candidate round-trips unchanged, then ignored: the stored\n country code is derived from the coordinates. Use countryName to state a country.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double",
                "minimum": -90.0,
                "maximum": 90.0
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double",
                "minimum": -180.0,
                "maximum": 180.0
              }
            }
          },
          "checkInAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "checkOutAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "description": "Minor units of `currency`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchangeRate": {
            "description": "Rate from `currency` to the report's base currency, mirrored onto the\n stay's expenses.",
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "isManualExchangeRate": {
            "description": "Deprecated: true when the user typed `exchangeRate` in this edit.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "fx": {
            "description": "An explicit FX decision.",
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "quoteId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "AUTO"
                    ]
                  }
                },
                "additionalProperties": false,
                "required": [
                  "mode"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "exchangeRate": {
                    "description": "Up to ten integer digits and six decimals; exactly one of this and\n `baseAmount`.",
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^\\d{1,10}(\\.\\d{1,6})?$"
                  },
                  "baseAmount": {
                    "description": "The actual charge in the report currency's minor units.",
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "referenceQuoteId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "MANUAL"
                    ]
                  }
                },
                "additionalProperties": false,
                "required": [
                  "mode",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "KEEP"
                    ]
                  }
                },
                "required": [
                  "mode"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "paymentMethod": {
            "description": "`PaymentMethod`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "CARD",
              "COMPANY_CARD",
              "INVOICE",
              "WALLET",
              null
            ]
          },
          "paymentCardId": {
            "type": [
              "string",
              "null"
            ]
          },
          "transactionDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "breakfastAmount": {
            "description": "Minor units of `currency`; `null` clears a stored one.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "breakfastIncluded": {
            "description": "Whether breakfast came with the stay. Omit it and it follows the amount.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "nightSupplement": {
            "description": "Claim (`claimed: true`, with `disclosureVersion` and `answers`) or withdraw\n (`claimed: false`) nattillegg uten kvittering on this stay. Only the report\n owner may write it, only while the report is DRAFT or REJECTED.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "claimed": {
                "type": "boolean"
              },
              "disclosureVersion": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1,
                "maxLength": 32
              },
              "answers": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "$ref": "#/components/schemas/NightSupplementAnswerBody"
                },
                "maxItems": 32
              }
            },
            "required": [
              "claimed"
            ]
          }
        }
      },
      "ReferenceAccommodationDto": {
        "description": "`ReferenceAccommodationDto` (strict).",
        "type": "object",
        "properties": {
          "type": {
            "description": "Default `HOTEL`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "HOTEL",
              "COOKING_AVAILABLE",
              "COOKING_UNAVAILABLE",
              "NONE",
              "TRANSPORT",
              null
            ],
            "x-enum-descriptions": [
              "",
              "",
              "",
              "",
              "A night in transit; written only where `per-diem.night-supplement` is on for the\n organization (else `accommodation_type_not_available`)."
            ]
          },
          "id": {
            "description": "The stay's id (minted by the client).",
            "type": "string"
          },
          "expenseId": {
            "type": "string"
          },
          "expectedCostsRevision": {
            "type": "integer",
            "format": "int64"
          },
          "costIds": {
            "description": "The costs the stay selects (1 to 100); omitted: every cost of the expense.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "checkInAt": {
            "description": "A hint, held to the trip's days. Left out (or null) with `checkOutAt`: the API\n proposes a night from the expense's date, held the same way.",
            "type": [
              "string",
              "null"
            ]
          },
          "checkOutAt": {
            "description": "A hint, held to the trip's days; see `checkInAt`.",
            "type": [
              "string",
              "null"
            ]
          },
          "breakfastIncluded": {
            "description": "Default `false`.",
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "expenseId",
          "expectedCostsRevision"
        ]
      },
      "DetachAccommodationExpenseDto": {
        "description": "`DetachAccommodationExpenseDto` (strict).",
        "type": "object",
        "properties": {
          "expenseId": {
            "type": "string"
          },
          "expectedCostsRevision": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false,
        "required": [
          "expenseId",
          "expectedCostsRevision"
        ]
      },
      "TravelAccommodationRow": {
        "description": "Every column of `travel_accomodations`, Prisma's field order (`TravelAccommodation`).",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "type": "string"
          },
          "financialModel": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "travelId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "placeId": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "countrySource": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "lat": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "lng": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "countryCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "cityKey": {
            "type": [
              "string",
              "null"
            ]
          },
          "placeRefId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "checkInAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "checkOutAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "rateLevel": {
            "type": "string"
          },
          "amount": {
            "description": "Minor units of `currency`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchangeRate": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "exchangeRateSource": {
            "type": [
              "string",
              "null"
            ]
          },
          "fxSnapshot": true,
          "paymentMethod": {
            "type": [
              "string",
              "null"
            ]
          },
          "paymentCardId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "transactionDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "breakfastAmount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "breakfastIncluded": {
            "type": "boolean"
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "expenseId": {
            "type": [
              "string",
              "null"
            ]
          },
          "breakfastExpenseId": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "version": {
            "description": "SPINE 26.10 item 3: the accommodation's version.",
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "financialModel",
          "id",
          "travelId",
          "name",
          "placeId",
          "city",
          "country",
          "countrySource",
          "region",
          "lat",
          "lng",
          "countryCode",
          "cityKey",
          "placeRefId",
          "checkInAt",
          "checkOutAt",
          "type",
          "rateLevel",
          "description",
          "amount",
          "currency",
          "exchangeRate",
          "exchangeRateSource",
          "fxSnapshot",
          "paymentMethod",
          "paymentCardId",
          "transactionDate",
          "breakfastAmount",
          "breakfastIncluded",
          "projectId",
          "expenseId",
          "breakfastExpenseId",
          "createdAt",
          "updatedAt",
          "version"
        ]
      },
      "AccommodationReceiptUploadRequest": {
        "description": "The intent's body: the file the client is about to upload, and what to do with it.",
        "type": "object",
        "properties": {
          "id": {
            "description": "Client-minted (a UUID): the upload's id, and once the upload is confirmed the id of\n its main receipt (`mainAttachmentId`; a split stay's breakfast receipt has its own).",
            "type": "string",
            "format": "uuid"
          },
          "fileName": {
            "description": "The client's file name (at most 255 characters; recorded, never part of a key).",
            "type": [
              "string",
              "null"
            ]
          },
          "size": {
            "description": "The file's exact size in bytes: the storage policy admits nothing else.",
            "type": [
              "integer",
              "null"
            ],
            "format": "uint64",
            "minimum": 0
          },
          "contentType": {
            "description": "The file's media type (one the purpose accepts): the storage policy's\n `Content-Type`, and what its magic bytes must be.",
            "type": [
              "string",
              "null"
            ]
          },
          "sha256": {
            "description": "The file's SHA-256 (hex): the confirm checks the stored bytes against it.",
            "type": [
              "string",
              "null"
            ]
          },
          "performCapture": {
            "description": "Read the receipt on the server (when no `ocrText` is given).",
            "type": [
              "boolean",
              "null"
            ]
          },
          "ocrText": {
            "description": "Device-side OCR text.",
            "type": [
              "string",
              "null"
            ]
          },
          "populateExpense": {
            "description": "`populateExpense`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "none",
              "empty",
              "all",
              null
            ]
          },
          "sourceInboxItemId": {
            "description": "The inbox item the confirm consumes.",
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        },
        "required": [
          "id"
        ]
      },
      "AccommodationReceiptUpload": {
        "description": "The intent's 201: where the bytes go.",
        "type": "object",
        "properties": {
          "upload": {
            "$ref": "#/components/schemas/UploadTicket"
          }
        },
        "required": [
          "upload"
        ]
      },
      "SimulateSchemeDto": {
        "description": "`SimulateSchemeDto`: the candidate scheme config.",
        "type": "object",
        "properties": {
          "config": {
            "description": "The candidate SchemeConfig: `{ baseDeck: \"STATENS\", modifiers: [...] }`.",
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "config"
        ]
      },
      "SchemeSimulation": {
        "description": "A scheme simulation (`SchemeSimulation`, a computed answer: one plain shape).",
        "type": "object",
        "properties": {
          "days": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SimulatedDay"
            }
          },
          "totals": {
            "$ref": "#/components/schemas/SimulatedTotals"
          },
          "currency": {
            "description": "The currency of every amount (the report's base currency).",
            "type": "string"
          }
        },
        "required": [
          "days",
          "totals",
          "currency"
        ]
      },
      "SimulatedDay": {
        "description": "One simulated døgn (`SimulatedPerDiemDay`): amounts in minor units of the result's\n `currency` (integers, SPINE 26.5; Nest sent them as strings).",
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "taxFreeCriteria": {
            "type": [
              "string",
              "null"
            ]
          },
          "isHalfDay": {
            "type": "boolean"
          },
          "longStayReducedTaxFree": {
            "type": "boolean"
          },
          "breakfast": {
            "type": "boolean"
          },
          "lunch": {
            "type": "boolean"
          },
          "dinner": {
            "type": "boolean"
          },
          "fullFareAmount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "fullFareExemptAmount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "amount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "exemptAmount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "taxableAmount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "compensationAmount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "nightSupplementAmount": {
            "description": "Nattillegg uten kvittering folded into `amount`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "pricingFailureCause": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "date",
          "status",
          "country",
          "taxFreeCriteria",
          "isHalfDay",
          "longStayReducedTaxFree",
          "breakfast",
          "lunch",
          "dinner",
          "fullFareAmount",
          "fullFareExemptAmount",
          "amount",
          "exemptAmount",
          "taxableAmount",
          "compensationAmount",
          "nightSupplementAmount",
          "pricingFailureCause"
        ]
      },
      "SimulatedTotals": {
        "description": "`SimulatedTotalsResponse`.",
        "type": "object",
        "properties": {
          "amount": {
            "type": "integer",
            "format": "int64"
          },
          "exemptAmount": {
            "type": "integer",
            "format": "int64"
          },
          "taxableAmount": {
            "type": "integer",
            "format": "int64"
          },
          "compensationAmount": {
            "type": "integer",
            "format": "int64"
          },
          "nightSupplementAmount": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "amount",
          "exemptAmount",
          "taxableAmount",
          "compensationAmount",
          "nightSupplementAmount"
        ]
      },
      "QuoteDriveTollDto": {
        "description": "`QuoteDriveTollDto`.",
        "type": "object",
        "properties": {
          "reportId": {
            "type": [
              "string",
              "null"
            ]
          },
          "from": {
            "$ref": "#/components/schemas/TollStop"
          },
          "to": {
            "$ref": "#/components/schemas/TollStop"
          },
          "vehicle": {
            "description": "The drive's vehicle id, as stored on the drive. Unknown prices as a car.",
            "type": [
              "string",
              "null"
            ]
          },
          "returnTrip": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "baseCurrency": {
            "description": "The owning report's base currency; the answer is stated in it.",
            "type": "string"
          },
          "date": {
            "description": "The drive's date, which picks the day a foreign toll converts at.",
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "required": [
          "from",
          "to",
          "baseCurrency"
        ]
      },
      "TollStop": {
        "description": "One end of the route: only a stop picked from map search has a place id.",
        "type": "object",
        "properties": {
          "placeId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "placeId"
        ]
      },
      "DriveTollQuoteDto": {
        "description": "`DriveTollQuoteDto`.",
        "type": "object",
        "properties": {
          "tollAmount": {
            "description": "In `currency`'s minor units (øre for a kroner report); `null` for an estimate.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "estimate": {
            "description": "An incomplete estimate that needs the user's acceptance before saving.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "tollAmount": {
                "type": "integer",
                "format": "int64"
              }
            },
            "required": [
              "tollAmount"
            ]
          },
          "currency": {
            "type": "string"
          }
        },
        "required": [
          "tollAmount",
          "currency"
        ]
      },
      "CalculateDriveDistanceDto": {
        "description": "`CalculateDriveDistanceDto`: exactly one of `placeIds` / `waypoints`.",
        "type": "object",
        "properties": {
          "placeIds": {
            "description": "Every point picked from Places search.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "minItems": 2,
            "maxItems": 50
          },
          "waypoints": {
            "description": "A place id or a `lat`/`lng` pair per point.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/DriveWaypointDto"
            },
            "minItems": 2,
            "maxItems": 50
          }
        }
      },
      "DriveWaypointDto": {
        "description": "`DriveWaypointDto`.",
        "type": "object",
        "properties": {
          "placeId": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "lat": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "minimum": -90.0,
            "maximum": 90.0
          },
          "lng": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "minimum": -180.0,
            "maximum": 180.0
          }
        }
      },
      "DriveDistanceResponseDto": {
        "description": "A computed route (`DriveDistanceResponseDto`).",
        "type": "object",
        "properties": {
          "distanceMeters": {
            "description": "Distance driven, in metres: the route less any ferry or car-train crossing, which\n mileage allowance does not pay for.",
            "type": "integer",
            "format": "int64"
          },
          "ferryDistanceMeters": {
            "description": "Metres of the route crossed by ferry or car train, already taken off\n `distanceMeters`: the sum of the legs'. 0 when there is no crossing.",
            "type": "integer",
            "format": "int64"
          },
          "polyline": {
            "type": [
              "string",
              "null"
            ]
          },
          "legs": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/Leg"
            }
          }
        },
        "required": [
          "distanceMeters",
          "ferryDistanceMeters"
        ]
      },
      "Leg": {
        "description": "One leg of a route (`DriveLegDistanceDto`).",
        "type": "object",
        "properties": {
          "distanceMeters": {
            "description": "Distance driven, in metres: the leg less any ferry or car-train crossing.",
            "type": "integer",
            "format": "int64"
          },
          "ferryDistanceMeters": {
            "description": "Metres of the leg crossed by ferry or car train, already taken off\n `distanceMeters`. 0 when there is no crossing.",
            "type": "integer",
            "format": "int64"
          },
          "polyline": {
            "description": "Transient geometry (Google's encoded polyline, precision 5): never stored.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "distanceMeters",
          "ferryDistanceMeters"
        ]
      },
      "ListPage_DriveDetail": {
        "description": "The envelope of a list whose item declares relations (SPINE 26.12.2): [`ListPage`]'s\n members and the side-loads, `{ items, hasMore, nextCursor?, total?, included? }`. Its\n schema keeps `ListPage`'s name: a route answers one or the other for an item, never\n both.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DriveDetail"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "included": {
            "description": "The side-loaded resources by type (`include=`); absent when nothing was asked for.",
            "$ref": "#/components/schemas/DriveIncluded"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "DriveIncluded": {
        "description": "The side-loaded resources (SPINE 26.12.2): one array per type, each resource once, ordered by id",
        "type": "object",
        "properties": {
          "category": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CategoryDetail"
            }
          },
          "project": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectDetail"
            }
          }
        },
        "additionalProperties": false
      },
      "CreateDriveDto": {
        "description": "`CreateDriveDto`.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 512
          },
          "id": {
            "description": "A client-minted id: a retry with the same fields answers the stored drive.",
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "accountId": {
            "description": "The owner's account, for a drive without a report (an implicit wrapper).",
            "type": [
              "string",
              "null"
            ]
          },
          "reportId": {
            "type": [
              "string",
              "null"
            ]
          },
          "stops": {
            "description": "The stops in order (2 to 50); `null` leaves them.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/DriveStopDto"
            },
            "maxItems": 50
          },
          "distanceMeters": {
            "description": "The whole drive's length, integer metres (both ways for a return trip).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "distanceSource": {
            "description": "Provenance of a client-sent distance (ROUTE or MANUAL); omitted: null = unknown.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "ROUTE",
              "MANUAL",
              null
            ]
          },
          "returnTrip": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "tollAmount": {
            "description": "Minor units of the report's base currency.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "vehicle": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "shouldCalculateToll": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "departmentId": {
            "type": [
              "string",
              "null"
            ]
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": [
              "string",
              "null"
            ]
          },
          "passengerNumber": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "passengerNames": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "isOffroad": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "hasTrailer": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "DriveStopDto": {
        "description": "`DriveStopDto`: the nested `place`, or the deprecated flat fields.",
        "type": "object",
        "properties": {
          "place": {
            "description": "The stop's place (supersedes the flat fields).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "MAP_SEARCH",
                  "MAP_PIN",
                  "MANUAL",
                  null
                ]
              },
              "provider": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "GOOGLE",
                  null
                ]
              },
              "providerPlaceId": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "formattedAddress": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 512
              },
              "street": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "postalCode": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 16
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "region": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "countryName": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "countryCode": {
                "description": "Accepted so a place candidate round-trips unchanged, then ignored: the stored\n country code is derived from the coordinates. Use countryName to state a country.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double",
                "minimum": -90.0,
                "maximum": 90.0
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double",
                "minimum": -180.0,
                "maximum": 180.0
              }
            }
          },
          "address": {
            "description": "Deprecated: use place.name. Required for a stop that states no `place`.",
            "type": [
              "string",
              "null"
            ]
          },
          "placeId": {
            "description": "Deprecated: use place.providerPlaceId.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "source": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "MAP_SEARCH",
              "MAP_PIN",
              "MANUAL",
              null
            ],
            "description": "Deprecated: use place.source."
          },
          "lat": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "minimum": -90.0,
            "maximum": 90.0
          },
          "lng": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "minimum": -180.0,
            "maximum": 180.0
          }
        }
      },
      "DriveWritten": {
        "description": "What a drive write answers (SPINE 26.1 rule 10, 26.2): the drive's one summary\n (travel-api's [`DriveSummary`]) beside its report's summary after the write, so a client\n refreshes the report's totals and amend state without a refetch.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "version": {
            "description": "SPINE 26.10 item 3: the drive's version; send it back as `If-Match`.",
            "type": "integer",
            "format": "int64"
          },
          "reportId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "distanceMeters": {
            "type": "integer",
            "format": "int32"
          },
          "distanceSource": {
            "description": "Where a drive's distance came from (`DistanceSource`).",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "ROUTE",
              "MANUAL",
              null
            ],
            "x-enum-open": true
          },
          "returnTrip": {
            "type": "boolean"
          },
          "vehicle": {
            "type": [
              "string",
              "null"
            ]
          },
          "shouldCalculateToll": {
            "type": "boolean"
          },
          "passengerNumber": {
            "type": "integer",
            "format": "int32"
          },
          "passengerNames": {
            "type": [
              "string",
              "null"
            ]
          },
          "isOffroad": {
            "type": "boolean"
          },
          "hasTrailer": {
            "type": "boolean"
          },
          "currency": {
            "type": "string"
          },
          "amount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "mileageAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "tollAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "passengerAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "trailerAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "offroadAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "mileageExemptAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "passengerExemptAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "trailerExemptAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "offroadExemptAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "exemptAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "taxableAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "departmentId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "taxCategoryId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "taxFreeCategoryId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "report": {
            "description": "The drive's report after the write.",
            "$ref": "#/components/schemas/ReportSummary"
          },
          "merged": {
            "description": "SPINE 26.10 item 3: the `If-Match` version was older and this write merged over\n the changes since it.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "version",
          "reportId",
          "organizationId",
          "date",
          "description",
          "distanceMeters",
          "distanceSource",
          "returnTrip",
          "vehicle",
          "shouldCalculateToll",
          "passengerNumber",
          "passengerNames",
          "isOffroad",
          "hasTrailer",
          "currency",
          "amount",
          "mileageAmount",
          "tollAmount",
          "passengerAmount",
          "trailerAmount",
          "offroadAmount",
          "mileageExemptAmount",
          "passengerExemptAmount",
          "trailerExemptAmount",
          "offroadExemptAmount",
          "exemptAmount",
          "taxableAmount",
          "departmentId",
          "projectId",
          "taxCategoryId",
          "taxFreeCategoryId",
          "createdAt",
          "updatedAt",
          "report",
          "merged"
        ]
      },
      "UpdateDriveDto": {
        "description": "`UpdateDriveDto`: every field optional; `reportId` moves the drive.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 512
          },
          "reportId": {
            "type": [
              "string",
              "null"
            ]
          },
          "stops": {
            "description": "The stops in order (2 to 50); `null` leaves them.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/DriveStopDto"
            },
            "maxItems": 50
          },
          "distanceMeters": {
            "description": "The whole drive's length, integer metres (both ways for a return trip).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "distanceSource": {
            "description": "Provenance of a client-sent distance (ROUTE or MANUAL); omitted: null = unknown.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "ROUTE",
              "MANUAL",
              null
            ]
          },
          "returnTrip": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "tollAmount": {
            "description": "Minor units of the report's base currency.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "vehicle": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "shouldCalculateToll": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "departmentId": {
            "type": [
              "string",
              "null"
            ]
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": [
              "string",
              "null"
            ]
          },
          "passengerNumber": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "passengerNames": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "isOffroad": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "hasTrailer": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "DetachDrive": {
        "description": "`DrivesController_detach` (Q6): the drive moves to a fresh implicit wrapper on its\n report's account (the report's base currency, the drive's department, project and\n description), unless it already sits alone in an implicit, travel-less wrapper: then\n the drive answers unchanged, with no write and no fact. Layer 2 decides the write on\n the drive's report (`lines`); the wrapper takes the source's status set and no amend.\n Nothing is re-priced (Nest decides the re-rate before the wrapper exists, from an\n empty body), so the move needs no provider: a plain command. Any body is ignored.",
        "type": "object"
      },
      "UpdateTravelRequestDto": {
        "description": "`UpdateTravelRequestDto`: omit a field to keep it, `null` clears a nullable one.",
        "type": "object",
        "properties": {
          "fromDateTime": {
            "description": "Timezone-qualified ISO datetime; time is preserved.",
            "type": [
              "string",
              "null"
            ]
          },
          "toDateTime": {
            "description": "Timezone-qualified ISO datetime; time is preserved.",
            "type": [
              "string",
              "null"
            ]
          },
          "fromLocationName": {
            "description": "Deprecated: use fromPlace.name.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "toLocationName": {
            "description": "Deprecated: use toPlace.name.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "fromLocationPlaceId": {
            "description": "Deprecated: use fromPlace.providerPlaceId.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "toLocationPlaceId": {
            "description": "Deprecated: use toPlace.providerPlaceId.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "fromLat": {
            "description": "Deprecated: use fromPlace.lat.",
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "minimum": -90.0,
            "maximum": 90.0
          },
          "fromLng": {
            "description": "Deprecated: use fromPlace.lng.",
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "minimum": -180.0,
            "maximum": 180.0
          },
          "toLat": {
            "description": "Deprecated: use toPlace.lat.",
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "minimum": -90.0,
            "maximum": 90.0
          },
          "toLng": {
            "description": "Deprecated: use toPlace.lng.",
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "minimum": -180.0,
            "maximum": 180.0
          },
          "fromPlace": {
            "description": "Partial merge over the stored place: properties you omit are kept, an explicit\n null on a property clears it, and null for the whole object clears the place.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "MAP_SEARCH",
                  "MAP_PIN",
                  "MANUAL",
                  null
                ]
              },
              "provider": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "GOOGLE",
                  null
                ]
              },
              "providerPlaceId": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "formattedAddress": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 512
              },
              "street": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "postalCode": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 16
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "region": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "countryName": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "countryCode": {
                "description": "Accepted so a place candidate round-trips unchanged, then ignored: the stored\n country code is derived from the coordinates. Use countryName to state a country.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double",
                "minimum": -90.0,
                "maximum": 90.0
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double",
                "minimum": -180.0,
                "maximum": 180.0
              }
            }
          },
          "toPlace": {
            "description": "Partial merge over the stored place (see fromPlace).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "MAP_SEARCH",
                  "MAP_PIN",
                  "MANUAL",
                  null
                ]
              },
              "provider": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "GOOGLE",
                  null
                ]
              },
              "providerPlaceId": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "formattedAddress": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 512
              },
              "street": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "postalCode": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 16
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "region": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "countryName": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "countryCode": {
                "description": "Accepted so a place candidate round-trips unchanged, then ignored: the stored\n country code is derived from the coordinates. Use countryName to state a country.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double",
                "minimum": -90.0,
                "maximum": 90.0
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double",
                "minimum": -180.0,
                "maximum": 180.0
              }
            }
          },
          "purpose": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 512
          },
          "estimatedCost": {
            "description": "Minor units; omit to keep, null to clear, 0 is stored as 0.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "requestedAdvanceAmount": {
            "description": "Minor units; omit to keep, null to clear, 0 is stored as 0.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "ownCarApprovalRequested": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "premiumClassApprovalRequested": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "TravelRequestWritten": {
        "description": "`PATCH /reports/{id}/travel-request`'s answer: the request, and whether the write merged\n over changes made since its `If-Match` version (SPINE 26.10 item 3). A read answers\n [`TravelRequest`], which never carries `merged`.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "reportId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "purpose": {
            "type": [
              "string",
              "null"
            ]
          },
          "fromDateTime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "toDateTime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "fromPlace": {
            "description": "`PlaceEntity`: a stored place, Prisma's field order.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "MAP_SEARCH",
                  "MAP_PIN",
                  "MANUAL",
                  null
                ],
                "x-enum-open": true
              },
              "provider": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "GOOGLE",
                  null
                ],
                "x-enum-open": true
              },
              "providerPlaceId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "formattedAddress": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "street": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "postalCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "region": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "countryName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "countryCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "cityKey": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "coordinatesAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "organizationId",
              "source",
              "provider",
              "providerPlaceId",
              "name",
              "formattedAddress",
              "street",
              "postalCode",
              "city",
              "region",
              "countryName",
              "countryCode",
              "cityKey",
              "lat",
              "lng",
              "coordinatesAt",
              "createdAt",
              "updatedAt"
            ]
          },
          "toPlace": {
            "description": "`PlaceEntity`: a stored place, Prisma's field order.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "MAP_SEARCH",
                  "MAP_PIN",
                  "MANUAL",
                  null
                ],
                "x-enum-open": true
              },
              "provider": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "GOOGLE",
                  null
                ],
                "x-enum-open": true
              },
              "providerPlaceId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "formattedAddress": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "street": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "postalCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "region": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "countryName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "countryCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "cityKey": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "coordinatesAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "organizationId",
              "source",
              "provider",
              "providerPlaceId",
              "name",
              "formattedAddress",
              "street",
              "postalCode",
              "city",
              "region",
              "countryName",
              "countryCode",
              "cityKey",
              "lat",
              "lng",
              "coordinatesAt",
              "createdAt",
              "updatedAt"
            ]
          },
          "currency": {
            "type": "string"
          },
          "estimatedCost": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "requestedAdvanceAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "ownCarApprovalRequested": {
            "type": "boolean"
          },
          "premiumClassApprovalRequested": {
            "type": "boolean"
          },
          "travelRequestNumber": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "pdfGeneratedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "version": {
            "description": "SPINE 26.10 item 3: the request's version (also its `ETag`).",
            "type": "integer",
            "format": "int64"
          },
          "merged": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "reportId",
          "organizationId",
          "purpose",
          "fromDateTime",
          "toDateTime",
          "fromPlace",
          "toPlace",
          "currency",
          "estimatedCost",
          "requestedAdvanceAmount",
          "ownCarApprovalRequested",
          "premiumClassApprovalRequested",
          "travelRequestNumber",
          "pdfGeneratedAt",
          "createdAt",
          "updatedAt",
          "version",
          "merged"
        ]
      },
      "TravelRequestPdf": {
        "description": "The rendered reisesøknad.",
        "type": "object",
        "properties": {
          "url": {
            "description": "A signed link (valid for an hour).",
            "type": "string"
          },
          "travelRequestNumber": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "pdfGeneratedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "url",
          "travelRequestNumber",
          "pdfGeneratedAt"
        ]
      },
      "RegeneratePdf": {
        "description": "`TravelRequestController_regeneratePdf` (no body).",
        "type": "object"
      },
      "SuggestPlacesDto": {
        "description": "`SuggestPlacesDto`.",
        "type": "object",
        "properties": {
          "query": {
            "description": "Free-text query (2–200 characters, trimmed). Proxied with no identifier attached.",
            "type": "string",
            "minLength": 2,
            "maxLength": 200
          },
          "bias": {
            "description": "`PlaceBiasDto`: where the caller is looking.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "lat": {
                "type": "number",
                "format": "double",
                "minimum": -90.0,
                "maximum": 90.0
              },
              "lng": {
                "type": "number",
                "format": "double",
                "minimum": -180.0,
                "maximum": 180.0
              },
              "radiusMeters": {
                "description": "Metres (default 20000).",
                "type": [
                  "number",
                  "null"
                ],
                "format": "double",
                "minimum": 100.0,
                "maximum": 50000.0
              }
            },
            "required": [
              "lat",
              "lng"
            ]
          }
        },
        "required": [
          "query"
        ]
      },
      "PlaceSuggestionDto": {
        "description": "`PlaceSuggestionDto`: one autocomplete row (no coordinates: those cost a details call).",
        "type": "object",
        "properties": {
          "providerPlaceId": {
            "description": "Opaque provider id. Send it back to POST /geo/places/details.",
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "mainText": {
            "type": [
              "string",
              "null"
            ]
          },
          "secondaryText": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "providerPlaceId",
          "text",
          "mainText",
          "secondaryText"
        ]
      },
      "PlaceDetailsDto": {
        "description": "`PlaceDetailsDto`.",
        "type": "object",
        "properties": {
          "providerPlaceId": {
            "description": "Opaque provider id from a suggestion.",
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          }
        },
        "required": [
          "providerPlaceId"
        ]
      },
      "PlaceCandidateDto": {
        "description": "`PlaceCandidateDto`: a resolved place in the shape a client sends straight back as a\n nested place on a drive stop or a travel endpoint.",
        "type": "object",
        "properties": {
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "GOOGLE",
              null
            ],
            "description": "Null together with `providerPlaceId`.",
            "x-enum-open": true
          },
          "providerPlaceId": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "MAP_SEARCH",
              "MAP_PIN",
              "MANUAL",
              null
            ],
            "description": "MAP_SEARCH from suggest/details, MAP_PIN from reverse; send it back unchanged.",
            "x-enum-open": true
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "formattedAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "street": {
            "description": "Street name and house number, in the order the address's own country writes them.",
            "type": [
              "string",
              "null"
            ]
          },
          "postalCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "countryCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "countryName": {
            "type": [
              "string",
              "null"
            ]
          },
          "lat": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "lng": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          }
        },
        "required": [
          "provider",
          "providerPlaceId",
          "source",
          "name",
          "formattedAddress",
          "street",
          "postalCode",
          "city",
          "region",
          "countryCode",
          "countryName",
          "lat",
          "lng"
        ]
      },
      "ReversePlaceDto": {
        "description": "`ReversePlaceDto`: a dropped pin (in the body, never a URL).",
        "type": "object",
        "properties": {
          "lat": {
            "type": "number",
            "format": "double",
            "minimum": -90.0,
            "maximum": 90.0
          },
          "lng": {
            "type": "number",
            "format": "double",
            "minimum": -180.0,
            "maximum": 180.0
          }
        },
        "required": [
          "lat",
          "lng"
        ]
      },
      "ListPage_PerDiemDetail": {
        "description": "The envelope of a list whose item declares relations (SPINE 26.12.2): [`ListPage`]'s\n members and the side-loads, `{ items, hasMore, nextCursor?, total?, included? }`. Its\n schema keeps `ListPage`'s name: a route answers one or the other for an item, never\n both.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PerDiemDetail"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "included": {
            "description": "The side-loaded resources by type (`include=`); absent when nothing was asked for.",
            "$ref": "#/components/schemas/PerDiemIncluded"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "PerDiemIncluded": {
        "description": "The side-loaded resources (SPINE 26.12.2): one array per type, each resource once, ordered by id",
        "type": "object",
        "properties": {
          "category": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CategoryDetail"
            }
          },
          "project": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectDetail"
            }
          }
        },
        "additionalProperties": false
      },
      "SetPerDiemDto": {
        "description": "`SetPerDiemDto`: `meals`, or `mealDate` with the meal flags it decides.",
        "type": "object",
        "properties": {
          "mealDate": {
            "description": "Calendar date of the selected meal in Europe/Oslo; the meal flags sent with it are\n decisions on that date.",
            "type": [
              "string",
              "null"
            ]
          },
          "meals": {
            "description": "Meal decisions, each on its own calendar date (at most 9).",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/DatedMealDecision"
            },
            "maxItems": 9
          },
          "breakfast": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "lunch": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "dinner": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "amount": {
            "description": "Accepted and ignored (minor units).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        }
      },
      "DatedMealDecision": {
        "description": "One dated meal decision: `isOn` false means the meal was provided (deducted).",
        "type": "object",
        "properties": {
          "date": {
            "description": "Calendar date of the meal in Europe/Oslo (`YYYY-MM-DD`).",
            "type": "string"
          },
          "meal": {
            "$ref": "#/components/schemas/MealKey"
          },
          "isOn": {
            "type": "boolean"
          }
        },
        "required": [
          "date",
          "meal",
          "isOn"
        ]
      },
      "MealKey": {
        "description": "`breakfast` | `lunch` | `dinner`.",
        "type": "string",
        "enum": [
          "breakfast",
          "lunch",
          "dinner"
        ]
      },
      "PerDiemWritten": {
        "description": "What a per-diem write answers (SPINE 26.1 rule 10, 26.2): the per diem's one summary\n (travel-api's [`PerDiemSummary`]) beside its report's summary after the write.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "description": "SPINE 26.10 item 3: the per diem's version; send it back as `If-Match`.",
            "type": "integer",
            "format": "int64"
          },
          "reportId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "isHalfDay": {
            "type": "boolean"
          },
          "dognIndex": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "periodStart": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "periodEnd": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "isFullDogn": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "stayBreakfast": {
            "type": "boolean"
          },
          "mealSelections": {
            "description": "The settled meal facts, by date; null on a row that keeps its meals in the three\n flags only.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/MealSelection"
            }
          },
          "status": {
            "$ref": "#/components/schemas/PerDiemStatus"
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "countrySource": {
            "description": "Where a per diem's country came from (`PerDiemCountrySource`).",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "STAY",
              "DESTINATION_PROXY",
              "DAY_TRIP",
              null
            ],
            "x-enum-open": true
          },
          "breakfast": {
            "type": "boolean"
          },
          "lunch": {
            "type": "boolean"
          },
          "dinner": {
            "type": "boolean"
          },
          "currency": {
            "type": "string"
          },
          "fullFareAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "fullFareExemptAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "taxAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "exemptAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "amount": {
            "description": "`None` while the day is not priced.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "compensationAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "nightSupplementAmount": {
            "description": "Nattillegg folded into `amount`, its trekkfri slice and its nights (Nest #1434).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "nightSupplementExemptAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "nightSupplementNights": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "fareAmount": {
            "description": "The kost part of `amount` (less every folded supplement); null without an amount.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "taxableAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "taxCategoryId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "taxFreeCategoryId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "rateId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "travelAccommodationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "report": {
            "description": "The per diem's report after the write.",
            "$ref": "#/components/schemas/ReportSummary"
          },
          "merged": {
            "description": "SPINE 26.10 item 3: the `If-Match` version was older and this write merged over\n the changes since it.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "version",
          "reportId",
          "organizationId",
          "date",
          "isHalfDay",
          "dognIndex",
          "periodStart",
          "periodEnd",
          "isFullDogn",
          "stayBreakfast",
          "mealSelections",
          "status",
          "country",
          "countrySource",
          "breakfast",
          "lunch",
          "dinner",
          "currency",
          "fullFareAmount",
          "fullFareExemptAmount",
          "taxAmount",
          "exemptAmount",
          "amount",
          "compensationAmount",
          "nightSupplementAmount",
          "nightSupplementExemptAmount",
          "nightSupplementNights",
          "fareAmount",
          "taxableAmount",
          "taxCategoryId",
          "taxFreeCategoryId",
          "rateId",
          "travelAccommodationId",
          "createdAt",
          "updatedAt",
          "report",
          "merged"
        ]
      },
      "CreateRateDto": {
        "description": "`CreateRateDto`.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "amount": {
            "type": "number",
            "format": "double",
            "minimum": 0.0
          },
          "criteria": {
            "$ref": "#/components/schemas/RateCriteria"
          },
          "applicableYear": {
            "description": "`null` names the default (year-less) amount.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "organizationId": {
            "description": "Absent or `null`: a platform-global rate (operators only).",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "title",
          "amount",
          "criteria"
        ]
      },
      "Rate": {
        "description": "A rate with all its amounts (`Rate`, a value object: one plain shape, SPINE 26.1 rule 1),\n the shared default (no year) first, then year by year. Also a row of `GET /rates`.",
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "criteria": {
            "$ref": "#/components/schemas/RateCriteria"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "organizationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "amounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RateAmount"
            }
          }
        },
        "required": [
          "id",
          "title",
          "criteria",
          "createdAt",
          "updatedAt",
          "deletedAt",
          "organizationId",
          "amounts"
        ]
      },
      "RateAmount": {
        "description": "One amount of a rate (`RateAmount`): a decimal rate value (kroner per kilometre or\n per døgn, 4 decimals) for a year, or the shared default (no year).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "value": {
            "type": "number"
          },
          "applicableYear": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "rateId": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "value",
          "applicableYear",
          "rateId",
          "createdAt",
          "updatedAt",
          "deletedAt"
        ]
      },
      "ListPage_Rate": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Rate"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "UpdateRateDto": {
        "description": "`UpdateRateDto`: `CreateRateDto` without `organizationId`, every field optional;\n `title: null` clears it.",
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "criteria": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "PER_DIEM_TAX_ABROAD_COMPENSATION",
              "PER_DIEM_TAX_FROM_6_TO_12_HOURS",
              "PER_DIEM_TAX_OVER_12_HOURS_WITHOUT_ACCOMMODATION",
              "PER_DIEM_TAX_OVER_12_HOURS_WITH_ACCOMMODATION",
              "DRIVE_TAX_MILEAGE",
              "DRIVE_TAX_MILEAGE_WITH_PASSENGER",
              "DRIVE_TAX_MILEAGE_WITH_TRAILER",
              "DRIVE_TAX_MILEAGE_OFFROAD",
              "PER_DIEM_TAXFREE_FROM_6_TO_12_HOURS",
              "PER_DIEM_TAXFREE_OVER_12_HOURS_WITHOUT_ACCOMMODATION",
              "PER_DIEM_TAXFREE_OVERNIGHT_WITH_HOTEL",
              "PER_DIEM_TAXFREE_OVERNIGHT_WITH_COOKING",
              "PER_DIEM_TAXFREE_OVERNIGHT_WITHOUT_COOKING",
              "PER_DIEM_TAXFREE_OVERNIGHT_TRUCKER",
              "PER_DIEM_TAXFREE_NIGHT_DOMESTIC",
              "DRIVE_TAXFREE_MILEAGE",
              "DRIVE_TAXFREE_MILEAGE_WITH_PASSENGER",
              "DRIVE_TAXFREE_MILEAGE_WITH_TRAILER",
              "DRIVE_TAXFREE_MILEAGE_OFFROAD",
              null
            ]
          },
          "applicableYear": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 2020,
            "maximum": 2100
          }
        }
      },
      "NightSupplementDisclosureEntity": {
        "description": "The questions a traveller answers to claim nattillegg on a stay, and what it pays\n (`NightSupplementDisclosureEntity`). The wording is the server's: a versioned legal\n text the claim names and stores answers against, not interface copy.",
        "type": "object",
        "properties": {
          "version": {
            "description": "Sent back as `nightSupplement.disclosureVersion`.",
            "type": "string"
          },
          "class": {
            "$ref": "#/components/schemas/NightSupplementDisclosureClass"
          },
          "ratePerNight": {
            "description": "The statutory sats per night for the year, in NOK minor units (øre); null while no\n sats is configured for the year.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NightSupplementDisclosureItemEntity"
            }
          }
        },
        "required": [
          "version",
          "class",
          "ratePerNight",
          "items"
        ]
      },
      "NightSupplementDisclosureClass": {
        "description": "The stay class a questionnaire is asked of (`NightSupplementDisclosureClass`).",
        "type": "string",
        "enum": [
          "COOKING",
          "TRANSPORT"
        ],
        "x-enum-open": true
      },
      "NightSupplementDisclosureItemEntity": {
        "description": "One question (`NightSupplementDisclosureItemEntity`).",
        "type": "object",
        "properties": {
          "key": {
            "description": "What the claim answers the item under (`nightSupplement.answers[].key`).",
            "type": "string"
          },
          "text": {
            "$ref": "#/components/schemas/NightSupplementDisclosureTextEntity"
          },
          "qualifyingAnswer": {
            "description": "The answer a claim must give.",
            "type": "boolean"
          }
        },
        "required": [
          "key",
          "text",
          "qualifyingAnswer"
        ]
      },
      "NightSupplementDisclosureTextEntity": {
        "description": "A disclosure item's wording (`NightSupplementDisclosureTextEntity`).",
        "type": "object",
        "properties": {
          "nb": {
            "type": "string"
          },
          "en": {
            "type": "string"
          }
        },
        "required": [
          "nb",
          "en"
        ]
      },
      "PlaceVocabularyDto": {
        "description": "`PlaceVocabularyDto`.",
        "type": "object",
        "properties": {
          "version": {
            "description": "SHA-256 of the code-sorted countries' JSON.",
            "type": "string"
          },
          "countries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlaceVocabularyCountryDto"
            }
          }
        },
        "required": [
          "version",
          "countries"
        ]
      },
      "PlaceVocabularyCountryDto": {
        "description": "`PlaceVocabularyCountryDto`.",
        "type": "object",
        "properties": {
          "code": {
            "description": "The wire identity clients store and send (ISO 3166-1 alpha-2, XK, or one of the\n four supported ISO 3166-2 sub-jurisdictions).",
            "type": "string"
          },
          "parentCode": {
            "description": "The alpha-2 parent of a sub-jurisdiction; null for a country.",
            "type": [
              "string",
              "null"
            ]
          },
          "aliases": {
            "description": "Every accepted legacy input for the code, the code itself first.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "perDiemDomestic": {
            "description": "Whether the code prices in the domestic per-diem bucket.",
            "type": "boolean"
          }
        },
        "required": [
          "code",
          "parentCode",
          "aliases",
          "perDiemDomestic"
        ]
      },
      "ListPage_DietScheme": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DietScheme"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "DietScheme": {
        "description": "A diet scheme (`DietScheme`, versioned configuration: one plain shape, SPINE 26.1\n rule 1): the row, its draft and published configs (the scheme's own documents). Also a\n row of `GET …/diet-schemes`.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "isBuiltIn": {
            "type": "boolean"
          },
          "ownerOrganizationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "draftConfig": true,
          "publishedConfig": true,
          "publishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "currentVersionId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "isBuiltIn",
          "ownerOrganizationId",
          "draftConfig",
          "publishedConfig",
          "publishedAt",
          "currentVersionId",
          "createdAt",
          "updatedAt",
          "deletedAt"
        ]
      },
      "CreateDietSchemeDto": {
        "description": "`CreateDietSchemeDto`.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "draftConfig": {
            "description": "Optional initial draft config, validated up front; defaults to the empty STATENS\n deck.",
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          }
        },
        "required": [
          "name"
        ]
      },
      "UpdateDietSchemeDto": {
        "description": "`UpdateDietSchemeDto`: absent keeps a field; `description: null` clears it;\n `draftConfig: null` is validated like any config (and refused, as in Nest).",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 2000
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "draftConfig": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          }
        }
      },
      "PublishDietSchemeDto": {
        "description": "`PublishDietSchemeDto`.",
        "type": "object",
        "properties": {
          "changeNote": {
            "description": "A note on this version, stored on `DietSchemeVersion.changeNote`.",
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "DietSchemePublished": {
        "description": "A publish's answer: the scheme and the version it created (`DietSchemePublished`).",
        "type": "object",
        "properties": {
          "scheme": {
            "$ref": "#/components/schemas/DietScheme"
          },
          "version": {
            "$ref": "#/components/schemas/DietSchemeVersion"
          }
        },
        "required": [
          "scheme",
          "version"
        ]
      },
      "DietSchemeVersion": {
        "description": "A published version of a diet scheme (`DietSchemeVersion`).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "dietSchemeId": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "config": true,
          "publishedAt": {
            "type": "string",
            "format": "date-time"
          },
          "publishedBy": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "changeNote": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "dietSchemeId",
          "version",
          "config",
          "publishedAt",
          "publishedBy",
          "changeNote"
        ]
      },
      "ListPage_DietSchemeAssignment": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DietSchemeAssignment"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "DietSchemeAssignment": {
        "description": "A diet scheme assigned to an organization (`DietSchemeAssignment`, a value object keyed\n by the organization and the scheme: one plain shape, SPINE 26.1 rule 1). Also a row of\n `GET …/diet-scheme-assignments`.",
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "dietSchemeId": {
            "type": "string",
            "format": "uuid"
          },
          "priority": {
            "type": "integer",
            "format": "int32"
          },
          "appliesWhen": {
            "description": "`{all: [{field, operator, value}]}`; null applies unconditionally."
          },
          "effectiveFrom": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "effectiveTo": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "organizationId",
          "dietSchemeId",
          "priority",
          "appliesWhen",
          "effectiveFrom",
          "effectiveTo",
          "createdAt",
          "deletedAt"
        ]
      },
      "CreateDietSchemeAssignmentDto": {
        "description": "`CreateDietSchemeAssignmentDto`.",
        "type": "object",
        "properties": {
          "dietSchemeId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "priority": {
            "description": "Higher wins when several assignments match; ties by scheme id.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "appliesWhen": {
            "description": "`{all: [{field, operator, value}]}`; null or absent applies unconditionally.",
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "effectiveFrom": {
            "type": [
              "string",
              "null"
            ]
          },
          "effectiveTo": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "dietSchemeId"
        ]
      },
      "PatchDietSchemeAssignmentDto": {
        "description": "`PatchDietSchemeAssignmentDto`: every field optional; `null` clears `appliesWhen`\n and the bounds.",
        "type": "object",
        "properties": {
          "priority": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "appliesWhen": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "effectiveFrom": {
            "type": [
              "string",
              "null"
            ]
          },
          "effectiveTo": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "IntegrationStatus": {
        "description": "`IntegrationStatus`: a PENDING integration (an unfinished OAuth onboarding) gets\n no events.",
        "type": "string",
        "enum": [
          "PENDING",
          "ACTIVE"
        ],
        "x-enum-open": true
      },
      "IntegrationSummary": {
        "description": "A summary-level integration (SPINE 26.1): what an integration create answers and what\n other aggregates embed (an organization's integrations, a service account's): the row\n (the secret never) and its provider-derived `name`. Built only by integrations.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "webhookUrl": {
            "type": "string"
          },
          "events": {
            "type": [
              "string",
              "null"
            ]
          },
          "serviceAccountId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/IntegrationStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "integrationProviderId": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "description": "The provider's name, else its id, else `''`.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "webhookUrl",
          "events",
          "serviceAccountId",
          "organizationId",
          "status",
          "createdAt",
          "updatedAt",
          "integrationProviderId",
          "name"
        ]
      },
      "ListPage_InvoiceListItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "CreateInvoiceDto": {
        "description": "`CreateInvoiceDto`.",
        "type": "object",
        "properties": {
          "reportId": {
            "type": "string"
          }
        },
        "required": [
          "reportId"
        ]
      },
      "InvoiceSummary": {
        "description": "A report document (invoice) at summary level: its own scalars, never the storage keys.\n What a document write answers and what a report embeds. Built only by integrations'\n `invoices::read::invoice_summary`.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/DocumentStatus"
          },
          "deliveredAs": {
            "type": [
              "string",
              "null"
            ]
          },
          "errorDescription": {
            "type": [
              "string",
              "null"
            ]
          },
          "ehfMessageNumber": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "emailDeliveredAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "ehfSentAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "deliveryRequestedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "destinationsResolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "pdfAttempt": {
            "type": "integer",
            "format": "int32"
          },
          "invoiceNumber": {
            "type": "integer",
            "format": "int32"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "reportId": {
            "type": "string"
          },
          "orgNumber": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "status",
          "deliveredAs",
          "errorDescription",
          "ehfMessageNumber",
          "emailDeliveredAt",
          "ehfSentAt",
          "deliveryRequestedAt",
          "destinationsResolvedAt",
          "pdfAttempt",
          "invoiceNumber",
          "dueDate",
          "createdAt",
          "updatedAt",
          "organizationId",
          "reportId",
          "orgNumber"
        ]
      },
      "StartCardLinkDto": {
        "description": "`StartCardLinkDto`: start X-Receipts card linking for one of the caller's cards, or a\n new one.",
        "type": "object",
        "properties": {
          "paymentCardId": {
            "description": "The saved card the holder starts from. Not together with `newCard`.",
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "newCard": {
            "description": "A card to save, pending, as the link starts. Not together with `paymentCardId`; with\n neither, X-Receipts' report creates the card.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "description": {
                "description": "Trimmed; 1 to 255 characters.",
                "type": "string"
              },
              "cardType": {
                "$ref": "#/components/schemas/PaymentCardType"
              },
              "organizationId": {
                "description": "The company of a company card; null or omitted for a personal card.",
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "default": null
              }
            },
            "required": [
              "description",
              "cardType",
              "organizationId"
            ]
          },
          "returnUrl": {
            "description": "Where X-Receipts sends the browser back, with `status=success|error|cancelled`\n appended. Must be an address of the Utleggsappen web app.",
            "type": "string",
            "minLength": 1,
            "maxLength": 2048
          }
        },
        "required": [
          "returnUrl"
        ]
      },
      "PaymentCardType": {
        "description": "`PaymentCardType` (a card's own `cardType`; also a card X-Receipts linking saves).",
        "type": "string",
        "enum": [
          "DEBIT",
          "CREDIT"
        ]
      },
      "CardLinkSessionDto": {
        "description": "`CardLinkSessionDto`: X-Receipts' hosted card form; open it within `expiresAt`.",
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string"
          }
        },
        "required": [
          "url",
          "expiresAt"
        ]
      },
      "InvoiceDetail": {
        "description": "A report document at detail level: the list row, its report's summary and signed\n links to the stored PDF and EHF (`null` when none is stored).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/DocumentStatus"
          },
          "deliveredAs": {
            "type": [
              "string",
              "null"
            ]
          },
          "errorDescription": {
            "type": [
              "string",
              "null"
            ]
          },
          "ehfMessageNumber": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "emailDeliveredAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "ehfSentAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "deliveryRequestedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "destinationsResolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "pdfAttempt": {
            "type": "integer",
            "format": "int32"
          },
          "invoiceNumber": {
            "type": "integer",
            "format": "int32"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "reportId": {
            "type": "string"
          },
          "orgNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "organization": {
            "description": "The organization (the invoice's tenant).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "handle": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              },
              "legalName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "orgNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "isPersonal": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "handle",
              "displayName",
              "legalName",
              "orgNumber",
              "isPersonal"
            ]
          },
          "deliveries": {
            "description": "The read shape of each delivery (never `target`).",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceDelivery"
            }
          },
          "deliverySummary": {
            "description": "Computed per read from the deliveries; absent while the destinations are unknown\n (as the report document embeds the invoice).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "state": {
                "$ref": "#/components/schemas/InvoiceDeliveryRollupState"
              },
              "total": {
                "description": "Destinations counted: every delivery except VOID and SKIPPED.",
                "type": "integer",
                "format": "uint",
                "minimum": 0
              },
              "settled": {
                "type": "integer",
                "format": "uint",
                "minimum": 0
              },
              "failed": {
                "type": "integer",
                "format": "uint",
                "minimum": 0
              },
              "held": {
                "description": "Deliberately waiting for a batch release: neither settled, failed nor pending.",
                "type": "integer",
                "format": "uint",
                "minimum": 0
              },
              "pending": {
                "description": "Neither settled, failed nor held: PENDING, or SENT awaiting confirmation.",
                "type": "integer",
                "format": "uint",
                "minimum": 0
              }
            },
            "required": [
              "state",
              "total",
              "settled",
              "failed",
              "held",
              "pending"
            ]
          },
          "heldDeliveries": {
            "description": "Where each HELD delivery stands; absent when none is held (as the report document\n embeds the invoice).",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HeldDeliveryExpectation"
            }
          },
          "report": {
            "description": "The invoice's report (SPINE 26.1 rule 4: the other aggregate's summary); `null` when\n the caller no longer sees it (removed, or outside its reach).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "title": {
                "description": "The report's name (SPINE 26.2): the user's, or generated from its content; `null`:\n the client shows its own placeholder.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "description": "Deprecated: use `presentation` and `travelId`. The compat type derived from the\n report's content (a søknad serializes `EXPENSEGROUP`; `kind` carries the real\n discriminator).",
                "$ref": "#/components/schemas/ReportType",
                "deprecated": true
              },
              "id": {
                "type": "string"
              },
              "version": {
                "description": "SPINE 26.10 item 3: the report's version; send it back as `If-Match`.",
                "type": "integer",
                "format": "int64"
              },
              "status": {
                "$ref": "#/components/schemas/ReportStatus"
              },
              "amount": {
                "description": "Minor units of `baseCurrency`.",
                "type": "integer",
                "format": "int64"
              },
              "baseCurrency": {
                "type": "string"
              },
              "accountId": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "titleSource": {
                "$ref": "#/components/schemas/ReportTitleSource"
              },
              "shouldReinvoice": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "departmentId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "projectId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "travelId": {
                "description": "The report's travel (SPINE 26.12.2: a relation is its id); `null`: no travel.",
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "reviewComment": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              },
              "deletedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "publishedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "submittedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "_count": {
                "$ref": "#/components/schemas/ReportCounts"
              },
              "presentation": {
                "description": "`SINGLE`: an implicit wrapper of exactly one line, an expense or a drive (a per diem\n counts as a line; no travel or travel request); `GROUP` otherwise, an empty report\n included.",
                "$ref": "#/components/schemas/ReportPresentation"
              },
              "kind": {
                "$ref": "#/components/schemas/ReportKind"
              },
              "leadLine": {
                "description": "On a standalone expense report (`SINGLE` with one expense) its one expense; `null`\n otherwise (a lone drive's too).",
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "title": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "expenseId": {
                    "type": "string"
                  },
                  "merchant": {
                    "description": "The expense's own merchant, else its first live receipt's.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "categoryId": {
                    "description": "The category's id (SPINE 26.12.2: a relation is its id); `null` with `category`.",
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "category": {
                    "description": "A summary-level category (SPINE 26.1).",
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "title": {
                        "type": "string"
                      },
                      "description": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "organizationId": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "accountingCode": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "visibility": {
                        "description": "`VISIBLE` or `HIDDEN`.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "title",
                      "description",
                      "accountingCode",
                      "visibility"
                    ]
                  }
                },
                "required": [
                  "expenseId",
                  "title",
                  "merchant",
                  "categoryId",
                  "category"
                ]
              },
              "period": {
                "description": "`null` when no line has a date.",
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "firstDay": {
                    "type": "string"
                  },
                  "lastDay": {
                    "type": "string"
                  }
                },
                "required": [
                  "firstDay",
                  "lastDay"
                ]
              },
              "missingDateCount": {
                "description": "Live lines with no date that are not still uploading.",
                "type": "integer",
                "format": "int64"
              },
              "travel": {
                "description": "The report's travel (an owned child, SPINE 26.2), or null.",
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "version": {
                    "description": "SPINE 26.10 item 3: the travel's version; send it back as `If-Match`.",
                    "type": "integer",
                    "format": "int64"
                  },
                  "reportId": {
                    "type": "string"
                  },
                  "organizationId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "fromDateTime": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "toDateTime": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "businessStartAt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "businessStartTimeZone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "businessEndAt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "businessEndTimeZone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "privateInterruptions": {
                    "description": "Null when none were declared.",
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "$ref": "#/components/schemas/PrivateInterruption"
                    }
                  },
                  "fromPlace": {
                    "description": "`PlaceEntity`: a stored place, Prisma's field order.",
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "organizationId": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "source": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "MAP_SEARCH",
                          "MAP_PIN",
                          "MANUAL",
                          null
                        ],
                        "x-enum-open": true
                      },
                      "provider": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "GOOGLE",
                          null
                        ],
                        "x-enum-open": true
                      },
                      "providerPlaceId": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "formattedAddress": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "street": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "postalCode": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "city": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "region": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "countryName": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "countryCode": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "cityKey": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "lat": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "double"
                      },
                      "lng": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "double"
                      },
                      "coordinatesAt": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "source",
                      "provider",
                      "providerPlaceId",
                      "name",
                      "formattedAddress",
                      "street",
                      "postalCode",
                      "city",
                      "region",
                      "countryName",
                      "countryCode",
                      "cityKey",
                      "lat",
                      "lng",
                      "coordinatesAt",
                      "createdAt",
                      "updatedAt"
                    ]
                  },
                  "toPlace": {
                    "description": "`PlaceEntity`: a stored place, Prisma's field order.",
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "organizationId": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "source": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "MAP_SEARCH",
                          "MAP_PIN",
                          "MANUAL",
                          null
                        ],
                        "x-enum-open": true
                      },
                      "provider": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "GOOGLE",
                          null
                        ],
                        "x-enum-open": true
                      },
                      "providerPlaceId": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "formattedAddress": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "street": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "postalCode": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "city": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "region": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "countryName": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "countryCode": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "cityKey": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "lat": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "double"
                      },
                      "lng": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "double"
                      },
                      "coordinatesAt": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "source",
                      "provider",
                      "providerPlaceId",
                      "name",
                      "formattedAddress",
                      "street",
                      "postalCode",
                      "city",
                      "region",
                      "countryName",
                      "countryCode",
                      "cityKey",
                      "lat",
                      "lng",
                      "coordinatesAt",
                      "createdAt",
                      "updatedAt"
                    ]
                  },
                  "purpose": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "typeOfAccommodation": {
                    "$ref": "#/components/schemas/TravelAccommodationType"
                  },
                  "currency": {
                    "type": "string"
                  },
                  "advanceAmount": {
                    "description": "Minor units of the currency (øre for NOK).",
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64"
                  },
                  "rateLevel": {
                    "$ref": "#/components/schemas/TravelRateLevel"
                  },
                  "perDiemDisabled": {
                    "type": "boolean"
                  },
                  "travelRequestId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "dietSchemeVersionId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "id",
                  "version",
                  "reportId",
                  "organizationId",
                  "fromDateTime",
                  "toDateTime",
                  "businessStartAt",
                  "businessStartTimeZone",
                  "businessEndAt",
                  "businessEndTimeZone",
                  "privateInterruptions",
                  "fromPlace",
                  "toPlace",
                  "purpose",
                  "typeOfAccommodation",
                  "currency",
                  "advanceAmount",
                  "rateLevel",
                  "perDiemDisabled",
                  "travelRequestId",
                  "dietSchemeVersionId",
                  "createdAt",
                  "updatedAt"
                ]
              },
              "travelRequest": {
                "description": "The søknad (an owned child), or null.",
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "version": {
                    "description": "SPINE 26.10 item 3: the request's version; send it back as `If-Match`.",
                    "type": "integer",
                    "format": "int64"
                  },
                  "reportId": {
                    "type": "string"
                  },
                  "organizationId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "purpose": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "fromDateTime": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "toDateTime": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "fromPlace": {
                    "description": "`PlaceEntity`: a stored place, Prisma's field order.",
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "organizationId": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "source": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "MAP_SEARCH",
                          "MAP_PIN",
                          "MANUAL",
                          null
                        ],
                        "x-enum-open": true
                      },
                      "provider": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "GOOGLE",
                          null
                        ],
                        "x-enum-open": true
                      },
                      "providerPlaceId": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "formattedAddress": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "street": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "postalCode": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "city": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "region": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "countryName": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "countryCode": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "cityKey": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "lat": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "double"
                      },
                      "lng": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "double"
                      },
                      "coordinatesAt": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "source",
                      "provider",
                      "providerPlaceId",
                      "name",
                      "formattedAddress",
                      "street",
                      "postalCode",
                      "city",
                      "region",
                      "countryName",
                      "countryCode",
                      "cityKey",
                      "lat",
                      "lng",
                      "coordinatesAt",
                      "createdAt",
                      "updatedAt"
                    ]
                  },
                  "toPlace": {
                    "description": "`PlaceEntity`: a stored place, Prisma's field order.",
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "organizationId": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "source": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "MAP_SEARCH",
                          "MAP_PIN",
                          "MANUAL",
                          null
                        ],
                        "x-enum-open": true
                      },
                      "provider": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "GOOGLE",
                          null
                        ],
                        "x-enum-open": true
                      },
                      "providerPlaceId": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "formattedAddress": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "street": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "postalCode": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "city": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "region": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "countryName": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "countryCode": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "cityKey": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "lat": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "double"
                      },
                      "lng": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "format": "double"
                      },
                      "coordinatesAt": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "source",
                      "provider",
                      "providerPlaceId",
                      "name",
                      "formattedAddress",
                      "street",
                      "postalCode",
                      "city",
                      "region",
                      "countryName",
                      "countryCode",
                      "cityKey",
                      "lat",
                      "lng",
                      "coordinatesAt",
                      "createdAt",
                      "updatedAt"
                    ]
                  },
                  "currency": {
                    "type": "string"
                  },
                  "estimatedCost": {
                    "description": "Minor units of the currency (øre for NOK).",
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64"
                  },
                  "requestedAdvanceAmount": {
                    "description": "Minor units of the currency (øre for NOK).",
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64"
                  },
                  "ownCarApprovalRequested": {
                    "type": "boolean"
                  },
                  "premiumClassApprovalRequested": {
                    "type": "boolean"
                  },
                  "travelRequestNumber": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int32"
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "id",
                  "version",
                  "reportId",
                  "organizationId",
                  "purpose",
                  "fromDateTime",
                  "toDateTime",
                  "fromPlace",
                  "toPlace",
                  "currency",
                  "estimatedCost",
                  "requestedAdvanceAmount",
                  "ownCarApprovalRequested",
                  "premiumClassApprovalRequested",
                  "travelRequestNumber",
                  "createdAt",
                  "updatedAt"
                ]
              }
            },
            "required": [
              "id",
              "version",
              "status",
              "type",
              "amount",
              "baseCurrency",
              "accountId",
              "organizationId",
              "title",
              "titleSource",
              "description",
              "shouldReinvoice",
              "departmentId",
              "projectId",
              "travelId",
              "reviewComment",
              "createdAt",
              "updatedAt",
              "deletedAt",
              "publishedAt",
              "submittedAt",
              "_count",
              "presentation",
              "kind",
              "leadLine",
              "period",
              "missingDateCount",
              "travel",
              "travelRequest"
            ]
          },
          "url": {
            "description": "A signed link to the stored PDF (valid for an hour).",
            "type": [
              "string",
              "null"
            ]
          },
          "fileName": {
            "description": "The stored PDF's file name (its key's last segment, never the key): what an\n integration attaches it under. `null` when none is stored.",
            "type": [
              "string",
              "null"
            ]
          },
          "ehfUrl": {
            "description": "A signed link to the stored EHF XML.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "status",
          "deliveredAs",
          "errorDescription",
          "ehfMessageNumber",
          "emailDeliveredAt",
          "ehfSentAt",
          "deliveryRequestedAt",
          "destinationsResolvedAt",
          "pdfAttempt",
          "invoiceNumber",
          "dueDate",
          "createdAt",
          "updatedAt",
          "organizationId",
          "reportId",
          "orgNumber",
          "organization",
          "deliveries",
          "report",
          "url",
          "fileName",
          "ehfUrl"
        ]
      },
      "UpdateInvoiceDto": {
        "description": "`UpdateInvoiceDto`. `errorDescription` is deliberately unbounded here: a provider's\n long failure text is cut at the write ([`bound_error_text`]), never refused.",
        "type": "object",
        "properties": {
          "status": {
            "description": "VOID marks a document superseded by a correction: the API's own act, refused here.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "CREATING",
              "COMPRESSING",
              "CREATED",
              "SENDING",
              "SENT",
              "DELIVERED",
              "FAILED",
              "VOID",
              null
            ]
          },
          "deliveredAs": {
            "description": "A channel tag (`EHF`, `EMAIL`, a provider id).",
            "type": [
              "string",
              "null"
            ]
          },
          "errorDescription": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "SendInvoiceDto": {
        "description": "`SendInvoiceDto`.",
        "type": "object",
        "properties": {
          "email": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "ehf": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "integrationIds": {
            "description": "Resend to these integrations only (1–20, unique): the operator bar.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "acknowledgeDuplicateRisk": {
            "description": "Required to resend to a provider that does not reconcile before posting.",
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "SendInvoiceResult": {
        "description": "The answer: the integrations whose webhook was queued (not delivered).",
        "type": "object",
        "properties": {
          "queuedIntegrations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DispatchedIntegration"
            }
          }
        },
        "required": [
          "queuedIntegrations"
        ]
      },
      "DispatchedIntegration": {
        "description": "`DispatchedIntegration`.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "provider": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "provider"
        ]
      },
      "SupplierReviewCheckDto": {
        "type": "object",
        "properties": {
          "invoiceId": {
            "type": "string",
            "format": "uuid"
          },
          "attemptId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "companyId": {
            "type": "integer",
            "format": "int32",
            "minimum": 1
          },
          "fingerprint": {
            "type": "string",
            "minLength": 64,
            "maxLength": 64,
            "pattern": "^[a-f0-9]{64}$"
          },
          "payeeName": {
            "type": "string",
            "maxLength": 160
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 80
          },
          "candidates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupplierReviewCandidate"
            },
            "minItems": 0,
            "maxItems": 100
          },
          "createdSupplierNo": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "creationEnabled": {
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "invoiceId",
          "companyId",
          "fingerprint",
          "payeeName",
          "candidates"
        ]
      },
      "SupplierReviewCandidate": {
        "type": "object",
        "properties": {
          "associateNo": {
            "type": "integer",
            "format": "int32"
          },
          "supplierNo": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "bankSuffix": {
            "type": "string"
          },
          "bankMatches": {
            "type": "boolean"
          },
          "emailMatches": {
            "type": "boolean"
          },
          "nameCompatible": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "required": [
          "associateNo",
          "supplierNo",
          "name",
          "bankSuffix",
          "bankMatches",
          "emailMatches",
          "nameCompatible"
        ]
      },
      "SupplierReviewDecision": {
        "type": "object",
        "properties": {
          "reviewId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "action": {
            "type": "string"
          },
          "supplierNo": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          }
        },
        "required": [
          "reviewId",
          "action",
          "supplierNo"
        ]
      },
      "SupplierReviewEntity": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "companyId": {
            "type": "integer",
            "format": "int32"
          },
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "reportId": {
            "type": "string"
          },
          "deliveryId": {
            "type": "string",
            "format": "uuid"
          },
          "payeeName": {
            "type": "string"
          },
          "fingerprint": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "candidates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupplierReviewCandidate"
            }
          },
          "decision": {
            "type": [
              "string",
              "null"
            ]
          },
          "supplierNo": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "creationClaimed": {
            "type": "boolean"
          },
          "revision": {
            "type": "integer",
            "format": "int32"
          },
          "deliveryState": {
            "type": [
              "string",
              "null"
            ],
            "default": null
          },
          "deliveries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupplierReviewDelivery"
            },
            "default": []
          }
        },
        "required": [
          "id",
          "companyId",
          "accountId",
          "reportId",
          "deliveryId",
          "payeeName",
          "fingerprint",
          "reason",
          "candidates",
          "decision",
          "supplierNo",
          "creationClaimed",
          "revision",
          "deliveryState",
          "deliveries"
        ]
      },
      "SupplierReviewDelivery": {
        "type": "object",
        "properties": {
          "reportId": {
            "type": "string"
          },
          "deliveryId": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "reportId",
          "deliveryId",
          "state"
        ]
      },
      "SupplierReviewResolveDto": {
        "type": "object",
        "properties": {
          "reviewId": {
            "type": "string",
            "format": "uuid"
          },
          "fingerprint": {
            "type": "string",
            "minLength": 64,
            "maxLength": 64
          },
          "revision": {
            "type": "integer",
            "format": "int32",
            "minimum": 1
          },
          "choice": {
            "$ref": "#/components/schemas/SupplierReviewChoice"
          },
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          }
        },
        "additionalProperties": false,
        "required": [
          "reviewId",
          "fingerprint",
          "revision",
          "choice",
          "reason"
        ]
      },
      "SupplierReviewChoice": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "supplierNo": {
                "type": "integer",
                "format": "int32"
              },
              "action": {
                "type": "string",
                "enum": [
                  "EXISTING"
                ]
              }
            },
            "additionalProperties": false,
            "required": [
              "action",
              "supplierNo"
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "CREATE"
                ]
              }
            },
            "required": [
              "action"
            ],
            "additionalProperties": false
          }
        ]
      },
      "IntegrationDeliverySettings": {
        "description": "`IntegrationDeliverySettingsEntity`.",
        "type": "object",
        "properties": {
          "mode": {
            "$ref": "#/components/schemas/DeliveryMode"
          },
          "scheduleDays": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "scheduleHour": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "reminderDays": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "schedulePausedUntil": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "batchModeSince": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "heldCount": {
            "type": "integer",
            "format": "int64"
          },
          "oldestHeldAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "nextReleases": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date-time"
            }
          },
          "canEnableBatchMode": {
            "$ref": "#/components/schemas/BatchModeAvailability"
          },
          "reportsEnabled": {
            "description": "Whether the integration receives the approved reports at all. Off, no new delivery\n is created for it.",
            "type": "boolean"
          }
        },
        "required": [
          "mode",
          "scheduleDays",
          "scheduleHour",
          "reminderDays",
          "schedulePausedUntil",
          "batchModeSince",
          "heldCount",
          "oldestHeldAt",
          "nextReleases",
          "canEnableBatchMode",
          "reportsEnabled"
        ]
      },
      "DeliveryMode": {
        "description": "`IntegrationDeliveryMode`: send each document as it is ready, or hold them for a\n batch release (by hand, or on chosen days).",
        "type": "string",
        "enum": [
          "IMMEDIATE",
          "BATCH_MANUAL",
          "BATCH_SCHEDULED"
        ],
        "x-enum-open": true
      },
      "BatchModeAvailability": {
        "description": "`BatchModeAvailabilityEntity`.",
        "type": "object",
        "properties": {
          "allowed": {
            "type": "boolean"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "allowed"
        ]
      },
      "UpdateIntegrationDeliverySettingsDto": {
        "description": "`UpdateIntegrationDeliverySettingsDto`: the whole setting.",
        "type": "object",
        "properties": {
          "mode": {
            "$ref": "#/components/schemas/DeliveryMode"
          },
          "scheduleDays": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "scheduleHour": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "reminderDays": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "heldDisposition": {
            "description": "What becomes of waiting deliveries on leaving batch mode.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "RELEASE_NOW",
              "KEEP",
              null
            ]
          }
        },
        "required": [
          "mode"
        ]
      },
      "SetReportDeliveryDto": {
        "description": "`SetReportDeliveryDto`: report delivery on or off for one integration (its mode stays\n as it is).",
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "PauseDeliveryScheduleDto": {
        "description": "`PauseDeliveryScheduleDto`: `until` (ahead) xor `skipNext: true`.",
        "type": "object",
        "properties": {
          "until": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "skipNext": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "ResumeSchedule": {
        "description": "The resume's empty body.",
        "type": "object"
      },
      "IntegrationDeliveryMembers": {
        "description": "`IntegrationDeliveryMembersEntity`.",
        "type": "object",
        "properties": {
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegrationDeliveryMember"
            }
          }
        },
        "required": [
          "members"
        ]
      },
      "IntegrationDeliveryMember": {
        "description": "`IntegrationDeliveryMemberEntity`.",
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "canRelease": {
            "type": "boolean"
          },
          "receivesMail": {
            "type": "boolean"
          },
          "grantedById": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "accountId",
          "canRelease",
          "receivesMail",
          "grantedById",
          "createdAt"
        ]
      },
      "ReplaceIntegrationDeliveryMembersDto": {
        "description": "`ReplaceIntegrationDeliveryMembersDto`: the whole set.",
        "type": "object",
        "properties": {
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemberInput"
            }
          }
        },
        "required": [
          "members"
        ]
      },
      "MemberInput": {
        "description": "One member in the replacement body.",
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "canRelease": {
            "type": "boolean"
          },
          "receivesMail": {
            "type": "boolean"
          }
        },
        "required": [
          "accountId",
          "canRelease",
          "receivesMail"
        ]
      },
      "CreateReportDeliveryBatchDto": {
        "description": "`CreateReportDeliveryBatchDto`: the deliveries ticked, or `all: true`.",
        "type": "object",
        "properties": {
          "deliveryIds": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "all": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "ReportDeliveryBatchRelease": {
        "description": "`ReportDeliveryBatchReleaseEntity`.",
        "type": "object",
        "properties": {
          "batch": {
            "$ref": "#/components/schemas/ReportDeliveryBatchListItem"
          },
          "claimed": {
            "type": "integer",
            "format": "uint32",
            "minimum": 0
          },
          "skipped": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkippedDelivery"
            }
          },
          "remaining": {
            "type": [
              "integer",
              "null"
            ],
            "format": "uint32",
            "minimum": 0
          }
        },
        "required": [
          "batch",
          "claimed",
          "skipped",
          "remaining"
        ]
      },
      "ReportDeliveryBatchListItem": {
        "description": "A delivery batch as an integration's batch list shows it (SPINE 26.1): its row, the\n status and counts derived from its deliveries on every read. The release and the abort\n answer it too.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "integrationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "providerId": {
            "type": "string"
          },
          "number": {
            "type": "integer",
            "format": "int32"
          },
          "trigger": {
            "$ref": "#/components/schemas/BatchTrigger"
          },
          "scheduledFor": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdById": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "itemCount": {
            "type": "integer",
            "format": "int32"
          },
          "totalAmount": {
            "description": "The sum of the reports' amounts, minor units of `baseCurrency`.",
            "type": "integer",
            "format": "int64"
          },
          "baseCurrency": {
            "type": [
              "string",
              "null"
            ]
          },
          "abortedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/BatchStatus"
          },
          "counts": {
            "$ref": "#/components/schemas/ReportDeliveryBatchCounts"
          }
        },
        "required": [
          "id",
          "organizationId",
          "integrationId",
          "providerId",
          "number",
          "trigger",
          "scheduledFor",
          "createdById",
          "createdAt",
          "itemCount",
          "totalAmount",
          "baseCurrency",
          "abortedAt",
          "status",
          "counts"
        ]
      },
      "BatchTrigger": {
        "description": "`ReportDeliveryBatchTrigger`.",
        "type": "string",
        "enum": [
          "MANUAL",
          "SCHEDULED"
        ],
        "x-enum-open": true
      },
      "BatchStatus": {
        "description": "`BatchStatus` (`statusOfCounts`).",
        "type": "string",
        "enum": [
          "DISPATCHING",
          "SENT",
          "PARTIALLY_FAILED",
          "FAILED",
          "UNKNOWN"
        ],
        "x-enum-open": true
      },
      "ReportDeliveryBatchCounts": {
        "description": "`ReportDeliveryBatchCountsEntity`.",
        "type": "object",
        "properties": {
          "waiting": {
            "type": "integer",
            "format": "uint32",
            "minimum": 0
          },
          "inFlight": {
            "type": "integer",
            "format": "uint32",
            "minimum": 0
          },
          "settled": {
            "type": "integer",
            "format": "uint32",
            "minimum": 0
          },
          "failed": {
            "type": "integer",
            "format": "uint32",
            "minimum": 0
          },
          "unknown": {
            "type": "integer",
            "format": "uint32",
            "minimum": 0
          }
        },
        "required": [
          "waiting",
          "inFlight",
          "settled",
          "failed",
          "unknown"
        ]
      },
      "SkippedDelivery": {
        "description": "`SkippedDeliveryEntity`.",
        "type": "object",
        "properties": {
          "deliveryId": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "deliveryId",
          "reason"
        ]
      },
      "ListPage_ReportDeliveryBatchListItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportDeliveryBatchListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "ReportDeliveryBatchDetail": {
        "description": "A delivery batch at detail level: the list row and its items.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "integrationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "providerId": {
            "type": "string"
          },
          "number": {
            "type": "integer",
            "format": "int32"
          },
          "trigger": {
            "$ref": "#/components/schemas/BatchTrigger"
          },
          "scheduledFor": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdById": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "itemCount": {
            "type": "integer",
            "format": "int32"
          },
          "totalAmount": {
            "description": "The sum of the reports' amounts, minor units of `baseCurrency`.",
            "type": "integer",
            "format": "int64"
          },
          "baseCurrency": {
            "type": [
              "string",
              "null"
            ]
          },
          "abortedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/BatchStatus"
          },
          "counts": {
            "$ref": "#/components/schemas/ReportDeliveryBatchCounts"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportDeliveryBatchItem"
            }
          }
        },
        "required": [
          "id",
          "organizationId",
          "integrationId",
          "providerId",
          "number",
          "trigger",
          "scheduledFor",
          "createdById",
          "createdAt",
          "itemCount",
          "totalAmount",
          "baseCurrency",
          "abortedAt",
          "status",
          "counts",
          "items"
        ]
      },
      "ReportDeliveryBatchItem": {
        "description": "A delivery under a batch's claim (an owned child of the batch).",
        "type": "object",
        "properties": {
          "deliveryId": {
            "type": "string",
            "format": "uuid"
          },
          "reportId": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/DeliveryState"
          },
          "status": {
            "$ref": "#/components/schemas/ItemStatusWire"
          },
          "latestAttempt": {
            "description": "The latest attempt of a batch item.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "outcome": {
                "description": "How an attempt closed (`ReportDeliveryAttemptOutcome`).",
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "LANDED",
                  "LANDED_NEEDS_ATTENTION",
                  "NOTHING_LANDED",
                  "WRITE_UNKNOWN",
                  "PENDING",
                  "BLOCKED",
                  "SKIPPED",
                  null
                ],
                "x-enum-open": true
              },
              "errorCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "closedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "required": [
              "outcome",
              "errorCode",
              "closedAt"
            ]
          },
          "resendable": {
            "type": "boolean"
          }
        },
        "required": [
          "deliveryId",
          "reportId",
          "state",
          "status",
          "latestAttempt",
          "resendable"
        ]
      },
      "ItemStatusWire": {
        "description": "`BatchItemStatus`.",
        "type": "string",
        "enum": [
          "WAITING",
          "IN_FLIGHT",
          "SETTLED",
          "FAILED",
          "UNKNOWN"
        ],
        "x-enum-open": true
      },
      "ResendBatchDeliveryDto": {
        "description": "One explicit resend, under the batch sender's authority rather than report management.",
        "type": "object",
        "properties": {
          "deliveryId": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": "string"
          },
          "acknowledgeDuplicateRisk": {
            "description": "Required whenever the latest ledger state says the delivery may already have landed.",
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "required": [
          "deliveryId",
          "reason"
        ]
      },
      "ReportDeliveryRedriveResult": {
        "description": "`ReportDeliveryRedriveResultEntity`.",
        "type": "object",
        "properties": {
          "attemptId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "attemptId"
        ]
      },
      "ResendFailed": {
        "description": "The request's empty body.",
        "type": "object"
      },
      "ResendFailedResult": {
        "description": "`ResendFailedResultEntity`.",
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResendFailedItem"
            }
          }
        },
        "required": [
          "results"
        ]
      },
      "ResendFailedItem": {
        "description": "`ResendFailedItemEntity`.",
        "type": "object",
        "properties": {
          "deliveryId": {
            "type": "string",
            "format": "uuid"
          },
          "result": {
            "$ref": "#/components/schemas/ReportDeliveryResendResult"
          },
          "refusal": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "deliveryId",
          "result"
        ]
      },
      "ReportDeliveryResendResult": {
        "description": "`ReportDeliveryResendResult`.",
        "type": "string",
        "enum": [
          "QUEUED",
          "NOT_RESENDABLE"
        ],
        "x-enum-open": true
      },
      "ListPage_HeldDelivery": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HeldDelivery"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "HeldDelivery": {
        "description": "A delivery held for an integration's next batch, as the held queue lists it (a list-only\n collection: `GET /integrations/{integrationId}/held-deliveries`).",
        "type": "object",
        "properties": {
          "deliveryId": {
            "type": "string",
            "format": "uuid"
          },
          "reportId": {
            "type": "string"
          },
          "readiness": {
            "$ref": "#/components/schemas/HeldDeliveryReadiness"
          },
          "notReadyReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deferredAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "deferredById": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "approvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "approvedById": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "report": {
            "description": "The report a held delivery belongs to, as the release screen shows it.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "title": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string"
              },
              "accountId": {
                "type": "string",
                "format": "uuid"
              },
              "amount": {
                "description": "Minor units (a JSON number).",
                "type": "integer",
                "format": "int64"
              },
              "baseCurrency": {
                "type": "string"
              },
              "submittedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "publishedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "title",
              "accountId",
              "amount",
              "baseCurrency",
              "submittedAt",
              "publishedAt"
            ]
          }
        },
        "required": [
          "deliveryId",
          "reportId",
          "readiness",
          "notReadyReason",
          "requestedAt",
          "deferredAt",
          "deferredById",
          "approvedAt",
          "approvedById",
          "report"
        ]
      },
      "HeldDeliveryReadiness": {
        "description": "`HeldDeliveryReadiness`: not ready wins over deferred.",
        "type": "string",
        "enum": [
          "READY",
          "NOT_READY",
          "DEFERRED"
        ],
        "x-enum-open": true
      },
      "ListPage_ReportDeliveryDetail": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportDeliveryDetail"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "ReportDeliveryDetail": {
        "description": "A report delivery at detail level (SPINE 26.1), and (not slimmed) a row of a report's\n delivery list: every delivery column but `target`, the provider, and the last\n [`TIMELINE_ATTEMPTS`] attempts with their resolutions. The resolve's answer.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "invoiceId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "channel": {
            "description": "`EMAIL`, `EHF` or `INTEGRATION`.",
            "type": "string"
          },
          "destinationKey": {
            "type": "string"
          },
          "integrationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "state": {
            "$ref": "#/components/schemas/DeliveryState"
          },
          "expectsConfirmation": {
            "type": "boolean"
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time"
          },
          "sentAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "confirmedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "errorCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "errorDescription": {
            "type": [
              "string",
              "null"
            ]
          },
          "attempts": {
            "type": "integer",
            "format": "int32"
          },
          "lastAttemptAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "provider": {
            "description": "The integration's provider.",
            "type": [
              "string",
              "null"
            ]
          },
          "timeline": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportDeliveryAttempt"
            }
          },
          "emailAddress": {
            "description": "EMAIL deliveries on the list read, platform staff only: the address it was sent to\n (`null` when its recorded target names none). Absent for anyone else and on any\n other channel; `target` itself is never published.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "invoiceId",
          "channel",
          "destinationKey",
          "integrationId",
          "state",
          "expectsConfirmation",
          "requestedAt",
          "sentAt",
          "confirmedAt",
          "errorCode",
          "errorDescription",
          "attempts",
          "lastAttemptAt",
          "provider",
          "timeline"
        ]
      },
      "ReportDeliveryAttempt": {
        "description": "`ReportDeliveryAttemptEntity`.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "integer",
            "format": "int32"
          },
          "trigger": {
            "$ref": "#/components/schemas/AttemptTrigger"
          },
          "actorId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "outcome": {
            "description": "How an attempt closed (`ReportDeliveryAttemptOutcome`).",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "LANDED",
              "LANDED_NEEDS_ATTENTION",
              "NOTHING_LANDED",
              "WRITE_UNKNOWN",
              "PENDING",
              "BLOCKED",
              "SKIPPED",
              null
            ],
            "x-enum-open": true
          },
          "errorCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "errorDetail": {
            "type": [
              "string",
              "null"
            ]
          },
          "openedAt": {
            "type": "string",
            "format": "date-time"
          },
          "leaseExpiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "closedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "resolvedOutcome": {
            "description": "How an attempt closed (`ReportDeliveryAttemptOutcome`).",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "LANDED",
              "LANDED_NEEDS_ATTENTION",
              "NOTHING_LANDED",
              "WRITE_UNKNOWN",
              "PENDING",
              "BLOCKED",
              "SKIPPED",
              null
            ],
            "x-enum-open": true
          },
          "resolvedById": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "resolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "resolutionReason": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "number",
          "trigger",
          "actorId",
          "reason",
          "outcome",
          "errorCode",
          "errorDetail",
          "openedAt",
          "leaseExpiresAt",
          "closedAt",
          "resolvedOutcome",
          "resolvedById",
          "resolvedAt",
          "resolutionReason"
        ]
      },
      "ReportPayee": {
        "description": "A report's payee as the integration delivering the report reads it\n (`GET /reports/{reportId}/payee`): who is paid and where to, the owner's names, bank\n account, phone and postal address. Nothing else of the user (no e-mail, birthdate or\n settings): a purpose read model (SPINE 26.1 rule 1), built only by identity.",
        "type": "object",
        "properties": {
          "accountId": {
            "description": "The report's account (the membership the report belongs to).",
            "type": "string",
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "givenName": {
            "type": [
              "string",
              "null"
            ]
          },
          "familyName": {
            "type": [
              "string",
              "null"
            ]
          },
          "fullName": {
            "type": [
              "string",
              "null"
            ]
          },
          "accountNumber": {
            "description": "The bank account the expenses are paid out to.",
            "type": [
              "string",
              "null"
            ]
          },
          "phoneNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "streetAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "postalCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "accountId",
          "userId",
          "givenName",
          "familyName",
          "fullName",
          "accountNumber",
          "phoneNumber",
          "streetAddress",
          "postalCode",
          "region"
        ]
      },
      "FeedMemberRef": {
        "description": "A member as the feed resolves them.",
        "type": "object",
        "properties": {
          "accountId": {
            "description": "The member's account (the path's `{accountId}`).",
            "type": "string",
            "format": "uuid"
          },
          "linked": {
            "description": "Whether a card registered through this integration links them (deliveries need\n it).",
            "type": "boolean"
          }
        },
        "required": [
          "accountId",
          "linked"
        ]
      },
      "RegisterFeedCardDto": {
        "description": "The body of `PUT …/cards/{cardRef}`.",
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "maxLength": 255
          },
          "last4": {
            "description": "The card number's last four digits.",
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "brand": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "cardType": {
            "description": "`PaymentCardType`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "DEBIT",
              "CREDIT",
              null
            ]
          }
        },
        "required": [
          "last4",
          "brand",
          "description"
        ]
      },
      "FeedCard": {
        "description": "A card the feed registered.",
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "paymentCardId": {
            "type": "string",
            "format": "uuid"
          },
          "cardRef": {
            "type": "string"
          },
          "last4": {
            "type": "string"
          },
          "brand": {
            "type": "string"
          },
          "cardType": {
            "description": "`PaymentCardType`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "DEBIT",
              "CREDIT",
              null
            ],
            "x-enum-open": true
          }
        },
        "required": [
          "paymentCardId",
          "cardRef",
          "last4",
          "brand",
          "cardType",
          "description"
        ]
      },
      "DeliverFeedItemDto": {
        "description": "The body of `POST …/items`.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "externalId": {
            "description": "The provider's id for the transaction (the item's `reservationId`): a delivery\n with an id already delivered to the member answers that item and changes nothing.",
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "from": {
            "description": "Who the item is from (`Airplus`).",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "amount": {
            "description": "Minor units.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "currency": {
            "description": "ISO 4217.",
            "type": [
              "string",
              "null"
            ],
            "minLength": 3,
            "maxLength": 3
          },
          "date": {
            "description": "The transaction's date (ISO 8601; a date alone is UTC midnight).",
            "type": [
              "string",
              "null"
            ]
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "status": {
            "description": "`InboxItemStatus`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "RESERVED",
              "CLEARED",
              null
            ]
          }
        },
        "required": [
          "externalId"
        ]
      },
      "FeedItem": {
        "description": "An item as the feed that delivered it sees it: the fields it wrote, never the\n member's expense link.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "inboxId": {
            "type": "string",
            "format": "uuid"
          },
          "externalId": {
            "description": "The provider's id (the item's `reservationId`).",
            "type": "string"
          },
          "status": {
            "description": "`InboxItemStatus`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "RESERVED",
              "CLEARED",
              null
            ],
            "x-enum-open": true
          },
          "from": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "description": "Minor units.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ]
          },
          "hasReceipt": {
            "description": "Whether the item holds a receipt file.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "inboxId",
          "externalId",
          "status",
          "from",
          "amount",
          "currency",
          "date",
          "merchant",
          "description",
          "hasReceipt"
        ]
      },
      "FeedItemFieldsDto": {
        "description": "An item's fields as a feed writes them (absent: left alone).",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "from": {
            "description": "Who the item is from (`Airplus`).",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "amount": {
            "description": "Minor units.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "currency": {
            "description": "ISO 4217.",
            "type": [
              "string",
              "null"
            ],
            "minLength": 3,
            "maxLength": 3
          },
          "date": {
            "description": "The transaction's date (ISO 8601; a date alone is UTC midnight).",
            "type": [
              "string",
              "null"
            ]
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "status": {
            "description": "`InboxItemStatus`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "RESERVED",
              "CLEARED",
              null
            ]
          }
        }
      },
      "RedriveDeliveryDto": {
        "description": "`RedriveDeliveryDto`.",
        "type": "object",
        "properties": {
          "reason": {
            "description": "Why the delivery is sent again: recorded on the attempt and its audit fact.",
            "type": "string"
          },
          "acknowledgeDuplicateRisk": {
            "description": "Required to RE-EXPORT (the delivery already landed) to a provider that does not\n reconcile before posting.",
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "required": [
          "reason"
        ]
      },
      "DeferDelivery": {
        "description": "The defer / undefer body (none).",
        "type": "object"
      },
      "HeldDeferral": {
        "description": "`HeldDeferralEntity`.",
        "type": "object",
        "properties": {
          "deliveryId": {
            "type": "string",
            "format": "uuid"
          },
          "deferredAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "deferredById": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        },
        "required": [
          "deliveryId",
          "deferredAt",
          "deferredById"
        ]
      },
      "UndeferDelivery": {
        "description": "The defer / undefer body (none).",
        "type": "object"
      },
      "SearchHitType": {
        "description": "Every hit type's wire name: a hit's and a group's `type`, and the `type` parameter.",
        "type": "string",
        "enum": [
          "report",
          "expense",
          "drive",
          "perDiem",
          "project",
          "category",
          "department",
          "member",
          "organization",
          "wallet",
          "product",
          "user"
        ],
        "x-enum-descriptions": [
          "",
          "",
          "",
          "",
          "",
          "",
          "",
          "",
          "",
          "A Prodkasse.",
          "Platform operators only.",
          "A user with no membership. Platform operators only."
        ],
        "x-enum-open": true
      },
      "SearchResponse": {
        "description": "`GET /search`'s answer: quick mode's groups, or full mode's page.",
        "anyOf": [
          {
            "$ref": "#/components/schemas/SearchGroups"
          },
          {
            "$ref": "#/components/schemas/SearchPage"
          }
        ]
      },
      "SearchGroups": {
        "description": "Quick mode: one group per type.",
        "type": "object",
        "properties": {
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchGroup"
            }
          },
          "stale": {
            "description": "A `consistentAfter` wait ran out before the write's index work landed.",
            "type": "boolean"
          }
        },
        "required": [
          "groups",
          "stale"
        ]
      },
      "SearchGroup": {
        "description": "Quick mode's group of one type.",
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/SearchHitType"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchHit"
            }
          },
          "total": {
            "description": "The engine's estimate of the type's matches, less every hit a check dropped.",
            "type": "integer",
            "format": "uint64",
            "minimum": 0
          }
        },
        "required": [
          "type",
          "items",
          "total"
        ]
      },
      "SearchHit": {
        "description": "A hit (`type` says which summary it carries). A member hit is the member's account in\n the hit's organization (its `user` the person).",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "report"
                ],
                "x-enum-open": true
              }
            },
            "$ref": "#/components/schemas/ReportHit",
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "expense"
                ],
                "x-enum-open": true
              }
            },
            "$ref": "#/components/schemas/HitOf_for_ExpenseSummary",
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "drive"
                ],
                "x-enum-open": true
              }
            },
            "$ref": "#/components/schemas/HitOf_for_DriveSummary",
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "perDiem"
                ],
                "x-enum-open": true
              }
            },
            "$ref": "#/components/schemas/HitOf_for_PerDiemSummary",
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "project"
                ],
                "x-enum-open": true
              }
            },
            "$ref": "#/components/schemas/HitOf_for_ProjectSummary",
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "category"
                ],
                "x-enum-open": true
              }
            },
            "$ref": "#/components/schemas/HitOf_for_CategorySummary",
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "department"
                ],
                "x-enum-open": true
              }
            },
            "$ref": "#/components/schemas/HitOf_for_DepartmentSummary",
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "member"
                ],
                "x-enum-open": true
              }
            },
            "$ref": "#/components/schemas/HitOf_for_AccountSummary",
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "organization"
                ],
                "x-enum-open": true
              }
            },
            "$ref": "#/components/schemas/HitOf_for_OrganizationSummary",
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "wallet"
                ],
                "x-enum-open": true
              }
            },
            "$ref": "#/components/schemas/WalletHit",
            "required": [
              "type"
            ]
          },
          {
            "description": "A product (platform operators only).",
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "product"
                ],
                "x-enum-open": true
              }
            },
            "$ref": "#/components/schemas/GlobalHit_for_ProductSummary",
            "required": [
              "type"
            ]
          },
          {
            "description": "A user with no membership (platform operators only; a member is a `member` hit).",
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "user"
                ],
                "x-enum-open": true
              }
            },
            "$ref": "#/components/schemas/GlobalHit_for_UserSummary",
            "required": [
              "type"
            ]
          }
        ]
      },
      "SearchHighlight": {
        "description": "One highlighted field value.",
        "type": "object",
        "properties": {
          "field": {
            "description": "The index attribute (`title`, `lineTexts`, …).",
            "type": "string"
          },
          "text": {
            "description": "The value, cropped around the match when the field is long.",
            "type": "string"
          },
          "matches": {
            "description": "`[start, end)` byte ranges of the matches in `text`.",
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "uint",
                "minimum": 0
              },
              "minItems": 2,
              "maxItems": 2
            }
          }
        },
        "required": [
          "field",
          "text",
          "matches"
        ]
      },
      "ReportHit": {
        "description": "A report hit: the report's summary and the owners' summaries a report row names (its\n submitter's account, its department and project), so a page of hits renders as the\n report list does. Loaded as the summary is (one statement per kind per page).",
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "summary": {
            "$ref": "#/components/schemas/ReportSummary"
          },
          "highlights": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchHighlight"
            }
          },
          "account": {
            "description": "The owner account (removed ones included, as the report list embeds it).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "userId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "role": {
                "description": "The account role (Nest's integer `AccountRole`).",
                "type": "integer",
                "format": "int32"
              },
              "employeeNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "isBlocked": {
                "type": "boolean"
              },
              "deletedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "managerAccountIds": {
                "description": "The accounts this one reports to (`managerAccounts`), by id.",
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "user": {
                "description": "A summary-level user (SPINE 26.1: depth 0; a user as other people see it): the names,\n the e-mail and the avatar, never the phone or the address (a membership's detail adds\n them for those who may read it: identity's `AccountDetailUser`). Built only by\n [`user_summary`] (its loaders [`user_summaries_on`], [`account_summaries_on`]).",
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "givenName": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "familyName": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "fullName": {
                    "description": "`users.fullName` (null when either name part is).",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "profilePictureUrl": {
                    "description": "The profile picture: a signed read URL valid 10 to 15 minutes\n ([`crate::avatars`]); `null` without a picture (and in event payloads).",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "givenName",
                  "familyName",
                  "fullName",
                  "email",
                  "profilePictureUrl"
                ]
              },
              "baseCurrency": {
                "description": "The currency the member is reimbursed in (ISO 4217); `null`: the org's. The apps\n resolve an amount's currency from it (docs/COMPAT-APP-FIELDS.md).",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "organizationId",
              "userId",
              "role",
              "employeeNumber",
              "isBlocked",
              "deletedAt",
              "managerAccountIds",
              "user",
              "baseCurrency"
            ]
          },
          "department": {
            "description": "The department (a removed one still named, as the report list embeds it).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "title": {
                "type": "string"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "accountingCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "isPublic": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "organizationId",
              "title",
              "accountingCode",
              "isPublic"
            ]
          },
          "project": {
            "description": "The live project.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "title": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "accountingCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "deletedAt": {
                "description": "Set when the project was deleted after something was booked on it: an embed keeps\n pointing at it (a line, a report), so the client can mark it (SPINE 26.1).",
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "organizationId",
              "title",
              "description",
              "accountingCode",
              "deletedAt"
            ]
          }
        },
        "required": [
          "organizationId",
          "summary",
          "highlights",
          "account",
          "department",
          "project"
        ]
      },
      "HitOf_for_ExpenseSummary": {
        "description": "One hit of a type: its org, its summary (loaded from the database, never the index),\n and the matches.",
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "summary": {
            "$ref": "#/components/schemas/ExpenseSummary"
          },
          "highlights": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchHighlight"
            }
          }
        },
        "required": [
          "organizationId",
          "summary",
          "highlights"
        ]
      },
      "DriveSummary": {
        "description": "A drive at summary level (SPINE 26.1: depth 0, pure over the row): its own scalars and\n amounts, in minor units of `currency` (the report's base currency). The one summary of\n the drive: a write's answer (beside the report's summary: travel's `DriveWritten`) and every\n embed (search's hits). Stops, embeds, rates and tax lines are the detail's.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "version": {
            "description": "SPINE 26.10 item 3: the drive's version; send it back as `If-Match`.",
            "type": "integer",
            "format": "int64"
          },
          "reportId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "distanceMeters": {
            "type": "integer",
            "format": "int32"
          },
          "distanceSource": {
            "description": "Where a drive's distance came from (`DistanceSource`).",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "ROUTE",
              "MANUAL",
              null
            ],
            "x-enum-open": true
          },
          "returnTrip": {
            "type": "boolean"
          },
          "vehicle": {
            "type": [
              "string",
              "null"
            ]
          },
          "shouldCalculateToll": {
            "type": "boolean"
          },
          "passengerNumber": {
            "type": "integer",
            "format": "int32"
          },
          "passengerNames": {
            "type": [
              "string",
              "null"
            ]
          },
          "isOffroad": {
            "type": "boolean"
          },
          "hasTrailer": {
            "type": "boolean"
          },
          "currency": {
            "type": "string"
          },
          "amount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "mileageAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "tollAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "passengerAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "trailerAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "offroadAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "mileageExemptAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "passengerExemptAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "trailerExemptAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "offroadExemptAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "exemptAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "taxableAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "departmentId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "taxCategoryId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "taxFreeCategoryId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "version",
          "reportId",
          "organizationId",
          "date",
          "description",
          "distanceMeters",
          "distanceSource",
          "returnTrip",
          "vehicle",
          "shouldCalculateToll",
          "passengerNumber",
          "passengerNames",
          "isOffroad",
          "hasTrailer",
          "currency",
          "amount",
          "mileageAmount",
          "tollAmount",
          "passengerAmount",
          "trailerAmount",
          "offroadAmount",
          "mileageExemptAmount",
          "passengerExemptAmount",
          "trailerExemptAmount",
          "offroadExemptAmount",
          "exemptAmount",
          "taxableAmount",
          "departmentId",
          "projectId",
          "taxCategoryId",
          "taxFreeCategoryId",
          "createdAt",
          "updatedAt"
        ]
      },
      "HitOf_for_DriveSummary": {
        "description": "One hit of a type: its org, its summary (loaded from the database, never the index),\n and the matches.",
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "summary": {
            "$ref": "#/components/schemas/DriveSummary"
          },
          "highlights": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchHighlight"
            }
          }
        },
        "required": [
          "organizationId",
          "summary",
          "highlights"
        ]
      },
      "PerDiemSummary": {
        "description": "A per-diem day at summary level (SPINE 26.1: depth 0, pure over the row): its own\n scalars, its meal facts and its amounts in minor units of `currency`. The one summary\n of the per diem: a write's answer (beside the report's summary: travel's `PerDiemWritten`) and\n every embed (search's hits). The breakdown, the exempt criteria and the embeds are the\n detail's.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "description": "SPINE 26.10 item 3: the per diem's version; send it back as `If-Match`.",
            "type": "integer",
            "format": "int64"
          },
          "reportId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "isHalfDay": {
            "type": "boolean"
          },
          "dognIndex": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "periodStart": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "periodEnd": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "isFullDogn": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "stayBreakfast": {
            "type": "boolean"
          },
          "mealSelections": {
            "description": "The settled meal facts, by date; null on a row that keeps its meals in the three\n flags only.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/MealSelection"
            }
          },
          "status": {
            "$ref": "#/components/schemas/PerDiemStatus"
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "countrySource": {
            "description": "Where a per diem's country came from (`PerDiemCountrySource`).",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "STAY",
              "DESTINATION_PROXY",
              "DAY_TRIP",
              null
            ],
            "x-enum-open": true
          },
          "breakfast": {
            "type": "boolean"
          },
          "lunch": {
            "type": "boolean"
          },
          "dinner": {
            "type": "boolean"
          },
          "currency": {
            "type": "string"
          },
          "fullFareAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "fullFareExemptAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "taxAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "exemptAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "amount": {
            "description": "`None` while the day is not priced.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "compensationAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "nightSupplementAmount": {
            "description": "Nattillegg folded into `amount`, its trekkfri slice and its nights (Nest #1434).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "nightSupplementExemptAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "nightSupplementNights": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "fareAmount": {
            "description": "The kost part of `amount` (less every folded supplement); null without an amount.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "taxableAmount": {
            "description": "Minor units of the currency (øre for NOK).",
            "type": "integer",
            "format": "int64"
          },
          "taxCategoryId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "taxFreeCategoryId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "rateId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "travelAccommodationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "version",
          "reportId",
          "organizationId",
          "date",
          "isHalfDay",
          "dognIndex",
          "periodStart",
          "periodEnd",
          "isFullDogn",
          "stayBreakfast",
          "mealSelections",
          "status",
          "country",
          "countrySource",
          "breakfast",
          "lunch",
          "dinner",
          "currency",
          "fullFareAmount",
          "fullFareExemptAmount",
          "taxAmount",
          "exemptAmount",
          "amount",
          "compensationAmount",
          "nightSupplementAmount",
          "nightSupplementExemptAmount",
          "nightSupplementNights",
          "fareAmount",
          "taxableAmount",
          "taxCategoryId",
          "taxFreeCategoryId",
          "rateId",
          "travelAccommodationId",
          "createdAt",
          "updatedAt"
        ]
      },
      "HitOf_for_PerDiemSummary": {
        "description": "One hit of a type: its org, its summary (loaded from the database, never the index),\n and the matches.",
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "summary": {
            "$ref": "#/components/schemas/PerDiemSummary"
          },
          "highlights": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchHighlight"
            }
          }
        },
        "required": [
          "organizationId",
          "summary",
          "highlights"
        ]
      },
      "HitOf_for_ProjectSummary": {
        "description": "One hit of a type: its org, its summary (loaded from the database, never the index),\n and the matches.",
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "summary": {
            "$ref": "#/components/schemas/ProjectSummary"
          },
          "highlights": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchHighlight"
            }
          }
        },
        "required": [
          "organizationId",
          "summary",
          "highlights"
        ]
      },
      "HitOf_for_CategorySummary": {
        "description": "One hit of a type: its org, its summary (loaded from the database, never the index),\n and the matches.",
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "summary": {
            "$ref": "#/components/schemas/CategorySummary"
          },
          "highlights": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchHighlight"
            }
          }
        },
        "required": [
          "organizationId",
          "summary",
          "highlights"
        ]
      },
      "HitOf_for_DepartmentSummary": {
        "description": "One hit of a type: its org, its summary (loaded from the database, never the index),\n and the matches.",
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "summary": {
            "$ref": "#/components/schemas/DepartmentSummary"
          },
          "highlights": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchHighlight"
            }
          }
        },
        "required": [
          "organizationId",
          "summary",
          "highlights"
        ]
      },
      "HitOf_for_AccountSummary": {
        "description": "One hit of a type: its org, its summary (loaded from the database, never the index),\n and the matches.",
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "summary": {
            "$ref": "#/components/schemas/AccountSummary"
          },
          "highlights": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchHighlight"
            }
          }
        },
        "required": [
          "organizationId",
          "summary",
          "highlights"
        ]
      },
      "HitOf_for_OrganizationSummary": {
        "description": "One hit of a type: its org, its summary (loaded from the database, never the index),\n and the matches.",
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "summary": {
            "$ref": "#/components/schemas/OrganizationSummary"
          },
          "highlights": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchHighlight"
            }
          }
        },
        "required": [
          "organizationId",
          "summary",
          "highlights"
        ]
      },
      "WalletHit": {
        "description": "A wallet hit (a Prodkasse): the wallet's summary and its holder's account (removed\n ones included, as `GET /wallets` embeds it), so \"Kari\" renders as Kari's kasse.",
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "summary": {
            "$ref": "#/components/schemas/WalletSummary"
          },
          "highlights": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchHighlight"
            }
          },
          "account": {
            "description": "The holder.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "userId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "role": {
                "description": "The account role (Nest's integer `AccountRole`).",
                "type": "integer",
                "format": "int32"
              },
              "employeeNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "isBlocked": {
                "type": "boolean"
              },
              "deletedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "managerAccountIds": {
                "description": "The accounts this one reports to (`managerAccounts`), by id.",
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "user": {
                "description": "A summary-level user (SPINE 26.1: depth 0; a user as other people see it): the names,\n the e-mail and the avatar, never the phone or the address (a membership's detail adds\n them for those who may read it: identity's `AccountDetailUser`). Built only by\n [`user_summary`] (its loaders [`user_summaries_on`], [`account_summaries_on`]).",
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "givenName": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "familyName": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "fullName": {
                    "description": "`users.fullName` (null when either name part is).",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "profilePictureUrl": {
                    "description": "The profile picture: a signed read URL valid 10 to 15 minutes\n ([`crate::avatars`]); `null` without a picture (and in event payloads).",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "givenName",
                  "familyName",
                  "fullName",
                  "email",
                  "profilePictureUrl"
                ]
              },
              "baseCurrency": {
                "description": "The currency the member is reimbursed in (ISO 4217); `null`: the org's. The apps\n resolve an amount's currency from it (docs/COMPAT-APP-FIELDS.md).",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "organizationId",
              "userId",
              "role",
              "employeeNumber",
              "isBlocked",
              "deletedAt",
              "managerAccountIds",
              "user",
              "baseCurrency"
            ]
          }
        },
        "required": [
          "organizationId",
          "summary",
          "highlights",
          "account"
        ]
      },
      "ProductSummary": {
        "description": "A product at summary level (SPINE 26.1: its own scalars): what a product write answers\n and what another resource embeds (a coupon's `appliesTo`, a product's dependencies, a\n search hit).",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "$ref": "#/components/schemas/ProductType"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "handle": {
            "type": [
              "string",
              "null"
            ]
          },
          "isDefault": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "handle",
          "description",
          "isDefault",
          "type",
          "createdAt",
          "updatedAt"
        ]
      },
      "ProductType": {
        "description": "`ProductType`.",
        "type": "string",
        "enum": [
          "PLAN",
          "ADD_ON",
          "INTEGRATION"
        ],
        "x-enum-open": true
      },
      "GlobalHit_for_ProductSummary": {
        "description": "A hit of an operator-only type: it belongs to no organization.",
        "type": "object",
        "properties": {
          "summary": {
            "$ref": "#/components/schemas/ProductSummary"
          },
          "highlights": {
            "description": "Always empty: these types are matched in the database, not the index.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchHighlight"
            }
          }
        },
        "required": [
          "summary",
          "highlights"
        ]
      },
      "GlobalHit_for_UserSummary": {
        "description": "A hit of an operator-only type: it belongs to no organization.",
        "type": "object",
        "properties": {
          "summary": {
            "$ref": "#/components/schemas/UserSummary"
          },
          "highlights": {
            "description": "Always empty: these types are matched in the database, not the index.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchHighlight"
            }
          }
        },
        "required": [
          "summary",
          "highlights"
        ]
      },
      "SearchPage": {
        "description": "Full mode: the list envelope (SPINE 26.3) with facets.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchHit"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "The engine's estimate of the matches, less every hit a check dropped.",
            "type": "integer",
            "format": "uint64",
            "minimum": 0
          },
          "facets": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/SearchFacetValue"
              }
            }
          },
          "stale": {
            "type": "boolean"
          }
        },
        "required": [
          "items",
          "hasMore",
          "total",
          "stale"
        ]
      },
      "SearchFacetValue": {
        "description": "One facet value.",
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "format": "uint64",
            "minimum": 0
          },
          "ref": {
            "description": "The referenced aggregate's summary, for an id facet whose value the caller can\n read.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/CategorySummary"
              },
              {
                "$ref": "#/components/schemas/DepartmentSummary"
              },
              {
                "$ref": "#/components/schemas/ProjectSummary"
              },
              {
                "$ref": "#/components/schemas/OrganizationSummary"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "value",
          "count"
        ]
      },
      "ListPage_Suggestion": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Suggestion"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "Suggestion": {
        "description": "One suggestion (Nest's `Suggestion` envelope, its text replaced by `evidence`).",
        "type": "object",
        "properties": {
          "target": {
            "$ref": "#/components/schemas/Target"
          },
          "value": {
            "$ref": "#/components/schemas/SuggestedReport"
          },
          "tier": {
            "description": "`deterministic` (T0).",
            "type": "string"
          },
          "confidence": {
            "description": "Tier-local confidence in [0, 1].",
            "type": "number",
            "format": "double"
          },
          "evidence": {
            "$ref": "#/components/schemas/TripEvidence"
          }
        },
        "required": [
          "target",
          "value",
          "tier",
          "confidence",
          "evidence"
        ]
      },
      "Target": {
        "description": "What a suggestion is about.",
        "type": "object",
        "properties": {
          "entity": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "field": {
            "type": "string"
          }
        },
        "required": [
          "entity",
          "id",
          "field"
        ]
      },
      "SuggestedReport": {
        "description": "The report a suggestion files the receipt onto.",
        "type": "object",
        "properties": {
          "title": {
            "description": "The report's own title (`null` when it has none).",
            "type": [
              "string",
              "null"
            ]
          },
          "reportId": {
            "type": "string"
          }
        },
        "required": [
          "reportId",
          "title"
        ]
      },
      "TripEvidence": {
        "description": "Why the trip holds the receipt: UTC calendar days (`YYYY-MM-DD`).",
        "type": "object",
        "properties": {
          "receiptDate": {
            "type": "string"
          },
          "tripFrom": {
            "type": "string"
          },
          "tripTo": {
            "type": "string"
          }
        },
        "required": [
          "receiptDate",
          "tripFrom",
          "tripTo"
        ]
      },
      "CaptureRequestDto": {
        "description": "`CaptureRequestDto` (Q14: no field is nullable; `null` is a 400).",
        "type": "object",
        "properties": {
          "ocr": {
            "type": "string"
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaptureRequestCategoryDto"
            }
          },
          "correlationId": {
            "type": "string"
          },
          "deviceTimeZone": {
            "description": "IANA timezone of the capturing device (e.g. `Europe/Oslo`); invalid or missing\n values fall back to the org default.",
            "type": "string"
          }
        },
        "required": [
          "ocr"
        ]
      },
      "CaptureRequestCategoryDto": {
        "description": "The categories as a request names them (`CaptureRequestCategoryDto`).",
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "context": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "title"
        ]
      },
      "ExpenseCaptureResponseDto": {
        "description": "What [`ExpenseScan`] documents.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "description": "Transaction date as a true UTC instant (timed receipts converted from the OCR\n wall clock in `dateTimeZone`; date-only receipts at UTC midnight).",
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dateTimeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "dateTimeZoneSource": {
            "type": [
              "string",
              "null"
            ]
          },
          "dateHasTime": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "amount": {
            "description": "Minor units of `currency` (NOK when absent; ISO 4217 exponent: NOK 2, JPY 0, KWD 3).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "amountIncludingVat": {
            "description": "Minor units of `currency` (NOK when absent; ISO 4217 exponent: NOK 2, JPY 0, KWD 3).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "amountExcludingVat": {
            "description": "Minor units of `currency` (NOK when absent; ISO 4217 exponent: NOK 2, JPY 0, KWD 3).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "vatAmount": {
            "description": "Minor units of `currency` (NOK when absent; ISO 4217 exponent: NOK 2, JPY 0, KWD 3).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "vatRate": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "captureRef": {
            "description": "Opaque single-use handle for the instant-scan handoff (24 h, authenticated scans).",
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "invoiceDetected": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "AccommodationCaptureResponseDto": {
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "documentAmountIncludingVat": {
            "description": "Minor units of `currency` (NOK when absent; ISO 4217 exponent: NOK 2, JPY 0, KWD 3).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "accommodationReview": {
            "description": "`AccommodationReview`.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "version": {
                "type": "integer",
                "format": "uint8",
                "minimum": 0,
                "maximum": 255
              },
              "documentIssuer": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "kind": {
                "type": "string"
              },
              "currency": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "documentTotalMinor": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              },
              "accommodationTotalMinor": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              },
              "breakfastTotalMinor": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              },
              "excludedTotalMinor": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              }
            },
            "required": [
              "version",
              "documentIssuer",
              "kind",
              "currency",
              "documentTotalMinor",
              "accommodationTotalMinor",
              "breakfastTotalMinor",
              "excludedTotalMinor"
            ]
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ]
          },
          "issuer": {
            "description": "The party that issued the document when it is not the hotel.",
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "checkInAt": {
            "description": "Explicit hotel check-in date; null when not stated.",
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "checkOutAt": {
            "description": "Explicit hotel check-out date, not the last billed night.",
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "transactionDate": {
            "description": "Invoice issue or receipt transaction date, separate from the stay.",
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "amountIncludingVat": {
            "description": "Minor units of `currency` (NOK when absent; ISO 4217 exponent: NOK 2, JPY 0, KWD 3).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "amountExcludingVat": {
            "description": "Minor units of `currency` (NOK when absent; ISO 4217 exponent: NOK 2, JPY 0, KWD 3).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "vatAmount": {
            "description": "Minor units of `currency` (NOK when absent; ISO 4217 exponent: NOK 2, JPY 0, KWD 3).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "vatRate": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "breakfastAmount": {
            "description": "Minor units of `currency` (NOK when absent; ISO 4217 exponent: NOK 2, JPY 0, KWD 3).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "accommodationType": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoiceDetected": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "CaptureOcrRequestDto": {
        "description": "`CaptureOcrRequestDto` (Q13): an HTTPS URL into an S3 bucket.",
        "type": "object",
        "properties": {
          "resourceUrl": {
            "type": "string",
            "minLength": 1
          },
          "resourceType": {
            "$ref": "#/components/schemas/CaptureResourceType"
          }
        },
        "required": [
          "resourceUrl",
          "resourceType"
        ]
      },
      "CaptureResourceType": {
        "description": "`CaptureResourceType`.",
        "type": "string",
        "enum": [
          "image",
          "pdf"
        ]
      },
      "ExpenseCaptureRequestDto": {
        "description": "`ExpenseCaptureRequestDto` (`POST /capture/expense`).",
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "expenseId": {
            "description": "The expense this scan is for. Client-minted; the row may not exist yet. The\n returned captureRef adopts onto this expense and no other.",
            "type": "string",
            "format": "uuid"
          },
          "ocr": {
            "type": "string"
          },
          "deviceTimeZone": {
            "description": "IANA timezone of the capturing device (e.g. Europe/Oslo).",
            "type": "string"
          }
        },
        "required": [
          "organizationId",
          "expenseId",
          "ocr"
        ]
      },
      "CreateInboxDto": {
        "description": "`CreateInboxDto`.",
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "organizationId": {
            "description": "Create an org-locked inbox for this organization.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "userId"
        ]
      },
      "InboxSummary": {
        "description": "An inbox's summary: what a create or an address change answers (SPINE 26.1 rule 10).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "userId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "organizationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "deactivatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "email",
          "userId",
          "organizationId",
          "deactivatedAt"
        ]
      },
      "InboxDetail": {
        "description": "An inbox (`GET /inbox/{id}`, `GET /inbox`; its own scalars).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deactivatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "userId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "organizationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "orgKey": {
            "description": "`COALESCE(organizationId, 'personal')` (a generated column).",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "email",
          "createdAt",
          "updatedAt",
          "deactivatedAt",
          "userId",
          "organizationId",
          "orgKey"
        ]
      },
      "InboxAvailableResponse": {
        "description": "`InboxAvailableResponse`.",
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean"
          }
        },
        "required": [
          "available"
        ]
      },
      "MyInboxesResponse": {
        "description": "`GET /inbox/mine` (a purpose read model): the caller's inboxes and whether it may\n create a personal one.",
        "type": "object",
        "properties": {
          "inboxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InboxDetail"
            }
          },
          "canCreatePersonalInbox": {
            "type": "boolean"
          }
        },
        "required": [
          "inboxes",
          "canCreatePersonalInbox"
        ]
      },
      "UpdateInboxDto": {
        "description": "`UpdateInboxDto`.",
        "type": "object",
        "properties": {
          "email": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ListPage_InboxItemListItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InboxItemListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "InboxItemListItem": {
        "description": "An item in `GET /inbox/{inboxId}/items`: its own scalars and its attachments.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "from": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ]
          },
          "reservationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "`InboxItemStatus`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "RESERVED",
              "CLEARED",
              null
            ],
            "x-enum-open": true
          },
          "source": {
            "$ref": "#/components/schemas/InboxItemSource"
          },
          "organizationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "expenseId": {
            "type": [
              "string",
              "null"
            ]
          },
          "inboxId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InboxItemAttachment"
            }
          }
        },
        "required": [
          "id",
          "createdAt",
          "updatedAt",
          "from",
          "amount",
          "currency",
          "date",
          "merchant",
          "description",
          "reservationId",
          "status",
          "source",
          "organizationId",
          "expenseId",
          "inboxId",
          "attachments"
        ]
      },
      "InboxItemAttachment": {
        "description": "`InboxItemAttachment`; `url` (a signed read link) only where Nest signs one (the item\n list).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "storageKey": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "inboxItemId": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "storageKey",
          "createdAt",
          "updatedAt",
          "inboxItemId"
        ]
      },
      "AddInboxItemDto": {
        "description": "`AddInboxItemDto` (the body of `POST /inbox/:id/items`; `PATCH` takes the same\n fields).",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "from": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "description": "Minor units.",
            "type": [
              "integer",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "description": "An ISO 8601 date-time (or epoch milliseconds).",
            "type": [
              "string",
              "number",
              "null"
            ]
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ]
          },
          "reservationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "`InboxItemStatus`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "RESERVED",
              "CLEARED",
              null
            ]
          },
          "organizationId": {
            "description": "Organization to tag the item with; null clears the tag. Ignored on\n organization-locked inboxes (the item is always stamped with the inbox\n organization); on personal inboxes it must be an organization the inbox owner is a\n member of.",
            "type": [
              "string",
              "null"
            ]
          },
          "expenseId": {
            "description": "Expense to link the item to; must belong to the inbox owner. The literal string\n 'NULL' (or null) unlinks.",
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateInboxItemDto": {
        "description": "`AddInboxItemDto` (the body of `POST /inbox/:id/items`; `PATCH` takes the same\n fields).",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "from": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "description": "Minor units.",
            "type": [
              "integer",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "description": "An ISO 8601 date-time (or epoch milliseconds).",
            "type": [
              "string",
              "number",
              "null"
            ]
          },
          "merchant": {
            "type": [
              "string",
              "null"
            ]
          },
          "reservationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "`InboxItemStatus`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "RESERVED",
              "CLEARED",
              null
            ]
          },
          "organizationId": {
            "description": "Organization to tag the item with; null clears the tag. Ignored on\n organization-locked inboxes (the item is always stamped with the inbox\n organization); on personal inboxes it must be an organization the inbox owner is a\n member of.",
            "type": [
              "string",
              "null"
            ]
          },
          "expenseId": {
            "description": "Expense to link the item to; must belong to the inbox owner. The literal string\n 'NULL' (or null) unlinks.",
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ConnectGmailDto": {
        "description": "`{ inboxId }` (strict: no other key).",
        "type": "object",
        "properties": {
          "inboxId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "inboxId"
        ]
      },
      "GmailConnectResponseDto": {
        "description": "`{ url }`.",
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          }
        },
        "required": [
          "url"
        ]
      },
      "GmailStatusResponseDto": {
        "description": "The inbox's connection (absent before the first one).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "inboxId": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "lastSyncedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lastErrorCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "nextPollAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "_count": {
            "$ref": "#/components/schemas/ImportCount"
          }
        },
        "required": [
          "id",
          "inboxId",
          "email",
          "status",
          "lastSyncedAt",
          "lastErrorCode",
          "nextPollAt",
          "_count"
        ]
      },
      "ImportCount": {
        "description": "`_count`.",
        "type": "object",
        "properties": {
          "imports": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "imports"
        ]
      },
      "ConnectOutlookDto": {
        "description": "`{ inboxId }` (strict: no other key).",
        "type": "object",
        "properties": {
          "inboxId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "inboxId"
        ]
      },
      "OutlookConnectResponseDto": {
        "description": "`{ url }`.",
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          }
        },
        "required": [
          "url"
        ]
      },
      "OutlookStatusResponseDto": {
        "description": "The inbox's connection (absent before the first one).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "inboxId": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "lastSyncedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lastErrorCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "nextPollAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "_count": {
            "$ref": "#/components/schemas/ImportCount"
          }
        },
        "required": [
          "id",
          "inboxId",
          "email",
          "status",
          "lastSyncedAt",
          "lastErrorCode",
          "nextPollAt",
          "_count"
        ]
      },
      "AffiliateLinkPublicResponse": {
        "description": "`AffiliateCodePreviewResponse` / `AffiliateLinkPublicResponse`.",
        "type": "object",
        "properties": {
          "affiliateLinkId": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": "string"
          },
          "percentOff": {
            "type": "integer",
            "format": "int32"
          },
          "duration": {
            "$ref": "#/components/schemas/CouponDuration"
          },
          "durationInMonths": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "sanitySubPageSlug": {
            "type": [
              "string",
              "null"
            ]
          },
          "active": {
            "type": "boolean"
          }
        },
        "required": [
          "affiliateLinkId",
          "slug",
          "code",
          "percentOff",
          "duration",
          "durationInMonths",
          "sanitySubPageSlug",
          "active"
        ]
      },
      "CouponDuration": {
        "description": "`CouponDuration`.",
        "type": "string",
        "enum": [
          "FOREVER",
          "ONCE",
          "REPEATING"
        ],
        "x-enum-open": true
      },
      "ValidateAffiliateCodeDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 3,
            "maxLength": 64
          }
        },
        "required": [
          "code"
        ]
      },
      "AffiliateCodePreviewResponse": {
        "description": "The code-validation answer: the preview without `slug` (Nest's\n `AffiliateCodePreviewResponse`, which `toPublic(link, false)` filled with `slug: null`).",
        "type": "object",
        "properties": {
          "affiliateLinkId": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": "string"
          },
          "percentOff": {
            "type": "integer",
            "format": "int32"
          },
          "duration": {
            "$ref": "#/components/schemas/CouponDuration"
          },
          "durationInMonths": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "sanitySubPageSlug": {
            "type": [
              "string",
              "null"
            ]
          },
          "active": {
            "type": "boolean"
          }
        },
        "required": [
          "affiliateLinkId",
          "slug",
          "code",
          "percentOff",
          "duration",
          "durationInMonths",
          "sanitySubPageSlug",
          "active"
        ]
      },
      "ListPage_EnterpriseProduct": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnterpriseProduct"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "EnterpriseProduct": {
        "description": "A product an enterprise offers its member organizations (`EnterpriseProduct`, an\n assignment: one plain shape, SPINE 26.1 rule 1), with the product as its list row\n (prices and features: the enterprise's product screen prices from it).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "enterpriseId": {
            "type": "string",
            "format": "uuid"
          },
          "productId": {
            "type": "string",
            "format": "uuid"
          },
          "activeFrom": {
            "type": "string",
            "format": "date-time"
          },
          "activeTo": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "memberPriceId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "product": {
            "description": "The product with its prices and features.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "$ref": "#/components/schemas/ProductType"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "handle": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "isDefault": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              },
              "prices": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Price"
                }
              },
              "features": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ProductFeature"
                }
              }
            },
            "required": [
              "id",
              "name",
              "handle",
              "description",
              "isDefault",
              "type",
              "createdAt",
              "updatedAt",
              "prices",
              "features"
            ]
          }
        },
        "required": [
          "id",
          "enterpriseId",
          "productId",
          "activeFrom",
          "activeTo",
          "memberPriceId",
          "createdAt",
          "updatedAt",
          "product"
        ]
      },
      "Price": {
        "description": "A product's price (an owned child of the product: one plain shape). `amount` is minor\n units (øre) of `currency`.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "$ref": "#/components/schemas/PriceType"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "type": "integer",
            "format": "int32"
          },
          "currency": {
            "description": "Billing is NOK-only.",
            "type": "string"
          },
          "isDefault": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "recurringInterval": {
            "$ref": "#/components/schemas/PriceInterval"
          },
          "isActive": {
            "type": "boolean"
          },
          "productId": {
            "type": "string",
            "format": "uuid"
          },
          "poProductId": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "amount",
          "currency",
          "isDefault",
          "recurringInterval",
          "type",
          "isActive",
          "productId",
          "poProductId",
          "createdAt",
          "updatedAt"
        ]
      },
      "PriceInterval": {
        "description": "`PriceInterval`.",
        "type": "string",
        "enum": [
          "MONTH",
          "QUARTER",
          "YEAR"
        ],
        "x-enum-open": true
      },
      "PriceType": {
        "description": "`PriceType`.",
        "type": "string",
        "enum": [
          "FIXED",
          "PER_ACCOUNT",
          "PER_EXPENSE",
          "PER_REPORT",
          "PER_INVOICE"
        ],
        "x-enum-open": true
      },
      "ProductFeature": {
        "description": "`product_features`.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "productId": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "productId",
          "createdAt",
          "updatedAt"
        ]
      },
      "RefreshDto": {
        "description": "The body (Nest's `RefreshDto`).",
        "type": "object",
        "properties": {
          "refreshToken": {
            "type": "string"
          },
          "device": {
            "description": "Best-effort device details; a payload that does not parse is ignored. Optional\n (Nest's `z.unknown().optional()`)."
          }
        },
        "required": [
          "refreshToken"
        ]
      },
      "TokensResponse": {
        "description": "The answer (Nest's `TokensDto`).",
        "type": "object",
        "properties": {
          "accessToken": {
            "type": "string"
          },
          "refreshToken": {
            "type": "string"
          }
        },
        "required": [
          "accessToken",
          "refreshToken"
        ]
      },
      "LogoutDto": {
        "description": "Nest's `LogoutDto`.",
        "type": "object",
        "properties": {
          "refreshToken": {
            "type": [
              "string",
              "null"
            ]
          },
          "pushToken": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ExchangeCodeDto": {
        "description": "Nest's `ExchangeCodeDto`.",
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "device": {
            "description": "Best-effort device details; a payload that does not parse is ignored."
          }
        },
        "required": [
          "code"
        ]
      },
      "ExchangeCodeResponse": {
        "description": "The exchange's answer (Nest's `ExchangeCode{Success,Unverified}ResponseDto`).",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "accessToken": {
                "type": "string"
              },
              "refreshToken": {
                "type": "string"
              },
              "organizationId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "success"
                ],
                "x-enum-open": true
              }
            },
            "required": [
              "status",
              "accessToken",
              "refreshToken"
            ]
          },
          {
            "type": "object",
            "properties": {
              "sessionToken": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "unverified"
                ],
                "x-enum-open": true
              }
            },
            "required": [
              "status",
              "sessionToken"
            ]
          }
        ]
      },
      "RequestPhoneVerificationDto": {
        "description": "`RequestPhoneVerificationDto`.",
        "type": "object",
        "properties": {
          "phoneNumber": {
            "type": "string"
          },
          "sessionToken": {
            "type": "string"
          }
        },
        "required": [
          "phoneNumber",
          "sessionToken"
        ]
      },
      "ConfirmPhoneVerificationDto": {
        "description": "`ConfirmPhoneVerificationDto` (`device`: best effort, as on `/auth/refresh`).",
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "uint32",
            "minimum": 0
          },
          "sessionToken": {
            "type": "string"
          },
          "device": true
        },
        "required": [
          "code",
          "sessionToken"
        ]
      },
      "ProviderResponse": {
        "description": "Nest's `ReturnProviderDto`.",
        "type": "object",
        "properties": {
          "provider": {
            "description": "The primary (first enabled) provider; kept for shipped clients that decode one.",
            "type": "string"
          },
          "providers": {
            "description": "Every distinct enabled provider for the domain.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "provider",
          "providers"
        ]
      },
      "ListPage_DeviceListItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeviceListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "DeviceListItem": {
        "description": "One install (Nest's `DeviceResponseDto`).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "installationId": {
            "type": "string",
            "format": "uuid"
          },
          "platform": {
            "$ref": "#/components/schemas/DevicePlatform"
          },
          "appVersion": {
            "type": [
              "string",
              "null"
            ]
          },
          "appBuild": {
            "type": [
              "string",
              "null"
            ]
          },
          "osVersion": {
            "type": [
              "string",
              "null"
            ]
          },
          "deviceModel": {
            "type": [
              "string",
              "null"
            ]
          },
          "firstSeenAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastSeenAt": {
            "type": "string",
            "format": "date-time"
          },
          "revokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "pushEnabled": {
            "description": "A push token is registered for exactly this (user, installation).",
            "type": "boolean"
          },
          "isSignedIn": {
            "description": "Not revoked, and a live refresh token is bound to this installation.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "userId",
          "installationId",
          "platform",
          "appVersion",
          "appBuild",
          "osVersion",
          "deviceModel",
          "firstSeenAt",
          "lastSeenAt",
          "revokedAt",
          "pushEnabled",
          "isSignedIn"
        ]
      },
      "DevicePlatform": {
        "description": "An installation's platform (the `DevicePlatform` enum).",
        "type": "string",
        "enum": [
          "IOS",
          "ANDROID",
          "WEB",
          "OTHER"
        ],
        "x-enum-open": true
      },
      "PersonalAccessToken": {
        "description": "A stored token without its hash (a value object the user owns; Nest's\n `PersonalAccessTokenResponseDto`).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "revokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lastUsedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "id",
          "name",
          "expiresAt",
          "revokedAt",
          "lastUsedAt",
          "createdAt",
          "userId"
        ]
      },
      "ProtectedResourceMetadata": {
        "description": "`GET /.well-known/oauth-protected-resource[/mcp]`.",
        "type": "object",
        "properties": {
          "resource": {
            "type": "string"
          },
          "authorization_servers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "bearer_methods_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "scopes_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "resource",
          "authorization_servers",
          "bearer_methods_supported",
          "scopes_supported"
        ]
      },
      "AuthorizationServerMetadata": {
        "description": "`GET /.well-known/oauth-authorization-server` (RFC 8414).",
        "type": "object",
        "properties": {
          "issuer": {
            "type": "string"
          },
          "authorization_endpoint": {
            "type": "string"
          },
          "token_endpoint": {
            "type": "string"
          },
          "revocation_endpoint": {
            "type": "string"
          },
          "response_types_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "grant_types_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "token_endpoint_auth_methods_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "client_id_metadata_document_supported": {
            "description": "Client ID metadata documents (CIMD, SEP-991) are resolved (`super::cimd`); with\n `none`, advertised as one unit, as Nest does.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "code_challenge_methods_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "scopes_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "authorization_response_iss_parameter_supported": {
            "type": "boolean"
          }
        },
        "required": [
          "issuer",
          "authorization_endpoint",
          "token_endpoint",
          "revocation_endpoint",
          "response_types_supported",
          "grant_types_supported",
          "token_endpoint_auth_methods_supported",
          "code_challenge_methods_supported",
          "scopes_supported",
          "authorization_response_iss_parameter_supported"
        ]
      },
      "Jwks": {
        "description": "`GET /.well-known/jwks.json`.",
        "type": "object",
        "properties": {
          "keys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Jwk"
            }
          }
        },
        "required": [
          "keys"
        ]
      },
      "Jwk": {
        "description": "One published key (Nest's `{...jwk, kid, use, alg}`, in that order).",
        "type": "object",
        "properties": {
          "kty": {
            "type": "string"
          },
          "n": {
            "type": "string"
          },
          "e": {
            "type": "string"
          },
          "kid": {
            "type": "string"
          },
          "use": {
            "type": "string"
          },
          "alg": {
            "type": "string"
          }
        },
        "required": [
          "kty",
          "n",
          "e",
          "kid",
          "use",
          "alg"
        ]
      },
      "AcceptInviteTokenDto": {
        "description": "`AcceptInviteTokenDto`: `{ token }`.",
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          }
        },
        "required": [
          "token"
        ]
      },
      "InvitationAccepted": {
        "description": "The answer to a redemption (Nest's `AcceptInviteResponseDto` without its English\n `message`, SPINE 26.4): the org's handle (where the client goes next) and the\n membership the invitation made or raised.",
        "type": "object",
        "properties": {
          "handle": {
            "type": "string"
          },
          "account": {
            "$ref": "#/components/schemas/AccountSummary"
          }
        },
        "required": [
          "handle",
          "account"
        ]
      },
      "ListPage_UserListItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "UserListItem": {
        "description": "A user in `GET /users` (every field a [`UserDetail`] field). The phone is not a filter\n (PII, SPINE 26.8); the e-mail is (`email`, case-insensitive equality, and\n `emailContains`: the support console finds people by it, and every row a caller lists\n shows it anyway). A closed user is listed only with `includeDeleted=true`.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "description": "The platform role (Nest's `UserRole`: 0 ROOT, 1 ADMIN, 2 SUPPORT, 3 ENTERPRISE,\n 4 USER).",
            "type": "integer",
            "format": "int32"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "phoneNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "givenName": {
            "type": [
              "string",
              "null"
            ]
          },
          "familyName": {
            "type": [
              "string",
              "null"
            ]
          },
          "fullName": {
            "type": [
              "string",
              "null"
            ]
          },
          "profilePictureUrl": {
            "description": "The profile picture: a signed read URL valid 10 to 15 minutes\n ([`identity_api::avatars`]), or `null`.",
            "type": [
              "string",
              "null"
            ]
          },
          "isBlocked": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "role",
          "email",
          "phoneNumber",
          "givenName",
          "familyName",
          "fullName",
          "profilePictureUrl",
          "isBlocked",
          "createdAt",
          "updatedAt",
          "deletedAt"
        ]
      },
      "CreateUserDto": {
        "description": "Nest's `CreateUserDto`.",
        "type": "object",
        "properties": {
          "givenName": {
            "type": [
              "string",
              "null"
            ]
          },
          "familyName": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "phoneNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "birthdate": {
            "type": [
              "string",
              "null"
            ]
          },
          "accountNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "description": "No column (Prisma refused it)."
          },
          "vippsId": {
            "description": "No column (Prisma refused it).",
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UserRestored": {
        "description": "The restore's answer: the platform tier the user held at the close, which the restore\n did not re-grant (`null`: none).",
        "type": "object",
        "properties": {
          "platformRoleAtClose": {
            "description": "A platform tier: Nest's `UserRole` 0 ROOT, 1 ADMIN, 2 SUPPORT.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "ROOT",
              "ADMIN",
              "SUPPORT",
              null
            ],
            "x-enum-open": true
          }
        },
        "required": [
          "platformRoleAtClose"
        ]
      },
      "UpdateUserRoleDto": {
        "description": "`UpdateUserRoleDto`: Nest's `UserRole` (0 ROOT, 1 ADMIN, 2 SUPPORT, 3 ENTERPRISE,\n 4 USER).",
        "type": "object",
        "properties": {
          "role": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "maximum": 4
          }
        },
        "required": [
          "role"
        ]
      },
      "MyProfile": {
        "description": "The caller's own profile (`GET /users/me`, SPINE 26.9: a singleton, one plain type):\n the identity, their live payment cards and push tokens, their live, unblocked\n memberships of live orgs (each a [`MyAccount`]), their live\n enterprise seats, the receipt inbox the apps show (the personal one first, else the\n oldest active one) and the support widget's identity hashes.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "integer",
            "format": "int32"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "phoneNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "givenName": {
            "type": [
              "string",
              "null"
            ]
          },
          "familyName": {
            "type": [
              "string",
              "null"
            ]
          },
          "fullName": {
            "type": [
              "string",
              "null"
            ]
          },
          "streetAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "postalCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "accountNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "profilePictureUrl": {
            "description": "The profile picture: a signed read URL valid 10 to 15 minutes\n ([`identity_api::avatars`]), or `null`.",
            "type": [
              "string",
              "null"
            ]
          },
          "isNotificationsEnabled": {
            "type": "boolean"
          },
          "isOnboardingCompleted": {
            "type": "boolean"
          },
          "isNewsletterConsentGiven": {
            "type": "boolean"
          },
          "isCustomMarketingConsentGiven": {
            "type": "boolean"
          },
          "isBlocked": {
            "type": "boolean"
          },
          "sessionsRevokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "paymentCards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentCard"
            }
          },
          "pushTokens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PushToken"
            }
          },
          "accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MyAccount"
            }
          },
          "enterpriseAccounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MyEnterpriseSeat"
            }
          },
          "inbox": {
            "description": "A receipt inbox the user can forward to, as their profile shows it (capture's row; a\n value object: SPINE 26.1 rule 1).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "email": {
                "description": "The address mail is forwarded to.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "organizationId": {
                "description": "The org whose receipts it collects (`null`: the personal inbox).",
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "description": "Required by the apps' `InboxEntity` decoder (iOS 3.11).",
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "email",
              "organizationId",
              "createdAt",
              "updatedAt"
            ]
          },
          "intercomWebHash": {
            "type": "string"
          },
          "intercomIosHash": {
            "type": "string"
          },
          "intercomAndroidHash": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "role",
          "email",
          "phoneNumber",
          "givenName",
          "familyName",
          "fullName",
          "streetAddress",
          "postalCode",
          "region",
          "accountNumber",
          "profilePictureUrl",
          "isNotificationsEnabled",
          "isOnboardingCompleted",
          "isNewsletterConsentGiven",
          "isCustomMarketingConsentGiven",
          "isBlocked",
          "sessionsRevokedAt",
          "createdAt",
          "updatedAt",
          "paymentCards",
          "pushTokens",
          "accounts",
          "enterpriseAccounts",
          "inbox",
          "intercomWebHash",
          "intercomIosHash",
          "intercomAndroidHash"
        ]
      },
      "PaymentCard": {
        "description": "A payment card (a value object the user owns; Prisma's field order).",
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "last4": {
            "type": "string"
          },
          "brand": {
            "type": "string"
          },
          "cardType": {
            "description": "`PaymentCardType` (a card's own `cardType`; also a card X-Receipts linking saves).",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "DEBIT",
              "CREDIT",
              null
            ],
            "x-enum-open": true
          },
          "isDefault": {
            "type": "boolean"
          },
          "organizationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "receiptLinkStatus": {
            "description": "X-Receipts card linking (`integrations::x_receipts`): PENDING while the holder is\n in the card form, ACTIVE while purchases arrive in their inbox, REMOVED once\n unlinked; null if never linked.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "PENDING",
              "ACTIVE",
              "REMOVED",
              null
            ],
            "x-enum-descriptions": [
              "The holder opened X-Receipts' form from this card; no card enrolled yet.",
              "X-Receipts has the card; its purchases land in the holder's inbox.",
              "Unenrolled at X-Receipts; purchases are no longer received."
            ],
            "x-enum-open": true
          },
          "receiptLinkCardIds": {
            "description": "X-Receipts' ids for this card (its Visa and BankAxept sides are separate ids).\n Opaque references, not card numbers.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "receiptLinkUpdatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "last4",
          "brand",
          "cardType",
          "isDefault",
          "description",
          "organizationId",
          "userId",
          "createdAt",
          "updatedAt",
          "deletedAt",
          "receiptLinkStatus",
          "receiptLinkCardIds",
          "receiptLinkUpdatedAt"
        ]
      },
      "PushToken": {
        "description": "A registered push token (a value object the user owns).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "token": {
            "type": [
              "string",
              "null"
            ]
          },
          "platform": {
            "$ref": "#/components/schemas/PushPlatform"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "installationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        },
        "required": [
          "id",
          "token",
          "platform",
          "userId",
          "installationId"
        ]
      },
      "PushPlatform": {
        "description": "`PushPlatform`.",
        "type": "string",
        "enum": [
          "APNS",
          "FCM"
        ],
        "x-enum-open": true
      },
      "MyAccount": {
        "description": "A membership on the caller's profile: its [`AccountListItem`] and its org's logo\n (RESPONSE-SHAPES section 23).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "userId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "role": {
            "description": "The account role (Nest's integer `AccountRole`: 0 OWNER … 3 USER).",
            "type": "integer",
            "format": "int32"
          },
          "digest": {
            "type": "integer",
            "format": "int32"
          },
          "isNotificationsEnabled": {
            "type": "boolean"
          },
          "isBlocked": {
            "type": "boolean"
          },
          "email": {
            "description": "The account's contact e-mail (overrides the user's).",
            "type": [
              "string",
              "null"
            ]
          },
          "employeeNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalIdSource": {
            "description": "Who set an account's `externalId` (`ExternalIdSource`).",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "SCIM",
              "API",
              "SSO_CLAIM",
              null
            ],
            "x-enum-open": true
          },
          "billingType": {
            "description": "`AccountBillingType`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "PERIODIC",
              "PER_REPORT",
              null
            ],
            "x-enum-open": true
          },
          "baseCurrency": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "user": {
            "description": "A summary-level user (SPINE 26.1: depth 0; a user as other people see it): the names,\n the e-mail and the avatar, never the phone or the address (a membership's detail adds\n them for those who may read it: identity's `AccountDetailUser`). Built only by\n [`user_summary`] (its loaders [`user_summaries_on`], [`account_summaries_on`]).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "givenName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "familyName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fullName": {
                "description": "`users.fullName` (null when either name part is).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "profilePictureUrl": {
                "description": "The profile picture: a signed read URL valid 10 to 15 minutes\n ([`crate::avatars`]); `null` without a picture (and in event payloads).",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "givenName",
              "familyName",
              "fullName",
              "email",
              "profilePictureUrl"
            ]
          },
          "organization": {
            "description": "A summary-level organization (SPINE 26.1; RESPONSE-SHAPES section 3): what every\n embed and every organization write answers. `handle` is the org's URL identity (the\n web apps route by it). Built only by identity's `org::read::organization_summary`.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "handle": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              },
              "legalName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "orgNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "isPersonal": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "handle",
              "displayName",
              "legalName",
              "orgNumber",
              "isPersonal"
            ]
          },
          "managerAccountIds": {
            "description": "The ids of `managerAccounts` (SPINE 26.12.2: a relation is its ids).",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "managerAccounts": {
            "description": "The live, unblocked accounts this one reports to.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountSummary"
            }
          },
          "subordinateAccountIds": {
            "description": "The ids of `subordinateAccounts` (SPINE 26.12.2: a relation is its ids).",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "subordinateAccounts": {
            "description": "The accounts that report to this one.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountSummary"
            }
          },
          "departmentAssignments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountDepartmentAssignment"
            }
          },
          "projectAssignments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountProjectAssignment"
            }
          },
          "customRole": {
            "description": "The member's custom role in the org, `null` for none (its tier is `role`).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "organizationIconUrl": {
            "description": "The org's logo: a signed read URL valid 10 to 15 minutes\n ([`identity_api::avatars`]), or `null`.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "organizationId",
          "userId",
          "role",
          "digest",
          "isNotificationsEnabled",
          "isBlocked",
          "email",
          "employeeNumber",
          "externalId",
          "externalIdSource",
          "billingType",
          "baseCurrency",
          "createdBy",
          "createdAt",
          "updatedAt",
          "user",
          "organization",
          "managerAccountIds",
          "managerAccounts",
          "subordinateAccountIds",
          "subordinateAccounts",
          "departmentAssignments",
          "projectAssignments",
          "customRole",
          "organizationIconUrl"
        ]
      },
      "AccountDepartmentAssignment": {
        "description": "A membership's assignment to a live department of its org.",
        "type": "object",
        "properties": {
          "departmentId": {
            "description": "The department's id (SPINE 26.12.2: a relation is its id).",
            "type": "string",
            "format": "uuid"
          },
          "department": {
            "$ref": "#/components/schemas/DepartmentSummary"
          },
          "role": {
            "description": "The department role (Nest's integer `AccountRole` scale).",
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "departmentId",
          "department",
          "role"
        ]
      },
      "AccountProjectAssignment": {
        "description": "A membership's assignment to a live project of its org.",
        "type": "object",
        "properties": {
          "project": {
            "$ref": "#/components/schemas/ProjectSummary"
          },
          "role": {
            "description": "The project role (Nest's integer `AccountRole` scale).",
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "project",
          "role"
        ]
      },
      "MyEnterpriseSeat": {
        "description": "One of the caller's live enterprise seats: the enterprise and the live member orgs the\n seat reaches (every one for `ALL`, the assigned ones for `SELECTED`).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "enterpriseId": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "description": "The seat role (Nest's integer enterprise role).",
            "type": "integer",
            "format": "int32"
          },
          "organizationScope": {
            "$ref": "#/components/schemas/EnterpriseOrganizationScope"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "enterprise": {
            "$ref": "#/components/schemas/SeatEnterprise"
          },
          "organizationIds": {
            "description": "The ids of `organizations` (SPINE 26.12.2: a relation is its ids).",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "organizations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrganizationSummary"
            }
          }
        },
        "required": [
          "id",
          "enterpriseId",
          "role",
          "organizationScope",
          "createdAt",
          "enterprise",
          "organizationIds",
          "organizations"
        ]
      },
      "EnterpriseOrganizationScope": {
        "description": "Which orgs an enterprise seat reaches (`EnterpriseOrganizationScope`).",
        "type": "string",
        "enum": [
          "ALL",
          "SELECTED"
        ],
        "x-enum-descriptions": [
          "Every live member org of the enterprise.",
          "Only the orgs the seat is assigned."
        ],
        "x-enum-open": true
      },
      "SeatEnterprise": {
        "description": "The enterprise a seat is held on, as the caller's profile names it.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "displayName": {
            "type": "string"
          },
          "legalName": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "displayName",
          "legalName"
        ]
      },
      "UserDetail": {
        "description": "A user (`GET /users/{id}`): the identity, its live payment cards and its memberships\n (removed and blocked ones included, as the operator's restore screen reads them).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "integer",
            "format": "int32"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "phoneNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "givenName": {
            "type": [
              "string",
              "null"
            ]
          },
          "familyName": {
            "type": [
              "string",
              "null"
            ]
          },
          "fullName": {
            "type": [
              "string",
              "null"
            ]
          },
          "streetAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "postalCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "accountNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "profilePictureUrl": {
            "description": "The profile picture: a signed read URL valid 10 to 15 minutes\n ([`identity_api::avatars`]), or `null`.",
            "type": [
              "string",
              "null"
            ]
          },
          "isNotificationsEnabled": {
            "type": "boolean"
          },
          "isOnboardingCompleted": {
            "type": "boolean"
          },
          "isNewsletterConsentGiven": {
            "type": "boolean"
          },
          "isCustomMarketingConsentGiven": {
            "type": "boolean"
          },
          "isBlocked": {
            "type": "boolean"
          },
          "sessionsRevokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "paymentCards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentCard"
            }
          },
          "accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountSummary"
            }
          },
          "personalAccessTokens": {
            "description": "The user's personal access tokens, revoked and expired included, newest first (at\n most 200): metadata only, never a secret or its hash. The user reads their own;\n anyone else only through the operator escape (as the rest of this detail).",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PersonalAccessToken"
            }
          }
        },
        "required": [
          "id",
          "role",
          "email",
          "phoneNumber",
          "givenName",
          "familyName",
          "fullName",
          "streetAddress",
          "postalCode",
          "region",
          "accountNumber",
          "profilePictureUrl",
          "isNotificationsEnabled",
          "isOnboardingCompleted",
          "isNewsletterConsentGiven",
          "isCustomMarketingConsentGiven",
          "isBlocked",
          "sessionsRevokedAt",
          "createdAt",
          "updatedAt",
          "deletedAt",
          "paymentCards",
          "accounts",
          "personalAccessTokens"
        ]
      },
      "UpdateUser": {
        "description": "The body of `PATCH /users/:id`.",
        "type": "object",
        "properties": {
          "accountNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "givenName": {
            "type": [
              "string",
              "null"
            ]
          },
          "familyName": {
            "type": [
              "string",
              "null"
            ]
          },
          "streetAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "postalCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "isCustomMarketingConsentGiven": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "isNotificationsEnabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "isOnboardingCompleted": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "isNewsletterConsentGiven": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "resetToken": {
            "description": "Declared by Nest's DTO, refused by its database layer (no such column)."
          },
          "resetTokenExpires": {
            "description": "As `resetToken`."
          },
          "lastLogin": {
            "description": "As `resetToken`."
          },
          "notificationConfiguration": {
            "description": "`notificationConfiguration`.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "mutedChannels": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "inboxItemCreated": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      },
      "ProfilePictureUploadRequest": {
        "description": "The intent's body: the picture the client is about to upload.",
        "type": "object",
        "properties": {
          "id": {
            "description": "Client-minted (a UUID): the upload's id.",
            "type": "string",
            "format": "uuid"
          },
          "fileName": {
            "description": "The client's file name (at most 255 characters; recorded, never part of a key).",
            "type": [
              "string",
              "null"
            ]
          },
          "size": {
            "description": "The file's exact size in bytes: the storage policy admits nothing else.",
            "type": [
              "integer",
              "null"
            ],
            "format": "uint64",
            "minimum": 0
          },
          "contentType": {
            "description": "The file's media type (one the purpose accepts): the storage policy's\n `Content-Type`, and what its magic bytes must be.",
            "type": [
              "string",
              "null"
            ]
          },
          "sha256": {
            "description": "The file's SHA-256 (hex): the confirm checks the stored bytes against it.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id"
        ]
      },
      "ProfilePictureUpload": {
        "description": "The intent's 201: where the bytes go.",
        "type": "object",
        "properties": {
          "upload": {
            "$ref": "#/components/schemas/UploadTicket"
          }
        },
        "required": [
          "upload"
        ]
      },
      "AddPaymentCard": {
        "description": "The body of `POST /users/:id/paymentcard`.",
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "last4": {
            "type": "string"
          },
          "brand": {
            "type": "string"
          },
          "cardType": {
            "$ref": "#/components/schemas/PaymentCardType"
          },
          "isDefault": {
            "type": "boolean"
          },
          "organizationId": {
            "description": "The org the card is pinned to; absent or null: personal.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "last4",
          "brand",
          "cardType",
          "description",
          "isDefault"
        ]
      },
      "UpdatePaymentCard": {
        "description": "The body of `PATCH /users/:id/paymentcard/:paymentCardId`: only what is given changes.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "last4": {
            "type": [
              "string",
              "null"
            ]
          },
          "brand": {
            "type": [
              "string",
              "null"
            ]
          },
          "cardType": {
            "description": "`PaymentCardType` (a card's own `cardType`; also a card X-Receipts linking saves).",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "DEBIT",
              "CREDIT",
              null
            ]
          },
          "isDefault": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "organizationId": {
            "description": "Null makes the card personal.",
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "AddPushToken": {
        "description": "The body of `POST /users/:id/push-token`.",
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "platform": {
            "$ref": "#/components/schemas/PushPlatform"
          },
          "installationId": {
            "description": "The device installation it was registered from (any UUID version).",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "token",
          "platform"
        ]
      },
      "AccountDetail": {
        "description": "A membership (`GET /accounts/{id}`; a removed one of a live org still reads).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "userId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "role": {
            "description": "The org role: the strongest of its `roleSources`.",
            "type": "integer",
            "format": "int32"
          },
          "roleSources": {
            "description": "Where the org role comes from: the manual grant, and each SCIM group mapping that\n grants one (docs/modules/identity/PORT-scim-groups.md). Detail only.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoleSource"
            }
          },
          "digest": {
            "type": "integer",
            "format": "int32"
          },
          "isNotificationsEnabled": {
            "type": "boolean"
          },
          "isBlocked": {
            "type": "boolean"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "employeeNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalIdSource": {
            "description": "Who set an account's `externalId` (`ExternalIdSource`).",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "SCIM",
              "API",
              "SSO_CLAIM",
              null
            ],
            "x-enum-open": true
          },
          "billingType": {
            "description": "`AccountBillingType`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "PERIODIC",
              "PER_REPORT",
              null
            ],
            "x-enum-open": true
          },
          "baseCurrency": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "user": {
            "description": "The member: their [`UserSummary`] and their contact details ([`AccountDetailUser`]).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "givenName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "familyName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fullName": {
                "description": "`users.fullName` (null when either name part is).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "profilePictureUrl": {
                "description": "The profile picture: a signed read URL valid 10 to 15 minutes\n ([`crate::avatars`]); `null` without a picture (and in event payloads).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "phoneNumber": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "givenName",
              "familyName",
              "fullName",
              "email",
              "profilePictureUrl",
              "phoneNumber"
            ]
          },
          "organization": {
            "description": "A summary-level organization (SPINE 26.1; RESPONSE-SHAPES section 3): what every\n embed and every organization write answers. `handle` is the org's URL identity (the\n web apps route by it). Built only by identity's `org::read::organization_summary`.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "handle": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              },
              "legalName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "orgNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "isPersonal": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "handle",
              "displayName",
              "legalName",
              "orgNumber",
              "isPersonal"
            ]
          },
          "managerAccountIds": {
            "description": "The ids of `managerAccounts` (SPINE 26.12.2: a relation is its ids).",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "managerAccounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountSummary"
            }
          },
          "subordinateAccountIds": {
            "description": "The ids of `subordinateAccounts` (SPINE 26.12.2: a relation is its ids).",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "subordinateAccounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountSummary"
            }
          },
          "departmentAssignments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountDetailDepartmentAssignment"
            }
          },
          "projectAssignments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountProjectAssignment"
            }
          },
          "customRole": {
            "description": "The member's custom role in the org, `null` for none (its tier is `role`).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "notificationConfiguration": {
            "description": "A membership's notification channels per event (each a comma-separated channel list,\n `null` for the member's default).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "mutedChannels": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "invitationAccepted": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reportSubmitted": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reportApproved": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reportAmended": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reportRejected": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "subscriptionUpdates": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "mutedChannels",
              "invitationAccepted",
              "reportSubmitted",
              "reportApproved",
              "reportAmended",
              "reportRejected",
              "subscriptionUpdates",
              "updatedAt"
            ]
          },
          "slackInstallation": {
            "description": "An account's Slack installation (a value object the membership owns; SPINE 26.1 rule\n 1): every column but the bot token, which never leaves (Nest answered it as `\"\"`; no\n compat field, SPINE 26.5).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "accountId": {
                "type": "string",
                "format": "uuid"
              },
              "teamId": {
                "type": "string"
              },
              "teamName": {
                "type": "string"
              },
              "userId": {
                "description": "The installing Slack user's id.",
                "type": "string"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "accountId",
              "teamId",
              "teamName",
              "userId",
              "createdAt",
              "updatedAt"
            ]
          }
        },
        "required": [
          "id",
          "organizationId",
          "userId",
          "role",
          "roleSources",
          "digest",
          "isNotificationsEnabled",
          "isBlocked",
          "email",
          "employeeNumber",
          "externalId",
          "externalIdSource",
          "billingType",
          "baseCurrency",
          "createdBy",
          "createdAt",
          "updatedAt",
          "deletedAt",
          "user",
          "organization",
          "managerAccountIds",
          "managerAccounts",
          "subordinateAccountIds",
          "subordinateAccounts",
          "departmentAssignments",
          "projectAssignments",
          "customRole",
          "notificationConfiguration",
          "slackInstallation"
        ]
      },
      "RoleSource": {
        "description": "Where a role comes from (the account detail's `roleSources`). An open enum on the wire\n (SPINE 26.11). The effective role is the strongest source's (lowest number).",
        "oneOf": [
          {
            "description": "Granted in Utleggsappen: an admin, an invitation, provisioning, the identity\n provider's own user attributes.",
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "MANUAL"
                ],
                "x-enum-open": true
              }
            },
            "$ref": "#/components/schemas/ManualRoleSource",
            "required": [
              "kind"
            ]
          },
          {
            "description": "Granted by a SCIM group's mapping.",
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "GROUP"
                ],
                "x-enum-open": true
              }
            },
            "$ref": "#/components/schemas/GroupRoleSource",
            "required": [
              "kind"
            ]
          }
        ]
      },
      "ManualRoleSource": {
        "description": "A manual grant.",
        "type": "object",
        "properties": {
          "role": {
            "description": "The role it grants (Nest's integer `AccountRole` scale).",
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "role"
        ]
      },
      "ScimGroupSummary": {
        "description": "A SCIM group (`PATCH …/scim-groups/{groupId}`'s answer).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "displayName": {
            "type": "string"
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "mappingSource": {
            "description": "Whose mappings apply: the konsern's (inherited) or the org's own.",
            "$ref": "#/components/schemas/MappingSource"
          },
          "memberCount": {
            "type": "integer",
            "format": "int64"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "organizationId",
          "displayName",
          "externalId",
          "mappingSource",
          "memberCount",
          "createdAt",
          "updatedAt"
        ]
      },
      "MappingSource": {
        "description": "Which mappings apply to a group: the konsern's (inherited) or the org's own.",
        "type": "string",
        "enum": [
          "ENTERPRISE",
          "ORGANIZATION"
        ],
        "x-enum-open": true
      },
      "MappingLevel": {
        "description": "Where a mapping is defined.",
        "type": "string",
        "enum": [
          "ORGANIZATION",
          "ENTERPRISE"
        ],
        "x-enum-open": true
      },
      "GroupRoleSource": {
        "description": "A group's grant: the group, and the mapping (the org's own or the konsern's).",
        "type": "object",
        "properties": {
          "role": {
            "type": "integer",
            "format": "int32"
          },
          "groupId": {
            "description": "The group's id (SPINE 26.12.2: a relation is its id).",
            "type": "string",
            "format": "uuid"
          },
          "group": {
            "$ref": "#/components/schemas/ScimGroupSummary"
          },
          "mappingId": {
            "type": "string",
            "format": "uuid"
          },
          "mappingLevel": {
            "$ref": "#/components/schemas/MappingLevel"
          }
        },
        "required": [
          "role",
          "groupId",
          "group",
          "mappingId",
          "mappingLevel"
        ]
      },
      "AccountDetailDepartmentAssignment": {
        "description": "A membership's assignment to a live department of its org, on its detail: the list\n row's fields and where the role comes from.",
        "type": "object",
        "properties": {
          "departmentId": {
            "description": "The department's id (SPINE 26.12.2: a relation is its id).",
            "type": "string",
            "format": "uuid"
          },
          "department": {
            "$ref": "#/components/schemas/DepartmentSummary"
          },
          "role": {
            "description": "The department role (Nest's integer `AccountRole` scale): the strongest source's.",
            "type": "integer",
            "format": "int32"
          },
          "roleSources": {
            "description": "Manual and group grants of it (docs/modules/identity/PORT-scim-groups.md).",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoleSource"
            }
          }
        },
        "required": [
          "departmentId",
          "department",
          "role",
          "roleSources"
        ]
      },
      "UpdateAccount": {
        "description": "The body of `PATCH /accounts/:id`.",
        "type": "object",
        "properties": {
          "role": {
            "description": "Owner = 0, Admin = 1, Manager = 2, User = 3.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "digest": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "isNotificationsEnabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "employeeNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalId": {
            "description": "Trimmed; empty clears it.",
            "type": [
              "string",
              "null"
            ]
          },
          "billingType": {
            "description": "`AccountBillingType`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "PERIODIC",
              "PER_REPORT",
              null
            ]
          },
          "baseCurrency": {
            "description": "ISO 4217, a supported base currency; null inherits the organization's base\n currency.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "NOK",
              "SEK",
              "DKK",
              "EUR",
              "USD",
              "GBP",
              "CHF",
              "ISK",
              "PLN",
              "CZK",
              null
            ]
          },
          "notificationConfiguration": {
            "description": "`notificationConfiguration` (Nest's `UpdateAccountNotificationConfigurationSchema`:\n every channel list a nullable string).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "mutedChannels": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "invitationAccepted": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reportSubmitted": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reportApproved": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reportAmended": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reportRejected": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "subscriptionUpdates": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "customRoleId": {
            "description": "One of the org's custom roles (`GET /organizations/{organizationId}/member-roles`):\n the member's only custom role in the org, and `role` follows its tier (a `role` sent\n along must be that tier). `null` drops the member's custom role and keeps `role`; a\n `role` sent without this field drops it too.",
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        }
      },
      "BaseCurrency": {
        "description": "ISO 4217 code of a supported base currency",
        "type": "string",
        "enum": [
          "NOK",
          "SEK",
          "DKK",
          "EUR",
          "USD",
          "GBP",
          "CHF",
          "ISK",
          "PLN",
          "CZK"
        ]
      },
      "PayoutBatch": {
        "description": "A batch read's answer: the payouts the caller may read, by account id.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Payout"
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "CreateAccountDto": {
        "description": "Nest's `CreateAccountDto`.",
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "role": {
            "description": "Owner = 0, Admin = 1, Manager = 2, User = 3.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0,
            "maximum": 3
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "digest": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "isNotificationsEnabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "employeeNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalId": {
            "description": "Trimmed, at most 64 characters; empty means none.",
            "type": [
              "string",
              "null"
            ]
          },
          "billingType": {
            "description": "`AccountBillingType`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "PERIODIC",
              "IMMEDIATE",
              null
            ]
          }
        },
        "required": [
          "userId",
          "organizationId"
        ]
      },
      "NotifyAccountDto": {
        "description": "Nest's `NotifyAccountDto`.",
        "type": "object",
        "properties": {
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommunicationChannel"
            },
            "minItems": 1
          },
          "subject": {
            "type": "string",
            "minLength": 1
          },
          "text": {
            "type": "string",
            "minLength": 1
          },
          "accountId": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "channels",
          "subject",
          "text",
          "accountId"
        ]
      },
      "ProvisionAccountDto": {
        "description": "The body of `POST /accounts/provision` (`ProvisionAccountDto`).",
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "phoneNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "givenName": {
            "type": [
              "string",
              "null"
            ]
          },
          "familyName": {
            "type": [
              "string",
              "null"
            ]
          },
          "streetAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "postalCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "birthdate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "userAccountNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "accountEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "employeeNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "digest": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "isNotificationsEnabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "billingType": {
            "description": "`AccountBillingType`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "PERIODIC",
              "PER_REPORT",
              null
            ]
          },
          "managerAccountIds": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "departmentAssignments": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ProvisionDepartmentAssignmentDto"
            }
          }
        },
        "required": [
          "organizationId"
        ]
      },
      "ProvisionDepartmentAssignmentDto": {
        "description": "One department assignment (`ProvisionDepartmentAssignmentDto`).",
        "type": "object",
        "properties": {
          "departmentId": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "description": "0..=4 (4: the legacy USER).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          }
        },
        "required": [
          "departmentId"
        ]
      },
      "RestoreAccount": {
        "description": "`POST /accounts/:id/restore` (no body).",
        "type": "object"
      },
      "BlockAccount": {
        "description": "`POST /accounts/:id/block` (no body).",
        "type": "object"
      },
      "UnblockAccount": {
        "description": "`POST /accounts/:id/unblock` (no body).",
        "type": "object"
      },
      "AssignSubordinates": {
        "description": "`POST /accounts/:id/assign-subordinates`.",
        "type": "object",
        "properties": {
          "subordinateAccountIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "subordinateAccountIds"
        ]
      },
      "UnassignSubordinates": {
        "description": "`POST /accounts/:id/unassign-subordinates` (the same body).",
        "type": "object",
        "properties": {
          "subordinateAccountIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "subordinateAccountIds"
        ]
      },
      "ListPage_DepartmentListItem": {
        "description": "The envelope of a list whose item declares relations (SPINE 26.12.2): [`ListPage`]'s\n members and the side-loads, `{ items, hasMore, nextCursor?, total?, included? }`. Its\n schema keeps `ListPage`'s name: a route answers one or the other for an item, never\n both.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DepartmentListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "included": {
            "description": "The side-loaded resources by type (`include=`); absent when nothing was asked for.",
            "$ref": "#/components/schemas/DepartmentIncluded"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "DepartmentListItem": {
        "description": "A department in `GET /departments` (a field subset of [`DepartmentDetail`]: no\n `projects`, only their count).",
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "accountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "accountingDescription": {
            "type": [
              "string",
              "null"
            ]
          },
          "isPublic": {
            "type": "boolean"
          },
          "managedByIntegrationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "configuration": {
            "description": "A department's invoicing configuration (owned; one per department, or none).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "shouldOverrideInvoiceBuyer": {
                "type": "boolean"
              },
              "invoiceLegalName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "invoiceOrgNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "invoiceAddress": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "invoicePostalCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "invoiceRegion": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "invoicePaymentTerms": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "deliverByEhf": {
                "type": "boolean"
              },
              "deliverByEmail": {
                "type": "boolean"
              },
              "deliveryEmail": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "taxableDeliveryEmail": {
                "description": "Where the department's claims with a trekkpliktig amount are e-mailed instead of\n `deliveryEmail` (e.g. payroll). Empty: `deliveryEmail` takes them.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "shouldOverrideInvoiceBuyer",
              "invoiceLegalName",
              "invoiceOrgNumber",
              "invoiceAddress",
              "invoicePostalCode",
              "invoiceRegion",
              "invoicePaymentTerms",
              "deliverByEhf",
              "deliverByEmail",
              "deliveryEmail",
              "taxableDeliveryEmail"
            ]
          },
          "departmentAssignments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DepartmentAssignment"
            }
          },
          "projectCount": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "id",
          "organizationId",
          "title",
          "accountingCode",
          "accountingDescription",
          "description",
          "isPublic",
          "managedByIntegrationId",
          "createdAt",
          "updatedAt",
          "configuration",
          "departmentAssignments",
          "projectCount"
        ]
      },
      "DepartmentAssignment": {
        "description": "A live member of a department (owned): its `DepartmentRole` (0 root, 1 admin,\n 2 manager, 3 user) and the member's account.",
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "integer",
            "format": "int32"
          },
          "account": {
            "$ref": "#/components/schemas/AccountSummary"
          }
        },
        "required": [
          "accountId",
          "role",
          "account"
        ]
      },
      "DepartmentIncluded": {
        "description": "The side-loaded resources (SPINE 26.12.2): one array per type, each resource once, ordered by id",
        "type": "object",
        "properties": {
          "organization": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrganizationDetail"
            }
          }
        },
        "additionalProperties": false
      },
      "CreateDepartmentDto": {
        "description": "`POST /departments`.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 255
          },
          "organizationId": {
            "description": "Any string, as in Nest; one that names no organization the actor reaches answers\n `organization_not_found`.",
            "type": "string"
          },
          "configuration": {
            "description": "The nested invoicing block (`DepartmentConfigurationDto`). Every field echoes back as\n sent (Nest answers the parsed DTO, not the stored row).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "invoicePaymentTerms": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "deliverByEhf": {
                "type": "boolean"
              },
              "deliverByEmail": {
                "type": "boolean"
              },
              "deliveryEmail": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "taxableDeliveryEmail": {
                "description": "Claims with a trekkpliktig amount are e-mailed here instead (`z.string().email()`).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "shouldOverrideInvoiceBuyer": {
                "type": "boolean"
              },
              "invoiceOrgNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "invoiceLegalName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "invoiceAddress": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "invoiceRegion": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "invoicePostalCode": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "isPublic": {
            "type": "boolean"
          },
          "managedByIntegrationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "accountingCode": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "title",
          "organizationId"
        ]
      },
      "DepartmentDetail": {
        "description": "A department (`GET /departments/{id}`).",
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "accountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "accountingDescription": {
            "type": [
              "string",
              "null"
            ]
          },
          "isPublic": {
            "type": "boolean"
          },
          "managedByIntegrationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "configuration": {
            "description": "A department's invoicing configuration (owned; one per department, or none).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "shouldOverrideInvoiceBuyer": {
                "type": "boolean"
              },
              "invoiceLegalName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "invoiceOrgNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "invoiceAddress": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "invoicePostalCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "invoiceRegion": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "invoicePaymentTerms": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "deliverByEhf": {
                "type": "boolean"
              },
              "deliverByEmail": {
                "type": "boolean"
              },
              "deliveryEmail": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "taxableDeliveryEmail": {
                "description": "Where the department's claims with a trekkpliktig amount are e-mailed instead of\n `deliveryEmail` (e.g. payroll). Empty: `deliveryEmail` takes them.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "shouldOverrideInvoiceBuyer",
              "invoiceLegalName",
              "invoiceOrgNumber",
              "invoiceAddress",
              "invoicePostalCode",
              "invoiceRegion",
              "invoicePaymentTerms",
              "deliverByEhf",
              "deliverByEmail",
              "deliveryEmail",
              "taxableDeliveryEmail"
            ]
          },
          "departmentAssignments": {
            "description": "The live members, by account id.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DepartmentAssignment"
            }
          },
          "projectIds": {
            "description": "The ids of `projects` (SPINE 26.12.2: a relation is its ids).",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "projects": {
            "description": "The live linked projects, by id.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectSummary"
            }
          },
          "projectCount": {
            "description": "How many live projects are linked (`projects.len()`).",
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "id",
          "organizationId",
          "title",
          "accountingCode",
          "accountingDescription",
          "description",
          "isPublic",
          "managedByIntegrationId",
          "createdAt",
          "updatedAt",
          "configuration",
          "departmentAssignments",
          "projectIds",
          "projects",
          "projectCount"
        ]
      },
      "UpdateDepartmentDto": {
        "description": "`PATCH /departments/{id}`: every field optional; `organizationId` is not accepted\n (a department's tenant is fixed at create, and an unknown key is ignored).",
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "configuration": {
            "description": "The nested invoicing block (`DepartmentConfigurationDto`). Every field echoes back as\n sent (Nest answers the parsed DTO, not the stored row).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "invoicePaymentTerms": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "deliverByEhf": {
                "type": "boolean"
              },
              "deliverByEmail": {
                "type": "boolean"
              },
              "deliveryEmail": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "taxableDeliveryEmail": {
                "description": "Claims with a trekkpliktig amount are e-mailed here instead (`z.string().email()`).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "shouldOverrideInvoiceBuyer": {
                "type": "boolean"
              },
              "invoiceOrgNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "invoiceLegalName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "invoiceAddress": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "invoiceRegion": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "invoicePostalCode": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "isPublic": {
            "type": "boolean"
          },
          "managedByIntegrationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "accountingCode": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ListPage_DepartmentMemberListItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DepartmentMemberListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "DepartmentMemberListItem": {
        "description": "A live member of a department in `GET /departments/{id}/members` (Nest #1424): the\n assignment with its account's summary, one page at a time by the member's name.",
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "description": "The `DepartmentRole` (0 root, 1 admin, 2 manager, 3 user).",
            "type": "integer",
            "format": "int32"
          },
          "account": {
            "$ref": "#/components/schemas/AccountSummary"
          }
        },
        "required": [
          "accountId",
          "role",
          "account"
        ]
      },
      "ConnectOrDisconnectAccountsDto": {
        "description": "`{ accountIds }` for connect and disconnect.",
        "type": "object",
        "properties": {
          "accountIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 500
          }
        },
        "required": [
          "accountIds"
        ]
      },
      "ConnectProjectsDto": {
        "description": "`{ projectIds }` for connect and disconnect (`ConnectProjectsDto`: at most 500 ids, each\n a `z.uuid()`).",
        "type": "object",
        "properties": {
          "projectIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 500
          }
        },
        "required": [
          "projectIds"
        ]
      },
      "UpdateDepartmentAssignmentRoleDto": {
        "description": "`PATCH /departments/{id}/accounts/{accountId}`.",
        "type": "object",
        "properties": {
          "role": {
            "description": "`DepartmentRole`: 0 root, 1 admin, 2 manager, 3 user.",
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "maximum": 3
          }
        },
        "required": [
          "role"
        ]
      },
      "IssueTenantAccessGrantDto": {
        "description": "`IssueTenantAccessGrantDto`: the tenant is the path's, never the body's.",
        "type": "object",
        "properties": {
          "userId": {
            "description": "The practitioner receiving access.",
            "type": "string",
            "format": "uuid"
          },
          "roleId": {
            "description": "The ORGANIZATION-scope role: a system role, or one of this org's custom roles.",
            "type": "string"
          },
          "expiresInDays": {
            "description": "Time-box in days (1–365), default 90; a re-issue restarts it.",
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "userId",
          "roleId"
        ]
      },
      "AccessGrantSummary": {
        "description": "An access grant as writes answer it (depth 0: the `tenant_access_grants` columns).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "roleId": {
            "type": "string",
            "format": "uuid"
          },
          "grantedByUserId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "operatorIssued": {
            "type": "boolean"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "revokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "revokedByUserId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "lastUsedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "renewedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "userId",
          "organizationId",
          "roleId",
          "grantedByUserId",
          "operatorIssued",
          "expiresAt",
          "revokedAt",
          "revokedByUserId",
          "lastUsedAt",
          "renewedAt",
          "createdAt",
          "updatedAt"
        ]
      },
      "ListPage_AccessGrantListItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccessGrantListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "AccessGrantListItem": {
        "description": "An access grant in a list (the org's consent register, the caller's own grants): its\n summary, the role it carries, the grantee and the granting org.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "roleId": {
            "type": "string",
            "format": "uuid"
          },
          "grantedByUserId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "operatorIssued": {
            "type": "boolean"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "revokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "revokedByUserId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "lastUsedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "renewedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "role": {
            "$ref": "#/components/schemas/RoleSummary"
          },
          "user": {
            "description": "The grantee (`null` when the reader cannot see the user row).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "givenName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "familyName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fullName": {
                "description": "`users.fullName` (null when either name part is).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "profilePictureUrl": {
                "description": "The profile picture: a signed read URL valid 10 to 15 minutes\n ([`crate::avatars`]); `null` without a picture (and in event payloads).",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "givenName",
              "familyName",
              "fullName",
              "email",
              "profilePictureUrl"
            ]
          },
          "organization": {
            "description": "The granting org.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "handle": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              },
              "legalName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "orgNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "isPersonal": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "handle",
              "displayName",
              "legalName",
              "orgNumber",
              "isPersonal"
            ]
          }
        },
        "required": [
          "id",
          "userId",
          "organizationId",
          "roleId",
          "grantedByUserId",
          "operatorIssued",
          "expiresAt",
          "revokedAt",
          "revokedByUserId",
          "lastUsedAt",
          "renewedAt",
          "createdAt",
          "updatedAt",
          "role",
          "user",
          "organization"
        ]
      },
      "RoleSummary": {
        "description": "A role as writes answer it and other aggregates embed it (depth 0).",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "$ref": "#/components/schemas/RoleType"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/Scope"
          },
          "organizationId": {
            "description": "The org of a CUSTOM role; `null` for a SYSTEM role.",
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "parentSystemRoleId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "scope",
          "type",
          "organizationId",
          "parentSystemRoleId",
          "createdAt",
          "updatedAt"
        ]
      },
      "Scope": {
        "description": "`RoleScope`.",
        "type": "string",
        "enum": [
          "GLOBAL",
          "ORGANIZATION",
          "ENTERPRISE",
          "DEPARTMENT"
        ],
        "x-enum-open": true
      },
      "RoleType": {
        "description": "`RoleType`.",
        "type": "string",
        "enum": [
          "SYSTEM",
          "CUSTOM"
        ],
        "x-enum-open": true
      },
      "InviteTokenDto": {
        "description": "`GetInviteTokenDto` / `RevokeInviteTokenDto`: `{ token }`.",
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          }
        },
        "required": [
          "token"
        ]
      },
      "InvitationDetail": {
        "description": "An invitation as its token holder reads it (`POST /invitations`).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "token": {
            "type": "string"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "phoneNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "type": "integer",
            "format": "int32"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "invitedCount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "redeemedCount": {
            "type": "integer",
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdByUserId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "revokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "departmentIds": {
            "description": "The ids of `departments` (SPINE 26.12.2: a relation is its ids).",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "departments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DepartmentSummary"
            }
          },
          "organization": {
            "$ref": "#/components/schemas/OrganizationSummary"
          },
          "createdByUser": {
            "description": "The inviter (`null`: none, or no longer a live user).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "givenName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "familyName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fullName": {
                "description": "`users.fullName` (null when either name part is).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "profilePictureUrl": {
                "description": "The profile picture: a signed read URL valid 10 to 15 minutes\n ([`crate::avatars`]); `null` without a picture (and in event payloads).",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "givenName",
              "familyName",
              "fullName",
              "email",
              "profilePictureUrl"
            ]
          }
        },
        "required": [
          "id",
          "token",
          "email",
          "phoneNumber",
          "role",
          "expiresAt",
          "invitedCount",
          "redeemedCount",
          "createdAt",
          "createdByUserId",
          "revokedAt",
          "organizationId",
          "departmentIds",
          "departments",
          "organization",
          "createdByUser"
        ]
      },
      "ListPage_IncomingInvitation": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IncomingInvitation"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "IncomingInvitation": {
        "description": "One of the caller's usable invitations (`GET /invitations`).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "token": {
            "type": "string"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "phoneNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "type": "integer",
            "format": "int32"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "invitedCount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "redeemedCount": {
            "type": "integer",
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "organization": {
            "description": "A summary-level organization (SPINE 26.1; RESPONSE-SHAPES section 3): what every\n embed and every organization write answers. `handle` is the org's URL identity (the\n web apps route by it). Built only by identity's `org::read::organization_summary`.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "handle": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              },
              "legalName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "orgNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "isPersonal": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "handle",
              "displayName",
              "legalName",
              "orgNumber",
              "isPersonal"
            ]
          },
          "organizationIconUrl": {
            "description": "The inviting org's logo: a signed read URL valid 10 to 15 minutes (as a user\n summary's avatar); `null` without a logo or a visible org.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdByUserId": {
            "description": "The inviter's id (SPINE 26.12.2: a relation is its id); `null` with\n `createdByUser`.",
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdByUser": {
            "description": "A summary-level user (SPINE 26.1: depth 0; a user as other people see it): the names,\n the e-mail and the avatar, never the phone or the address (a membership's detail adds\n them for those who may read it: identity's `AccountDetailUser`). Built only by\n [`user_summary`] (its loaders [`user_summaries_on`], [`account_summaries_on`]).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "givenName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "familyName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fullName": {
                "description": "`users.fullName` (null when either name part is).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "profilePictureUrl": {
                "description": "The profile picture: a signed read URL valid 10 to 15 minutes\n ([`crate::avatars`]); `null` without a picture (and in event payloads).",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "givenName",
              "familyName",
              "fullName",
              "email",
              "profilePictureUrl"
            ]
          },
          "departmentIds": {
            "description": "The ids of `departments` (SPINE 26.12.2: a relation is its ids).",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "departments": {
            "description": "The live departments the invitee joins.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DepartmentSummary"
            }
          }
        },
        "required": [
          "id",
          "token",
          "email",
          "phoneNumber",
          "role",
          "expiresAt",
          "invitedCount",
          "redeemedCount",
          "createdAt",
          "organizationId",
          "organization",
          "organizationIconUrl",
          "createdByUserId",
          "createdByUser",
          "departmentIds",
          "departments"
        ]
      },
      "EffectiveAccessDto": {
        "description": "`EffectiveAccessDto`.",
        "type": "object",
        "properties": {
          "roles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EffectiveRoleDto"
            }
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "roles",
          "permissions"
        ]
      },
      "EffectiveRoleDto": {
        "description": "One assigned role (`EffectiveRoleDto`).",
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "scopeId": {
            "type": "string"
          },
          "tier": {
            "description": "The SYSTEM role whose tier the assignment carries (its own name; a CUSTOM\n role's parent; `null` for a tier-less custom role).",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "scope",
          "scopeId",
          "type",
          "tier"
        ]
      },
      "OrganizationAuthProviderDto": {
        "description": "`OrganizationAuthProviderDto`.",
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "kind": {
            "description": "`ENTRA_COMMON` (org-admin editable) or `OIDC` (operator managed).",
            "type": "string"
          },
          "domain": {
            "description": "The SSO email domain; `null` for an OIDC provider.",
            "type": [
              "string",
              "null"
            ]
          },
          "isEnabled": {
            "type": "boolean"
          },
          "createOnLogin": {
            "type": "boolean"
          },
          "entraTenantId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        },
        "required": [
          "provider",
          "kind",
          "domain",
          "isEnabled",
          "createOnLogin",
          "entraTenantId"
        ]
      },
      "UpsertOrganizationAuthProviderDto": {
        "description": "`UpsertOrganizationAuthProviderDto`.",
        "type": "object",
        "properties": {
          "provider": {
            "$ref": "#/components/schemas/LoginProvider"
          },
          "domain": {
            "description": "A domain name (`example.com`, `sub.example.com`).",
            "type": "string",
            "pattern": "^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$"
          },
          "isEnabled": {
            "type": "boolean"
          },
          "createOnLogin": {
            "description": "When false, SSO login is reserved to already-provisioned members (default true).",
            "type": "boolean"
          },
          "entraTenantId": {
            "description": "The bound Entra directory (tid).",
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "provider",
          "domain",
          "isEnabled"
        ]
      },
      "LoginProvider": {
        "description": "`LoginProvider`.",
        "type": "string",
        "enum": [
          "EMAIL",
          "APPLE",
          "GOOGLE",
          "VIPPS",
          "ENTRA",
          "OIDC"
        ]
      },
      "EnterpriseDetail": {
        "description": "An enterprise (`GET /enterprise/{id}`). The columns past the identity are a full-scope\n seat's (an operator's); a SELECTED seat reads them as `null`.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "displayName": {
            "type": "string"
          },
          "legalName": {
            "type": "string"
          },
          "iconStorageKey": {
            "description": "The logo's storage key (not a URL; `iconUrl` reads it).",
            "type": [
              "string",
              "null"
            ]
          },
          "iconUrl": {
            "description": "The logo: a signed read URL valid 10 to 15 minutes (`identity_api::avatars`, one\n URL per five-minute window); `null` without a logo.",
            "type": [
              "string",
              "null"
            ]
          },
          "orgNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "postalCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "contactPerson": {
            "type": [
              "string",
              "null"
            ]
          },
          "contactPersonEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoiceEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoiceLineLayout": {
            "type": [
              "string",
              "null"
            ]
          },
          "consolidatedBilling": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "billingAnchorDay": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int16",
            "minimum": -32768,
            "maximum": 32767
          },
          "poCustomerId": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "organizationScope": {
            "description": "The caller's reach: `ALL` (a full-scope seat, an operator) or `SELECTED`.",
            "type": "string"
          },
          "organizationIds": {
            "description": "The ids of `organizations` (SPINE 26.12.2: a relation is its ids).",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "organizations": {
            "description": "The live member orgs the caller reaches, by id.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrganizationSummary"
            }
          },
          "organizationCount": {
            "description": "How many there are (`organizations.len()`).",
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "id",
          "displayName",
          "legalName",
          "iconStorageKey",
          "iconUrl",
          "orgNumber",
          "address",
          "postalCode",
          "region",
          "contactPerson",
          "contactPersonEmail",
          "invoiceEmail",
          "invoiceLineLayout",
          "consolidatedBilling",
          "billingAnchorDay",
          "poCustomerId",
          "createdAt",
          "updatedAt",
          "organizationScope",
          "organizationIds",
          "organizations",
          "organizationCount"
        ]
      },
      "UpdateEnterpriseDto": {
        "description": "`UpdateEnterpriseDto`: every field optional. The billing terms (`poCustomerId`,\n `consolidatedBilling`, `billingAnchorDay`) are a platform operator's.",
        "type": "object",
        "properties": {
          "displayName": {
            "type": [
              "string",
              "null"
            ]
          },
          "legalName": {
            "type": [
              "string",
              "null"
            ]
          },
          "orgNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "postalCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoiceEmail": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "contactPerson": {
            "type": [
              "string",
              "null"
            ]
          },
          "contactPersonEmail": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "poCustomerId": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoiceLineLayout": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^(GROUPED|ONE_LINE_PER_CHARGE)$"
          },
          "consolidatedBilling": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "billingAnchorDay": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int16",
            "minimum": 1,
            "maximum": 28
          }
        }
      },
      "EnterpriseSummary": {
        "description": "A summary-level enterprise (konsern; SPINE 26.1): its identity, the fields every caller\n that sees the enterprise at all may see (a SELECTED seat included). Built only by\n identity's `org::enterprise::enterprise_summary`.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "displayName": {
            "type": "string"
          },
          "legalName": {
            "type": "string"
          },
          "iconStorageKey": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "displayName",
          "legalName",
          "iconStorageKey"
        ]
      },
      "CreateEnterpriseDto": {
        "description": "`CreateEnterpriseDto`.",
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string"
          },
          "legalName": {
            "type": "string"
          },
          "orgNumber": {
            "description": "Stored without whitespace.",
            "type": "string"
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "postalCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoiceEmail": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "contactPerson": {
            "description": "Without one, the creator is the contact and gets the enterprise's OWNER seat.",
            "type": [
              "string",
              "null"
            ]
          },
          "contactPersonEmail": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "poCustomerId": {
            "type": [
              "string",
              "null"
            ]
          },
          "consolidatedBilling": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "billingAnchorDay": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int16",
            "minimum": 1,
            "maximum": 28
          }
        },
        "required": [
          "displayName",
          "legalName",
          "orgNumber"
        ]
      },
      "ListPage_EnterpriseOrganizationListItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnterpriseOrganizationListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "EnterpriseOrganizationListItem": {
        "description": "A member organization in the enterprise's list: the organization list's fields, its\n contact person, and billing's usage and subscription (the konsern overview's columns).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "handle": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "legalName": {
            "type": [
              "string",
              "null"
            ]
          },
          "orgNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "isPersonal": {
            "type": "boolean"
          },
          "enterpriseId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "iconStorageKey": {
            "type": [
              "string",
              "null"
            ]
          },
          "iconUrl": {
            "description": "The logo: a signed read URL valid 10 to 15 minutes; `null` without a logo.",
            "type": [
              "string",
              "null"
            ]
          },
          "contactPerson": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "subscription": {
            "description": "A summary-level subscription (SPINE 26.1): its own scalars and its lines (what an\n organization list shows of the plan). Built only by billing.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "recurringInterval": {
                "description": "`MONTH`, `QUARTER` or `YEAR`.",
                "type": "string"
              },
              "subscriptionStatus": {
                "description": "`active`, `trialing`, `past_due`, `suspended` or `canceled` (`null` on a legacy row\n that never had one).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "trialPeriodEnd": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "cancelAtPeriodEnd": {
                "type": "boolean"
              },
              "billingPeriodStart": {
                "type": "string",
                "format": "date-time"
              },
              "billingPeriodEnd": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "canceledAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "paidSeats": {
                "type": "integer",
                "format": "int32"
              },
              "items": {
                "description": "The lines, by id.",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SubscriptionItemSummary"
                }
              }
            },
            "required": [
              "id",
              "organizationId",
              "recurringInterval",
              "subscriptionStatus",
              "trialPeriodEnd",
              "cancelAtPeriodEnd",
              "billingPeriodStart",
              "billingPeriodEnd",
              "canceledAt",
              "paidSeats",
              "items"
            ]
          },
          "usage": {
            "description": "An organization's usage in its current window (billing's derived counts, SPINE 14): a\n computed answer, one plain type. `periodStart` is the counted start of the window.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "usersCount": {
                "type": "integer",
                "format": "int32"
              },
              "reportsCount": {
                "type": "integer",
                "format": "int32"
              },
              "expensesCount": {
                "type": "integer",
                "format": "int32"
              },
              "drivesCount": {
                "type": "integer",
                "format": "int32"
              },
              "travelsCount": {
                "type": "integer",
                "format": "int32"
              },
              "categoriesCount": {
                "type": "integer",
                "format": "int32"
              },
              "departmentsCount": {
                "type": "integer",
                "format": "int32"
              },
              "projectsCount": {
                "type": "integer",
                "format": "int32"
              },
              "periodStart": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "organizationId",
              "usersCount",
              "reportsCount",
              "expensesCount",
              "drivesCount",
              "travelsCount",
              "categoriesCount",
              "departmentsCount",
              "projectsCount",
              "periodStart",
              "createdAt",
              "updatedAt"
            ]
          }
        },
        "required": [
          "id",
          "handle",
          "displayName",
          "legalName",
          "orgNumber",
          "isPersonal",
          "enterpriseId",
          "iconStorageKey",
          "iconUrl",
          "contactPerson",
          "createdAt",
          "updatedAt",
          "subscription",
          "usage"
        ]
      },
      "SubscriptionItemSummary": {
        "description": "One line of a subscription as its summary carries it (an owned child): the price and\n the product it bills, by name.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "priceId": {
            "type": "string",
            "format": "uuid"
          },
          "productId": {
            "type": "string",
            "format": "uuid"
          },
          "productName": {
            "type": "string"
          },
          "productType": {
            "description": "What the line is: the plan, an add-on or an integration.",
            "$ref": "#/components/schemas/ProductType"
          },
          "activeFrom": {
            "type": "string",
            "format": "date-time"
          },
          "activeTo": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "priceId",
          "productId",
          "productName",
          "productType",
          "activeFrom",
          "activeTo"
        ]
      },
      "CreateOrganizationDto": {
        "description": "`CreateOrganizationDto`.",
        "type": "object",
        "properties": {
          "legalName": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "departmentDisplayNames": true,
          "projectDisplayNames": true,
          "handle": {
            "type": [
              "string",
              "null"
            ]
          },
          "orgNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoiceSellerOrgNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoiceSellerLegalName": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "postalCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoiceEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "trial": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "cancelAtPeriodEnd": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "isOnboardingCompleted": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "contactPerson": {
            "type": [
              "string",
              "null"
            ]
          },
          "contactPersonEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "poCustomerId": {
            "type": [
              "string",
              "null"
            ]
          },
          "perDiemTaxFreeAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "perDiemTaxFreeNoOvernightAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "perDiemTaxFreeHotelAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "perDiemTaxFreeWithCookingAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "perDiemTaxFreeWithoutCookingAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "perDiemTaxableAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "enterpriseId": {
            "type": [
              "string",
              "null"
            ]
          },
          "affiliateCode": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "legalName",
          "displayName"
        ]
      },
      "ListPage_EnterpriseSeatListItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnterpriseSeatListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "EnterpriseSeatListItem": {
        "description": "A seat in `GET …/accounts` (every field of [`EnterpriseSeatDetail`]).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "enterpriseId": {
            "type": "string",
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "integer",
            "format": "int32"
          },
          "organizationScope": {
            "$ref": "#/components/schemas/SeatScope"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "user": {
            "description": "A summary-level user (SPINE 26.1: depth 0; a user as other people see it): the names,\n the e-mail and the avatar, never the phone or the address (a membership's detail adds\n them for those who may read it: identity's `AccountDetailUser`). Built only by\n [`user_summary`] (its loaders [`user_summaries_on`], [`account_summaries_on`]).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "givenName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "familyName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fullName": {
                "description": "`users.fullName` (null when either name part is).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "profilePictureUrl": {
                "description": "The profile picture: a signed read URL valid 10 to 15 minutes\n ([`crate::avatars`]); `null` without a picture (and in event payloads).",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "givenName",
              "familyName",
              "fullName",
              "email",
              "profilePictureUrl"
            ]
          },
          "organizationAssignments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnterpriseSeatAssignment"
            }
          }
        },
        "required": [
          "id",
          "enterpriseId",
          "userId",
          "role",
          "organizationScope",
          "createdAt",
          "updatedAt",
          "user",
          "organizationAssignments"
        ]
      },
      "SeatScope": {
        "description": "A seat's reach in its enterprise (`EnterpriseOrganizationScope`).",
        "type": "string",
        "enum": [
          "ALL",
          "SELECTED"
        ],
        "x-enum-open": true
      },
      "EnterpriseSeatAssignment": {
        "description": "One member org a SELECTED seat reaches (owned by the seat).",
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "organization": {
            "$ref": "#/components/schemas/OrganizationSummary"
          }
        },
        "required": [
          "organizationId",
          "organization"
        ]
      },
      "CreateEnterpriseAccountDto": {
        "description": "`CreateEnterpriseAccountDto`.",
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "role": {
            "type": "integer",
            "format": "int32"
          },
          "organizationScope": {
            "type": [
              "string",
              "null"
            ]
          },
          "organizationIds": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "userId",
          "role"
        ]
      },
      "EnterpriseSeatSummary": {
        "description": "A seat as its writes answer it (depth 0).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "enterpriseId": {
            "type": "string",
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "description": "`EnterpriseAccountRole`: 0 owner, 1 admin.",
            "type": "integer",
            "format": "int32"
          },
          "organizationScope": {
            "$ref": "#/components/schemas/SeatScope"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "enterpriseId",
          "userId",
          "role",
          "organizationScope",
          "createdAt",
          "updatedAt"
        ]
      },
      "EnterpriseSeatDetail": {
        "description": "A seat (`GET …/accounts/{accountId}`): its user and its live org assignments.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "enterpriseId": {
            "type": "string",
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "integer",
            "format": "int32"
          },
          "organizationScope": {
            "$ref": "#/components/schemas/SeatScope"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "user": {
            "description": "The seat's user (`null` when no longer a live user).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "givenName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "familyName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fullName": {
                "description": "`users.fullName` (null when either name part is).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "profilePictureUrl": {
                "description": "The profile picture: a signed read URL valid 10 to 15 minutes\n ([`crate::avatars`]); `null` without a picture (and in event payloads).",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "givenName",
              "familyName",
              "fullName",
              "email",
              "profilePictureUrl"
            ]
          },
          "organizationAssignments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnterpriseSeatAssignment"
            }
          }
        },
        "required": [
          "id",
          "enterpriseId",
          "userId",
          "role",
          "organizationScope",
          "createdAt",
          "updatedAt",
          "user",
          "organizationAssignments"
        ]
      },
      "UpdateEnterpriseAccountDto": {
        "description": "`UpdateEnterpriseAccountDto`.",
        "type": "object",
        "properties": {
          "role": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "organizationScope": {
            "type": [
              "string",
              "null"
            ]
          },
          "organizationIds": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ListPage_EnterpriseUserListItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnterpriseUserListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "EnterpriseUserListItem": {
        "description": "A user found in an enterprise's member orgs.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "givenName": {
            "type": [
              "string",
              "null"
            ]
          },
          "familyName": {
            "type": [
              "string",
              "null"
            ]
          },
          "fullName": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "phoneNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "profilePictureUrl": {
            "description": "A signed read URL valid 10 to 15 minutes ([`identity_api::avatars`]), or `null`.",
            "type": [
              "string",
              "null"
            ]
          },
          "organizations": {
            "description": "The member orgs (of those the caller reaches) the user belongs to, by id.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrganizationSummary"
            }
          }
        },
        "required": [
          "id",
          "givenName",
          "familyName",
          "fullName",
          "email",
          "phoneNumber",
          "profilePictureUrl",
          "organizations"
        ]
      },
      "ListPage_EnterpriseInvitationListItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnterpriseInvitationListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "EnterpriseInvitationListItem": {
        "description": "An invitation in the enterprise's list: its summary, inviter, redeemer and live\n assignments.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "enterpriseId": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "phoneNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "type": "integer",
            "format": "int32"
          },
          "organizationScope": {
            "$ref": "#/components/schemas/SeatScope"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "redeemedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "revokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdByUserId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "redeemedByUserId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdByUser": {
            "description": "A summary-level user (SPINE 26.1: depth 0; a user as other people see it): the names,\n the e-mail and the avatar, never the phone or the address (a membership's detail adds\n them for those who may read it: identity's `AccountDetailUser`). Built only by\n [`user_summary`] (its loaders [`user_summaries_on`], [`account_summaries_on`]).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "givenName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "familyName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fullName": {
                "description": "`users.fullName` (null when either name part is).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "profilePictureUrl": {
                "description": "The profile picture: a signed read URL valid 10 to 15 minutes\n ([`crate::avatars`]); `null` without a picture (and in event payloads).",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "givenName",
              "familyName",
              "fullName",
              "email",
              "profilePictureUrl"
            ]
          },
          "redeemedByUser": {
            "description": "A summary-level user (SPINE 26.1: depth 0; a user as other people see it): the names,\n the e-mail and the avatar, never the phone or the address (a membership's detail adds\n them for those who may read it: identity's `AccountDetailUser`). Built only by\n [`user_summary`] (its loaders [`user_summaries_on`], [`account_summaries_on`]).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "givenName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "familyName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fullName": {
                "description": "`users.fullName` (null when either name part is).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "profilePictureUrl": {
                "description": "The profile picture: a signed read URL valid 10 to 15 minutes\n ([`crate::avatars`]); `null` without a picture (and in event payloads).",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "givenName",
              "familyName",
              "fullName",
              "email",
              "profilePictureUrl"
            ]
          },
          "organizationAssignments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnterpriseInvitationAssignment"
            }
          }
        },
        "required": [
          "id",
          "enterpriseId",
          "email",
          "phoneNumber",
          "role",
          "organizationScope",
          "expiresAt",
          "createdAt",
          "redeemedAt",
          "revokedAt",
          "createdByUserId",
          "redeemedByUserId",
          "createdByUser",
          "redeemedByUser",
          "organizationAssignments"
        ]
      },
      "EnterpriseInvitationAssignment": {
        "description": "A member org an invitation assigns (owned by the invitation).",
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "organization": {
            "$ref": "#/components/schemas/OrganizationSummary"
          }
        },
        "required": [
          "organizationId",
          "organization"
        ]
      },
      "EnterpriseInvitationSummary": {
        "description": "An enterprise invitation as its writes answer it (depth 0; never the token or the\n verification budgets).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "enterpriseId": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "phoneNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "description": "The seat role it grants (0 owner, 1 admin).",
            "type": "integer",
            "format": "int32"
          },
          "organizationScope": {
            "$ref": "#/components/schemas/SeatScope"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "redeemedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "revokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdByUserId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "redeemedByUserId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        },
        "required": [
          "id",
          "enterpriseId",
          "email",
          "phoneNumber",
          "role",
          "organizationScope",
          "expiresAt",
          "createdAt",
          "redeemedAt",
          "revokedAt",
          "createdByUserId",
          "redeemedByUserId"
        ]
      },
      "EnterpriseInvitationPreview": {
        "description": "The recipient-safe invitation (`GET /enterprise/invitations/{token}`; Nest's\n `toRecipientSafeInvitation`): no inviter or redeemer, the enterprise's summary.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "enterpriseId": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "phoneNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "type": "integer",
            "format": "int32"
          },
          "organizationScope": {
            "$ref": "#/components/schemas/SeatScope"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "redeemedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "revokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "enterprise": {
            "$ref": "#/components/schemas/EnterpriseSummary"
          },
          "organizationAssignments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnterpriseInvitationAssignment"
            }
          }
        },
        "required": [
          "id",
          "enterpriseId",
          "email",
          "phoneNumber",
          "role",
          "organizationScope",
          "expiresAt",
          "createdAt",
          "redeemedAt",
          "revokedAt",
          "enterprise",
          "organizationAssignments"
        ]
      },
      "EnterpriseInvitationVerificationResponseDto": {
        "description": "`EnterpriseInvitationVerificationResponseDto`.",
        "type": "object",
        "properties": {
          "channel": {
            "description": "`email` or `sms`.",
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "retryAfterSeconds": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "channel",
          "expiresAt",
          "retryAfterSeconds"
        ]
      },
      "AcceptEnterpriseInvitationDto": {
        "description": "`AcceptEnterpriseInvitationDto`: `{ code? }` (six digits).",
        "type": "object",
        "properties": {
          "code": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "InviteByEmailDto": {
        "description": "`InviteByEmailDto`.",
        "type": "object",
        "properties": {
          "expiresAt": {
            "description": "When it expires (`null`: never, for a link).",
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "role": {
            "description": "`AccountRole` (0 owner … 3 user), default 3.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "invitedCount": {
            "description": "How many may redeem it.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "organizationId": {
            "description": "Any string, as in Nest; one naming no org the caller reaches answers\n `organization_not_found`.",
            "type": "string"
          },
          "departmentIds": {
            "description": "Departments the new member joins.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "emails": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "organizationId",
          "emails"
        ]
      },
      "InviteResultDto": {
        "description": "`InviteResultDto`.",
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InviteResultItemDto"
            }
          }
        },
        "required": [
          "results"
        ]
      },
      "InviteResultItemDto": {
        "description": "`InviteResultItemDto`.",
        "type": "object",
        "properties": {
          "recipient": {
            "description": "The normalised recipient (E.164 phone or lower-cased e-mail).",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/InviteRecipientStatus"
          }
        },
        "required": [
          "recipient",
          "status"
        ]
      },
      "InviteRecipientStatus": {
        "description": "`InviteRecipientStatus`.",
        "type": "string",
        "enum": [
          "invited",
          "already_member"
        ],
        "x-enum-open": true
      },
      "InviteByPhoneDto": {
        "description": "`InviteByPhoneDto`.",
        "type": "object",
        "properties": {
          "expiresAt": {
            "description": "When it expires (`null`: never, for a link).",
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "role": {
            "description": "`AccountRole` (0 owner … 3 user), default 3.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "invitedCount": {
            "description": "How many may redeem it.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "organizationId": {
            "description": "Any string, as in Nest; one naming no org the caller reaches answers\n `organization_not_found`.",
            "type": "string"
          },
          "departmentIds": {
            "description": "Departments the new member joins.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "phoneNumbers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "organizationId",
          "phoneNumbers"
        ]
      },
      "TokenOptions": {
        "description": "The invitation options every channel shares (`BaseTokenDto`).",
        "type": "object",
        "properties": {
          "expiresAt": {
            "description": "When it expires (`null`: never, for a link).",
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "role": {
            "description": "`AccountRole` (0 owner … 3 user), default 3.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "invitedCount": {
            "description": "How many may redeem it.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "organizationId": {
            "description": "Any string, as in Nest; one naming no org the caller reaches answers\n `organization_not_found`.",
            "type": "string"
          },
          "departmentIds": {
            "description": "Departments the new member joins.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "organizationId"
        ]
      },
      "InviteLink": {
        "description": "The link answer.",
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          }
        },
        "required": [
          "url"
        ]
      },
      "UpdateOrganizationDto": {
        "description": "The body of `PATCH /organizations/{id}`: every field optional; a field sent `null`\n clears it where the column is nullable.",
        "type": "object",
        "properties": {
          "legalName": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "displayName": {
            "type": "string",
            "maxLength": 255
          },
          "departmentDisplayNames": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "$ref": "#/components/schemas/DisplayNames"
            }
          },
          "projectDisplayNames": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "$ref": "#/components/schemas/DisplayNames"
            }
          },
          "handle": {
            "type": "string",
            "maxLength": 255
          },
          "orgNumber": {
            "description": "A new number is the Brønnøysund register's (its name and address are written with\n it); once set, only a platform operator moves it. Blank clears it.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "invoiceSellerOrgNumber": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "invoiceSellerLegalName": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "address": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "postalCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "region": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "invoiceEmail": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "taxableInvoiceEmail": {
            "description": "Where claims with a trekkpliktig amount are e-mailed instead of `invoiceEmail`.",
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "contactPerson": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "contactPersonEmail": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "isOnboardingCompleted": {
            "type": "boolean"
          },
          "isDepartmentRequired": {
            "type": "boolean"
          },
          "isProjectRequired": {
            "type": "boolean"
          },
          "isAltCategoriesEnabled": {
            "type": "boolean"
          },
          "paymentTerms": {
            "type": "integer",
            "format": "int32"
          },
          "collectAccountNumber": {
            "type": "boolean"
          },
          "invoiceAsEhf": {
            "type": "boolean"
          },
          "baseCurrency": {
            "description": "A change needs `baseCurrency.access`.",
            "$ref": "#/components/schemas/BaseCurrency"
          },
          "isDriveActive": {
            "type": "boolean"
          },
          "isTravelActive": {
            "type": "boolean"
          },
          "isTravelRequestActive": {
            "type": "boolean"
          },
          "isApprovalFlowActive": {
            "type": "boolean"
          },
          "useFlowBasedReviews": {
            "type": "boolean"
          },
          "fingerprintEnabled": {
            "type": "boolean"
          },
          "amendPolicy": {
            "description": "The amend policy by tier; `null` restores the defaults.",
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "$ref": "#/components/schemas/AmendTierPolicy"
            }
          },
          "approvalDistinctDeciders": {
            "description": "On: one person decides at most one satisfied step of a submission (403\n `distinct_deciders` for a second).",
            "type": "boolean"
          },
          "driveExtras": {
            "$ref": "#/components/schemas/DriveExtrasPatch"
          },
          "travelRateLevel": {
            "$ref": "#/components/schemas/OrganizationTravelRateLevel"
          },
          "driveRateLevel": {
            "$ref": "#/components/schemas/OrganizationDriveRateLevel"
          },
          "perDiemAbroadCompensation": {
            "type": "boolean"
          },
          "perDiemNightSupplement": {
            "type": "boolean"
          },
          "perDiemTaxFreeAccountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "perDiemTaxFreeNoOvernightAccountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "perDiemTaxFreeHotelAccountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "perDiemTaxFreeWithCookingAccountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "perDiemTaxFreeWithoutCookingAccountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "perDiemTaxableAccountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "perDiemAbroadCompensationAccountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "perDiemNightSupplementAccountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "driveTaxFreeAccountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "driveTaxableAccountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "tollAccountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "passengerAccountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "driveTrailerAccountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "driveOffroadAccountingCode": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "inboxLockForced": {
            "type": "boolean"
          },
          "inboxEmailTemplate": {
            "type": [
              "string",
              "null"
            ]
          },
          "poCustomerId": {
            "type": [
              "string",
              "null"
            ]
          },
          "enterpriseId": {
            "description": "Moves the organization into (or, `null`, out of) a konsern.",
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        }
      },
      "DisplayNames": {
        "description": "One locale's names for a dimension (`departmentDisplayNames`, `projectDisplayNames`).",
        "type": "object",
        "properties": {
          "singular": {
            "type": "string"
          },
          "plural": {
            "type": "string"
          }
        },
        "required": [
          "singular",
          "plural"
        ]
      },
      "AmendTierPolicy": {
        "description": "One amend tier's override in the org's amend policy (reports' setting, stored on the\n org): the tier's field set and, for `currentReviewer`, the separation-of-duties switch.",
        "type": "object",
        "properties": {
          "fields": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "enabled": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "DriveExtrasPatch": {
        "description": "A `driveExtras` patch: the extras named are set, the others kept (at least one).",
        "type": "object",
        "properties": {
          "offroad": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "trailer": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "passengers": {
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "minProperties": 1,
        "additionalProperties": false
      },
      "OrganizationTravelRateLevel": {
        "description": "`travelRateLevel`'s members (travel's setting).",
        "type": "string",
        "enum": [
          "ALL",
          "TAXABLE",
          "TAX_FREE",
          "NONE"
        ]
      },
      "OrganizationDriveRateLevel": {
        "description": "`driveRateLevel`'s members (travel's setting).",
        "type": "string",
        "enum": [
          "TAXFREE",
          "TAXABLE",
          "CUSTOM"
        ]
      },
      "OrganizationDetail": {
        "description": "An organization (`GET /organizations/{id}`): its settings and the parts above.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "handle": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "legalName": {
            "type": [
              "string",
              "null"
            ]
          },
          "orgNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "isPersonal": {
            "type": "boolean"
          },
          "enterpriseId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "iconStorageKey": {
            "description": "The logo's storage key (not a URL; `iconUrl` reads it).",
            "type": [
              "string",
              "null"
            ]
          },
          "iconUrl": {
            "description": "The logo: a signed read URL valid 10 to 15 minutes (`identity_api::avatars`, one\n URL per five-minute window); `null` without a logo.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "departmentDisplayNames": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "$ref": "#/components/schemas/DisplayNames"
            }
          },
          "projectDisplayNames": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "$ref": "#/components/schemas/DisplayNames"
            }
          },
          "isCategoryRequired": {
            "type": "boolean"
          },
          "isDepartmentRequired": {
            "type": "boolean"
          },
          "isProjectRequired": {
            "type": "boolean"
          },
          "collectAccountNumber": {
            "type": "boolean"
          },
          "invoiceEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "taxableInvoiceEmail": {
            "description": "Where claims with a trekkpliktig amount are e-mailed instead of `invoiceEmail`.",
            "type": [
              "string",
              "null"
            ]
          },
          "invoiceSellerOrgNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoiceSellerLegalName": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "postalCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "contactPerson": {
            "type": [
              "string",
              "null"
            ]
          },
          "contactPersonEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "isVatRegistered": {
            "type": "boolean"
          },
          "invoiceAsEhf": {
            "type": "boolean"
          },
          "paymentTerms": {
            "type": "integer",
            "format": "int32"
          },
          "isApprovalFlowActive": {
            "type": "boolean"
          },
          "isTravelActive": {
            "type": "boolean"
          },
          "isTravelRequestActive": {
            "type": "boolean"
          },
          "driveExtras": {
            "$ref": "#/components/schemas/DriveExtras"
          },
          "isDriveActive": {
            "type": "boolean"
          },
          "isOnboardingCompleted": {
            "type": "boolean"
          },
          "isAltCategoriesEnabled": {
            "type": "boolean"
          },
          "useFlowBasedReviews": {
            "description": "The column `usePolicyBasedReviews` (Nest's name on the wire).",
            "type": "boolean"
          },
          "amendPolicy": {
            "description": "reports' amend policy, by tier (`null`: the defaults).",
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "$ref": "#/components/schemas/AmendTierPolicy"
            }
          },
          "approvalDistinctDeciders": {
            "description": "The approval engine's distinct-deciders rule: one person decides at most one\n satisfied step of a submission.",
            "type": "boolean"
          },
          "poCustomerId": {
            "type": [
              "string",
              "null"
            ]
          },
          "driveTaxFreeAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "driveTaxableAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "tollAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "passengerAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "driveTrailerAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "driveOffroadAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "perDiemTaxFreeAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "perDiemTaxFreeNoOvernightAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "perDiemTaxFreeHotelAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "perDiemTaxFreeWithCookingAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "perDiemTaxFreeWithoutCookingAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "perDiemTaxableAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "perDiemAbroadCompensationAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "perDiemNightSupplementAccountingCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "travelRateLevel": {
            "description": "`OrganizationTravelRateLevel`.",
            "type": "string"
          },
          "driveRateLevel": {
            "description": "`OrganizationDriveRateLevel`.",
            "type": "string"
          },
          "perDiemAbroadCompensation": {
            "type": "boolean"
          },
          "perDiemNightSupplement": {
            "type": "boolean"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "fingerprintEnabled": {
            "type": "boolean"
          },
          "isAgentEnabled": {
            "type": "boolean"
          },
          "apiProvisioningEnabled": {
            "type": "boolean"
          },
          "baseCurrency": {
            "type": "string"
          },
          "inboxEmailTemplate": {
            "type": [
              "string",
              "null"
            ]
          },
          "inboxLockForcedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "enterprise": {
            "description": "A summary-level enterprise (konsern; SPINE 26.1): its identity, the fields every caller\n that sees the enterprise at all may see (a SELECTED seat included). Built only by\n identity's `org::enterprise::enterprise_summary`.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "displayName": {
                "type": "string"
              },
              "legalName": {
                "type": "string"
              },
              "iconStorageKey": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "displayName",
              "legalName",
              "iconStorageKey"
            ]
          },
          "usage": {
            "description": "billing's usage in the current window (`null`: billing knows nothing of the org).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "usersCount": {
                "type": "integer",
                "format": "int32"
              },
              "reportsCount": {
                "type": "integer",
                "format": "int32"
              },
              "expensesCount": {
                "type": "integer",
                "format": "int32"
              },
              "drivesCount": {
                "type": "integer",
                "format": "int32"
              },
              "travelsCount": {
                "type": "integer",
                "format": "int32"
              },
              "categoriesCount": {
                "type": "integer",
                "format": "int32"
              },
              "departmentsCount": {
                "type": "integer",
                "format": "int32"
              },
              "projectsCount": {
                "type": "integer",
                "format": "int32"
              },
              "periodStart": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "organizationId",
              "usersCount",
              "reportsCount",
              "expensesCount",
              "drivesCount",
              "travelsCount",
              "categoriesCount",
              "departmentsCount",
              "projectsCount",
              "periodStart",
              "createdAt",
              "updatedAt"
            ]
          },
          "integrations": {
            "description": "The org's integrations (`[]` for a caller who may not read them).",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegrationSummary"
            }
          },
          "invitations": {
            "description": "The live invitations (`[]` for a caller who may not invite).",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrganizationInvitation"
            }
          },
          "subscription": {
            "description": "billing's summary of the org's subscription; `null` when it has none or the caller\n may not read every org's subscription (`read all`: the org's own admins read it at\n `GET /subscriptions/organization/{organizationId}`).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "recurringInterval": {
                "description": "`MONTH`, `QUARTER` or `YEAR`.",
                "type": "string"
              },
              "subscriptionStatus": {
                "description": "`active`, `trialing`, `past_due`, `suspended` or `canceled` (`null` on a legacy row\n that never had one).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "trialPeriodEnd": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "cancelAtPeriodEnd": {
                "type": "boolean"
              },
              "billingPeriodStart": {
                "type": "string",
                "format": "date-time"
              },
              "billingPeriodEnd": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "canceledAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "paidSeats": {
                "type": "integer",
                "format": "int32"
              },
              "items": {
                "description": "The lines, by id.",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SubscriptionItemSummary"
                }
              }
            },
            "required": [
              "id",
              "organizationId",
              "recurringInterval",
              "subscriptionStatus",
              "trialPeriodEnd",
              "cancelAtPeriodEnd",
              "billingPeriodStart",
              "billingPeriodEnd",
              "canceledAt",
              "paidSeats",
              "items"
            ]
          }
        },
        "required": [
          "id",
          "handle",
          "displayName",
          "legalName",
          "orgNumber",
          "isPersonal",
          "enterpriseId",
          "iconStorageKey",
          "iconUrl",
          "createdAt",
          "updatedAt",
          "departmentDisplayNames",
          "projectDisplayNames",
          "isCategoryRequired",
          "isDepartmentRequired",
          "isProjectRequired",
          "collectAccountNumber",
          "invoiceEmail",
          "taxableInvoiceEmail",
          "invoiceSellerOrgNumber",
          "invoiceSellerLegalName",
          "address",
          "postalCode",
          "region",
          "contactPerson",
          "contactPersonEmail",
          "isVatRegistered",
          "invoiceAsEhf",
          "paymentTerms",
          "isApprovalFlowActive",
          "isTravelActive",
          "isTravelRequestActive",
          "driveExtras",
          "isDriveActive",
          "isOnboardingCompleted",
          "isAltCategoriesEnabled",
          "useFlowBasedReviews",
          "amendPolicy",
          "approvalDistinctDeciders",
          "poCustomerId",
          "driveTaxFreeAccountingCode",
          "driveTaxableAccountingCode",
          "tollAccountingCode",
          "passengerAccountingCode",
          "driveTrailerAccountingCode",
          "driveOffroadAccountingCode",
          "perDiemTaxFreeAccountingCode",
          "perDiemTaxFreeNoOvernightAccountingCode",
          "perDiemTaxFreeHotelAccountingCode",
          "perDiemTaxFreeWithCookingAccountingCode",
          "perDiemTaxFreeWithoutCookingAccountingCode",
          "perDiemTaxableAccountingCode",
          "perDiemAbroadCompensationAccountingCode",
          "perDiemNightSupplementAccountingCode",
          "travelRateLevel",
          "driveRateLevel",
          "perDiemAbroadCompensation",
          "perDiemNightSupplement",
          "notes",
          "fingerprintEnabled",
          "isAgentEnabled",
          "apiProvisioningEnabled",
          "baseCurrency",
          "inboxEmailTemplate",
          "inboxLockForcedAt",
          "enterprise",
          "usage",
          "integrations",
          "invitations",
          "subscription"
        ]
      },
      "DriveExtras": {
        "description": "Which drive extras the org offers.",
        "type": "object",
        "properties": {
          "offroad": {
            "type": "boolean",
            "default": true
          },
          "trailer": {
            "type": "boolean",
            "default": true
          },
          "passengers": {
            "type": "boolean",
            "default": true
          }
        },
        "required": [
          "offroad",
          "trailer",
          "passengers"
        ]
      },
      "OrganizationInvitation": {
        "description": "An org's live invitation (owned by the org; its detail's `invitations`).",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "token": {
            "type": "string"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "phoneNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "description": "The `AccountRole` the invitee joins with.",
            "type": "integer",
            "format": "int32"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "invitedCount": {
            "description": "How many may redeem it (`null`: unlimited).",
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "redeemedCount": {
            "type": "integer",
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdByUserId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "revokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "departmentIds": {
            "description": "The ids of `departments` (SPINE 26.12.2: a relation is its ids).",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "departments": {
            "description": "The live departments the invitee joins, by id.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DepartmentSummary"
            }
          }
        },
        "required": [
          "id",
          "token",
          "email",
          "phoneNumber",
          "role",
          "expiresAt",
          "invitedCount",
          "redeemedCount",
          "createdAt",
          "createdByUserId",
          "revokedAt",
          "departmentIds",
          "departments"
        ]
      },
      "ListPage_Permission": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Permission"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "Permission": {
        "description": "A permission of the platform's catalogue (a value object).",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "key": {
            "type": "string"
          },
          "action": {
            "description": "`PermissionAction` (`manage`, `read`, `create`, …).",
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "conditions": {
            "description": "The CASL conditions document, as stored."
          },
          "fields": {
            "description": "The CASL field list, as stored."
          },
          "inverted": {
            "type": "boolean"
          },
          "area": {
            "description": "The grouping a permission picker shows (`reports`, `invoices`, `projects`,\n `departments`, `categories`, `members`, `payout`, `organization`, …; `undeclared`\n for a key the API does not declare). SPINE 26.12.5, `authz::catalog`.",
            "type": "string"
          },
          "level": {
            "description": "`read` (READ, READ_ALL) or `write`.",
            "$ref": "#/components/schemas/PermissionLevel"
          },
          "sensitive": {
            "description": "Payout details, member writes, or other personal data beyond names (information for\n the picker; it limits no grant).",
            "type": "boolean"
          },
          "serviceAccountAssignable": {
            "description": "Whether a service account may hold it (never: role assignment, ownership transfer,\n service-account and token management, a person's own objects, anything outside one\n org).",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "key",
          "action",
          "subject",
          "conditions",
          "fields",
          "inverted",
          "description",
          "area",
          "level",
          "sensitive",
          "serviceAccountAssignable"
        ]
      },
      "PermissionLevel": {
        "description": "A permission's level (`authz::catalog::Level`).",
        "type": "string",
        "enum": [
          "read",
          "write"
        ],
        "x-enum-open": true
      },
      "ListPage_RoleListItem": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoleListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "RoleListItem": {
        "description": "A role in a list (an org's custom roles, the SYSTEM catalogue): its summary fields and\n its permissions.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "$ref": "#/components/schemas/RoleType"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/Scope"
          },
          "organizationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "parentSystemRoleId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "rolePermissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RolePermission"
            }
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "scope",
          "type",
          "organizationId",
          "parentSystemRoleId",
          "createdAt",
          "updatedAt",
          "rolePermissions"
        ]
      },
      "RolePermission": {
        "description": "A permission a role holds (owned by the role).",
        "type": "object",
        "properties": {
          "permissionId": {
            "type": "string",
            "format": "uuid"
          },
          "permission": {
            "$ref": "#/components/schemas/Permission"
          }
        },
        "required": [
          "permissionId",
          "permission"
        ]
      },
      "CreateRoleDto": {
        "description": "`CreateRoleDto`.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "scope": {
            "$ref": "#/components/schemas/Scope"
          },
          "organizationId": {
            "type": "string"
          },
          "permissionIds": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "parentSystemRoleId": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "name",
          "scope",
          "organizationId"
        ]
      },
      "ListPage_MemberRole": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemberRole"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "MemberRole": {
        "description": "A role a member can hold (a value: a system tier or one of the org's custom roles).",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "description": "`SYSTEM` (a tier) or `CUSTOM` (the org's own).",
            "$ref": "#/components/schemas/RoleType"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "description": "The base role a member holding it gets (`accounts.role`: 0 OWNER … 3 USER): a\n tier's own, a custom role's parent's (USER without an account-tier parent).",
            "type": "integer",
            "format": "int32"
          },
          "parentSystemRoleId": {
            "description": "A custom role's parent system role; `null` for a tier (and a custom role without\n one).",
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "assignable": {
            "description": "Whether the caller may give it to a member (`PATCH /accounts/{id}`: `role` for a\n tier, `customRoleId` for a custom role), by the same rules the write holds them\n to: no role above the caller's own (a custom role at the tier it acts at, OWNER\n with an owner-only permission), and a custom role only when the caller holds every\n permission it carries in the org (platform operators exempt). A member never\n changes their own custom role, whatever this says.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "type",
          "role",
          "parentSystemRoleId",
          "assignable"
        ]
      },
      "RoleDetail": {
        "description": "A custom role (`GET /roles/{id}`): the list row and its parent SYSTEM role.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "$ref": "#/components/schemas/RoleType"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/Scope"
          },
          "organizationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "parentSystemRoleId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "rolePermissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RolePermission"
            }
          },
          "parentSystemRole": {
            "description": "A role as writes answer it and other aggregates embed it (depth 0).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "$ref": "#/components/schemas/RoleType"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "scope": {
                "$ref": "#/components/schemas/Scope"
              },
              "organizationId": {
                "description": "The org of a CUSTOM role; `null` for a SYSTEM role.",
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "parentSystemRoleId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "name",
              "description",
              "scope",
              "type",
              "organizationId",
              "parentSystemRoleId",
              "createdAt",
              "updatedAt"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "scope",
          "type",
          "organizationId",
          "parentSystemRoleId",
          "createdAt",
          "updatedAt",
          "rolePermissions",
          "parentSystemRole"
        ]
      },
      "UpdateRoleDto": {
        "description": "`UpdateRoleDto`: the create's fields but `organizationId` and `scope`, all optional.",
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "permissionIds": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "parentSystemRoleId": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "ListPage_RoleAssignee": {
        "description": "Every list route's answer: `{ items, hasMore, nextCursor?, total? }`.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoleAssignee"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "RoleAssignee": {
        "description": "One assignment of a role (a value of the role's assignment plane).",
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "scopeType": {
            "description": "`RoleScope` of the assignment.",
            "type": "string"
          },
          "scopeId": {
            "description": "The scope's id (`global` for a GLOBAL assignment).",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "userId",
          "scopeType",
          "scopeId",
          "createdAt"
        ]
      },
      "ConnectUsersToRoleDto": {
        "description": "`ConnectUsersToRoleDto`: a non-empty list of distinct ids.",
        "type": "object",
        "properties": {
          "userIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1
          }
        },
        "required": [
          "userIds"
        ]
      },
      "RoleAssignmentResult": {
        "description": "`{succeeded, failed}`.",
        "type": "object",
        "properties": {
          "succeeded": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "failed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AssignmentFailure"
            }
          }
        },
        "required": [
          "succeeded",
          "failed"
        ]
      },
      "AssignmentFailure": {
        "description": "One user the assignment could not write: the reason as a registry code (`user_not_found`,\n `user_blocked`, …; a framework code for a fault), never text.",
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "userId",
          "error"
        ]
      },
      "ListPage_AccountListItem": {
        "description": "The envelope of a list whose item declares relations (SPINE 26.12.2): [`ListPage`]'s\n members and the side-loads, `{ items, hasMore, nextCursor?, total?, included? }`. Its\n schema keeps `ListPage`'s name: a route answers one or the other for an item, never\n both.",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountListItem"
            }
          },
          "hasMore": {
            "description": "Whether more rows follow this page.",
            "type": "boolean"
          },
          "nextCursor": {
            "description": "The `cursor` of the next page; present when more rows follow.",
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "description": "Every match of the filter; sent only with `count=true`.",
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "included": {
            "description": "The side-loaded resources by type (`include=`); absent when nothing was asked for.",
            "$ref": "#/components/schemas/AccountIncluded"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "AccountListItem": {
        "description": "A membership in a list (`GET /accounts`; the caller's own in `GET /users/me`): every\n field is an [`AccountDetail`] field (SPINE 26.1 rule 5). The e-mail is not a filter\n (PII, SPINE 26.8); a removed membership is never listed.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "userId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "role": {
            "description": "The account role (Nest's integer `AccountRole`: 0 OWNER … 3 USER).",
            "type": "integer",
            "format": "int32"
          },
          "digest": {
            "type": "integer",
            "format": "int32"
          },
          "isNotificationsEnabled": {
            "type": "boolean"
          },
          "isBlocked": {
            "type": "boolean"
          },
          "email": {
            "description": "The account's contact e-mail (overrides the user's).",
            "type": [
              "string",
              "null"
            ]
          },
          "employeeNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalIdSource": {
            "description": "Who set an account's `externalId` (`ExternalIdSource`).",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "SCIM",
              "API",
              "SSO_CLAIM",
              null
            ],
            "x-enum-open": true
          },
          "billingType": {
            "description": "`AccountBillingType`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "PERIODIC",
              "PER_REPORT",
              null
            ],
            "x-enum-open": true
          },
          "baseCurrency": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "user": {
            "description": "A summary-level user (SPINE 26.1: depth 0; a user as other people see it): the names,\n the e-mail and the avatar, never the phone or the address (a membership's detail adds\n them for those who may read it: identity's `AccountDetailUser`). Built only by\n [`user_summary`] (its loaders [`user_summaries_on`], [`account_summaries_on`]).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "givenName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "familyName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fullName": {
                "description": "`users.fullName` (null when either name part is).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "profilePictureUrl": {
                "description": "The profile picture: a signed read URL valid 10 to 15 minutes\n ([`crate::avatars`]); `null` without a picture (and in event payloads).",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "givenName",
              "familyName",
              "fullName",
              "email",
              "profilePictureUrl"
            ]
          },
          "organization": {
            "description": "A summary-level organization (SPINE 26.1; RESPONSE-SHAPES section 3): what every\n embed and every organization write answers. `handle` is the org's URL identity (the\n web apps route by it). Built only by identity's `org::read::organization_summary`.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "handle": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              },
              "legalName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "orgNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "isPersonal": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "handle",
              "displayName",
              "legalName",
              "orgNumber",
              "isPersonal"
            ]
          },
          "managerAccountIds": {
            "description": "The ids of `managerAccounts` (SPINE 26.12.2: a relation is its ids).",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "managerAccounts": {
            "description": "The live, unblocked accounts this one reports to.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountSummary"
            }
          },
          "subordinateAccountIds": {
            "description": "The ids of `subordinateAccounts` (SPINE 26.12.2: a relation is its ids).",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "subordinateAccounts": {
            "description": "The accounts that report to this one.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountSummary"
            }
          },
          "departmentAssignments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountDepartmentAssignment"
            }
          },
          "projectAssignments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountProjectAssignment"
            }
          },
          "customRole": {
            "description": "The member's custom role in the org, `null` for none (its tier is `role`).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ]
          }
        },
        "required": [
          "id",
          "organizationId",
          "userId",
          "role",
          "digest",
          "isNotificationsEnabled",
          "isBlocked",
          "email",
          "employeeNumber",
          "externalId",
          "externalIdSource",
          "billingType",
          "baseCurrency",
          "createdBy",
          "createdAt",
          "updatedAt",
          "user",
          "organization",
          "managerAccountIds",
          "managerAccounts",
          "subordinateAccountIds",
          "subordinateAccounts",
          "departmentAssignments",
          "projectAssignments",
          "customRole"
        ]
      },
      "AccountIncluded": {
        "description": "The side-loaded resources (SPINE 26.12.2): one array per type, each resource once, ordered by id",
        "type": "object",
        "properties": {
          "organization": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrganizationDetail"
            }
          },
          "payout": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Payout"
            }
          }
        },
        "additionalProperties": false
      },
      "UiEventScope": {
        "description": "`UiEventScope`: what one connection subscribes to.",
        "type": "object",
        "properties": {
          "resourceType": {
            "description": "`UiEventResourceType`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "report",
              "organization",
              "department",
              "expense",
              "user",
              "account",
              "invoice",
              "operation",
              null
            ],
            "x-enum-descriptions": [
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "An operation's progress and end (SPINE 26.10 item 6), for its creator only."
            ]
          },
          "resourceId": {
            "type": [
              "string",
              "null"
            ]
          },
          "organizationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "eventType": {
            "description": "`UiEventType`.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "created",
              "updated",
              "deleted",
              "submitted",
              "approved",
              "rejected",
              "reviewed",
              "published",
              "stale",
              "progress",
              "finished",
              "changed",
              null
            ],
            "x-enum-descriptions": [
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "",
              "An operation started or advanced (`operation.progress`).",
              "An operation ended: succeeded, failed or cancelled (`operation.finished`).",
              "A write moved a report's version (`report.changed`, SPINE 26.10 item 3): open\n screens refresh or show who changed what ([`UiChange`])."
            ]
          }
        }
      },
      "UiEventResourceType": {
        "description": "`UiEventResourceType`.",
        "type": "string",
        "enum": [
          "report",
          "organization",
          "department",
          "expense",
          "user",
          "account",
          "invoice",
          "operation"
        ],
        "x-enum-descriptions": [
          "",
          "",
          "",
          "",
          "",
          "",
          "",
          "An operation's progress and end (SPINE 26.10 item 6), for its creator only."
        ],
        "x-enum-open": true
      },
      "UiEventType": {
        "description": "`UiEventType`.",
        "type": "string",
        "enum": [
          "created",
          "updated",
          "deleted",
          "submitted",
          "approved",
          "rejected",
          "reviewed",
          "published",
          "stale",
          "progress",
          "finished",
          "changed"
        ],
        "x-enum-descriptions": [
          "",
          "",
          "",
          "",
          "",
          "",
          "",
          "",
          "",
          "An operation started or advanced (`operation.progress`).",
          "An operation ended: succeeded, failed or cancelled (`operation.finished`).",
          "A write moved a report's version (`report.changed`, SPINE 26.10 item 3): open\n screens refresh or show who changed what ([`UiChange`])."
        ],
        "x-enum-open": true
      },
      "UiStreamEvent": {
        "description": "One event of `GET /sse/events` (each SSE `data`), told apart by `type`: the stream's\n `connected` greeting, a `heartbeat` (every 25 s, keeps proxies from closing the\n stream), or a `resource` event (a [`ClientUiEvent`]: what changed, to refetch).",
        "oneOf": [
          {
            "description": "The first event of every stream.",
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "connected"
                ],
                "x-enum-open": true
              },
              "ts": {
                "description": "Epoch milliseconds.",
                "type": "integer",
                "format": "int64"
              }
            },
            "required": [
              "type",
              "ts"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "heartbeat"
                ],
                "x-enum-open": true
              },
              "ts": {
                "description": "Epoch milliseconds.",
                "type": "integer",
                "format": "int64"
              }
            },
            "required": [
              "type",
              "ts"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "resource"
                ],
                "x-enum-open": true
              }
            },
            "$ref": "#/components/schemas/ClientUiEvent",
            "required": [
              "type"
            ]
          }
        ]
      },
      "ClientUiEvent": {
        "description": "`ClientUiEvent`: what a client sees (the filter stripped).",
        "type": "object",
        "properties": {
          "resourceType": {
            "$ref": "#/components/schemas/UiEventResourceType"
          },
          "eventType": {
            "$ref": "#/components/schemas/UiEventType"
          },
          "resourceId": {
            "type": "string"
          },
          "timestamp": {
            "type": "integer",
            "format": "int64"
          },
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "reportKind": {
            "type": [
              "string",
              "null"
            ]
          },
          "operation": {
            "description": "An operation event's state: what a client shows without reading the operation.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "kind": {
                "type": "string"
              },
              "status": {
                "description": "`PENDING | RUNNING | SUCCEEDED | FAILED | CANCELLED`.",
                "type": "string"
              },
              "done": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              },
              "total": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              }
            },
            "required": [
              "kind",
              "status"
            ]
          },
          "change": {
            "description": "What a `report.changed` event carries (SPINE 26.10 item 3, live awareness).",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "version": {
                "description": "The report's version after the write.",
                "type": "integer",
                "format": "int64"
              },
              "changedBy": {
                "description": "The writer's `AccountSummary` (`{ id, userId, fullName }`); null for a service or\n the system.",
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": true
              },
              "changedByAccountId": {
                "description": "`changedBy`'s account id (SPINE 26.12.2: a relation is its id).",
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "default": null
              },
              "fields": {
                "description": "JSON Pointers into the report aggregate of the fields the write changed\n (`/title`, `/expenses/{id}/amount`); a removed row is its own pointer; empty when\n the write names no field (a create, a receipt, a recompute).",
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "version",
              "changedBy",
              "changedByAccountId",
              "fields"
            ]
          }
        },
        "required": [
          "resourceType",
          "eventType",
          "resourceId",
          "timestamp"
        ]
      },
      "EditConflict": {
        "type": "object",
        "description": "One field a concurrent change overlapped.",
        "required": [
          "field",
          "base",
          "yours",
          "theirs",
          "changedAt"
        ],
        "properties": {
          "field": {
            "type": "string",
            "description": "A JSON Pointer to the field (`/amount`)."
          },
          "base": {
            "description": "The value at the request's base version (null when no fact holds it)."
          },
          "yours": {
            "description": "What this request sent."
          },
          "theirs": {
            "description": "The row's current value."
          },
          "changedBy": {
            "description": "Who changed it since the base (an account summary; null for a service or the system)."
          },
          "changedByAccountId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "`changedBy`'s id (null for a service or the system)."
          },
          "changedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "EditConflictProblem": {
        "description": "409 `edit_conflict`: the code's `errors[]` entry carries `params.conflicts[]`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Problem"
          },
          {
            "type": "object",
            "properties": {
              "errors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "params": {
                      "type": "object",
                      "properties": {
                        "conflicts": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/EditConflict"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      }
    }
  },
  "externalDocs": {
    "description": "Utleggsappen API documentation",
    "url": "https://docs.utlegg.app"
  }
}
