{
  "openapi": "3.0.1",
  "info": {
    "title": "ByLayer API",
    "description": "Set up and run ByLayer's CAD tools (Standardizer, Auto Fill, Plotter, Product Configurator, Report Generator) and manage the sources, integrations and files they use.\n\nAuthenticate with an API key from the portal (Account Settings → API Key): `Authorization: Bearer byl_live_…`. A key acts as the person who made it and never does more than their role allows; each call also needs the key to have the scope it lists.\n\nErrors are `application/problem+json` with a stable `code`; validation errors list each field with its `path`. Calls that start work on drawings return a job to poll.",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.bylayer.ai"
    }
  ],
  "paths": {
    "/v1/auto-fill/mappings/{mappingId}/input-folder": {
      "put": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Watch a folder of a connected source: each data file dropped in it fills a drawing on its own,\r\ncharged per drawing, once the mapping is Active and runAutomatically is on. Not for a CRM\r\nmapping: it starts from its CRM (PUT .../crm-trigger).",
        "description": "Scope: `setup and run`.",
        "operationId": "AutoFillSetInputFolder",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetMappingInputFolderBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetMappingInputFolderBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetMappingInputFolderBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup",
              "run"
            ]
          }
        ],
        "x-required-scope": "setup and run"
      },
      "delete": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Stops watching the input folder.",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillClearInputFolder",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/input-folder/run-automatically": {
      "put": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Turns automatic runs of the input folder on or off, keeping the folder. Turning them on needs the run scope as well.",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillSetRunAutomatically",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetRunAutomaticallyBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetRunAutomaticallyBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetRunAutomaticallyBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/crm-trigger/options": {
      "get": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Whether a CRM mapping's CRM can start runs, and the yes/no fields it can start from.",
        "description": "Scope: `read`.",
        "operationId": "AutoFillGetCrmTriggerOptions",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicCrmTriggerOptions"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicCrmTriggerOptions"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicCrmTriggerOptions"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/crm-trigger": {
      "put": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Start a run whenever a record of the mapping's CRM data has this yes/no field on: ByLayer asks\r\nthe CRM every 30 seconds, runs a ticked record once its values have stopped changing, and runs\r\nit again only when a value the mapping reads changes. Nothing is written to the CRM. Charged\r\nper drawing, once the mapping is Active and runAutomatically is on.",
        "description": "Scope: `setup and run`.",
        "operationId": "AutoFillSetCrmTrigger",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetMappingCrmTriggerBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetMappingCrmTriggerBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetMappingCrmTriggerBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup",
              "run"
            ]
          }
        ],
        "x-required-scope": "setup and run"
      },
      "delete": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Stops starting runs from the CRM.",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillClearCrmTrigger",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/output-folder": {
      "put": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Where the filled drawings are saved: a folder on the input folder's source, and whether runs save there (Folder) or only offer downloads (Download). Empty clears it.\r\nA CRM mapping has no input folder: it names the connected source too (sourceId).",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillSetOutputFolder",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetMappingOutputFolderBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetMappingOutputFolderBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetMappingOutputFolderBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/auto-fill/reference": {
      "get": {
        "tags": [
          "AutoFill"
        ],
        "summary": "How to write a mapping document: its JSON Schema, the values a setup takes (source kinds,\r\noutput modes, value types, transforms, DWG versions), the kinds of places a template scan\r\nfinds, and the steps to follow. Read it before saving a setup.",
        "description": "Scope: `read`.",
        "operationId": "AutoFillReference",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicAutoFillReference"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicAutoFillReference"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicAutoFillReference"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/auto-fill/mappings": {
      "get": {
        "tags": [
          "AutoFill"
        ],
        "summary": "The mappings of the key's organization (or personal account).",
        "description": "Scope: `read`.",
        "operationId": "AutoFillList",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "Only Draft, Active or Archived ones.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicMapping"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicMapping"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicMapping"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      },
      "post": {
        "tags": [
          "AutoFill"
        ],
        "summary": "A new mapping, in Draft. In an organization, owners and admins set mappings up.",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillCreate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CreateMappingBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CreateMappingBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CreateMappingBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}": {
      "get": {
        "tags": [
          "AutoFill"
        ],
        "summary": "One mapping, with its mapping document, watched folder and output folder.",
        "description": "Scope: `read`.",
        "operationId": "AutoFillGet",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      },
      "patch": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Renames a mapping or changes its description.",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillUpdate",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UpdateSetupBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UpdateSetupBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UpdateSetupBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      },
      "delete": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Deletes a mapping.",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillDelete",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "204": {
            "description": "No Content"
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/auto-fill/mappings/from-example": {
      "post": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Auto Fill's example mapping (a title block filled from a workbook), set up in the key's\r\norganization: made once, then the same one comes back. A good model to read before writing a mapping.",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillFromExample",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/setup": {
      "put": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Saves the mapping's setup: the mapping document, where values come from, and the output.\r\nFields left out keep their current values. With publish true the mapping also becomes Active\r\nwhen its checks pass (POST .../setup/validate shows them first).",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillSaveSetup",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveMappingSetupBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveMappingSetupBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveMappingSetupBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "409": {
            "description": "Conflict"
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/setup/validate": {
      "post": {
        "tags": [
          "AutoFill"
        ],
        "summary": "A dry run of a setup save: every check the portal's Validate step shows (Pass, Warning or\r\nError) and a preview of the values. Fields left out use the mapping's current ones. Nothing is saved.",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillValidateSetup",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveMappingSetupBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveMappingSetupBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveMappingSetupBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMappingValidation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMappingValidation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMappingValidation"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/publish": {
      "post": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Publishes a Draft mapping (Active): it can run, and its watched folder starts.",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillPublish",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/archive": {
      "post": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Archives a mapping: it no longer runs, and its watched folder stops.",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillArchive",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/restore": {
      "post": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Restores an archived mapping as a Draft, to check and publish again.",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillRestore",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/versions": {
      "get": {
        "tags": [
          "AutoFill"
        ],
        "summary": "The mapping's saved versions, newest first. A mapping keeps its newest 100 versions.",
        "description": "Scope: `read`.",
        "operationId": "AutoFillVersions",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicMappingVersion"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicMappingVersion"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicMappingVersion"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/versions/{version}": {
      "get": {
        "tags": [
          "AutoFill"
        ],
        "summary": "One version: its mapping document and what changed against the version before.",
        "description": "Scope: `read`.",
        "operationId": "AutoFillVersion",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMappingVersion"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMappingVersion"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMappingVersion"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/export": {
      "get": {
        "tags": [
          "AutoFill"
        ],
        "summary": "The mapping's current setup as a portable file (the template drawing is not in it, only its fingerprint).",
        "description": "Scope: `read`.",
        "operationId": "AutoFillExport",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Modules.Tools.Application.DTOs.AutoFillExportDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Modules.Tools.Application.DTOs.AutoFillExportDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Modules.Tools.Application.DTOs.AutoFillExportDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/auto-fill/quick-fill/template": {
      "post": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Fill Manually, step 1: upload a template (multipart, one \"file\" part, .dwg); it is scanned by a\r\nfree run. Poll GET /v1/auto-fill/quick-fill/scans/{scan.runId}?includeSchema=true for its targets.",
        "description": "Scope: `run`.",
        "operationId": "AutoFillQuickFillTemplate",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicQuickFillTemplate"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicQuickFillTemplate"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicQuickFillTemplate"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "run"
            ]
          }
        ],
        "x-required-scope": "run"
      }
    },
    "/v1/auto-fill/quick-fill/template/from-file": {
      "post": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Fill Manually, step 1 with a drawing uploaded before (by file id).",
        "description": "Scope: `run`.",
        "operationId": "AutoFillQuickFillTemplateFromFile",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UseFileBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UseFileBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UseFileBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicQuickFillTemplate"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicQuickFillTemplate"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicQuickFillTemplate"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "run"
            ]
          }
        ],
        "x-required-scope": "run"
      }
    },
    "/v1/auto-fill/quick-fill/scans/{scanRunId}": {
      "get": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Fill Manually: the template's scan; with includeSchema=true, the target keys values can be put on.",
        "description": "Scope: `read`.",
        "operationId": "AutoFillQuickFillScan",
        "parameters": [
          {
            "name": "scanRunId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeSchema",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTemplateScan"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTemplateScan"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTemplateScan"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/auto-fill/quick-fill": {
      "post": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Fill Manually, step 2: one fill of the scanned template with typed values. Answers with the\r\nrun (202); the filled drawing is its file. Charged as one drawing; Idempotency-Key honoured.",
        "description": "Scope: `run`.",
        "operationId": "AutoFillQuickFill",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.QuickFillBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.QuickFillBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.QuickFillBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "run"
            ]
          }
        ],
        "x-required-scope": "run"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/runs": {
      "post": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Fills drawings from data files: in a folder of a connected source (source), or uploaded\r\nbefore (fileIds). One drawing per record; charged per drawing. Answers with the run (202):\r\npoll GET /v1/runs/{id}; the filled drawings are its files. Send an Idempotency-Key header to\r\nmake retrying safe.",
        "description": "Scope: `run`.",
        "operationId": "AutoFillStartRun",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartMappingRunBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartMappingRunBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartMappingRunBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              }
            }
          },
          "402": {
            "description": "Client Error"
          }
        },
        "security": [
          {
            "ApiKey": [
              "run"
            ]
          }
        ],
        "x-required-scope": "run"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/runs/upload": {
      "post": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Fills drawings from data files sent with the request (multipart \"files\" parts: workbooks for\r\nan Excel mapping, text files of record ids for a Crm one). Form fields: drawingFileId (when\r\nthe mapping fills drawings you provide), saveToOutputFolder. As the JSON run otherwise.\r\nOne file may be named with a \"fileName\" field, for callers that send bytes without a name.",
        "description": "Scope: `run`.",
        "operationId": "AutoFillStartRunFromUploads",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  },
                  "drawingFileId": {
                    "type": "integer",
                    "format": "int32"
                  },
                  "saveToOutputFolder": {
                    "type": "boolean"
                  },
                  "fileName": {
                    "type": "string"
                  }
                }
              },
              "encoding": {
                "files": {
                  "style": "form"
                },
                "drawingFileId": {
                  "style": "form"
                },
                "saveToOutputFolder": {
                  "style": "form"
                },
                "fileName": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "run"
            ]
          }
        ],
        "x-required-scope": "run"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/runs/crm": {
      "post": {
        "tags": [
          "AutoFill"
        ],
        "summary": "A Crm mapping's run of records by id: one drawing per record, values read from the CRM when it runs. As the file run otherwise.",
        "description": "Scope: `run`.",
        "operationId": "AutoFillStartCrmRun",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartCrmRunBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartCrmRunBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartCrmRunBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "run"
            ]
          }
        ],
        "x-required-scope": "run"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/runs/values": {
      "post": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Fills drawings from values sent with the request: one drawing per record, each record the\r\nvalues of the mapping's data fields by key (GET .../values-schema lists them). For every kind\r\nof mapping: the values stand in for what a workbook or the CRM would give, and a field left\r\nout keeps what the mapping fills by itself. Charged per drawing; answers with the run (202);\r\nIdempotency-Key honoured. drawingFileId and saveToOutputFolder as on the file run.",
        "description": "Scope: `run`.",
        "operationId": "AutoFillStartValuesRun",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartValuesRunBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartValuesRunBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartValuesRunBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "402": {
            "description": "Client Error"
          }
        },
        "security": [
          {
            "ApiKey": [
              "run"
            ]
          }
        ],
        "x-required-scope": "run"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/values-schema": {
      "get": {
        "tags": [
          "AutoFill"
        ],
        "summary": "The values a run from values takes (POST .../runs/values): the Active mapping's data fields,\r\nas a list and as a JSON Schema of one record's \"values\".",
        "description": "Scope: `read`.",
        "operationId": "AutoFillValuesSchema",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicValuesSchema"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicValuesSchema"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicValuesSchema"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/crm-records": {
      "get": {
        "tags": [
          "AutoFill"
        ],
        "summary": "A Crm mapping's table records, to pick ids for a run (\"Select from CRM\").",
        "description": "Scope: `read`.",
        "operationId": "AutoFillCrmRecords",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Only records whose id or name contains this.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicCrmRecords"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicCrmRecords"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicCrmRecords"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/crm-records/check": {
      "post": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Checks record ids against the CRM before a run: found or not, and how many mapped fields each fills. Nothing runs.",
        "description": "Scope: `read`.",
        "operationId": "AutoFillCheckCrmRecords",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CheckCrmRecordsBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CheckCrmRecordsBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CheckCrmRecordsBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicCrmRecordCheck"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicCrmRecordCheck"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicCrmRecordCheck"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/auto-fill/runs/{runId}": {
      "get": {
        "tags": [
          "AutoFill"
        ],
        "summary": "An Auto Fill run's results, as the portal's run page shows them: where its data came from,\r\neach drawing it made with the record it was filled from and every value written into it\r\n(field, location, value), the CRM record ids it left out because the CRM did not have them,\r\nand its warnings. Files fill in once the run has succeeded; 404 for a run that is not an\r\nAuto Fill (mapping runs and Fill Manually alike).",
        "description": "Scope: `read`.",
        "operationId": "AutoFillGetRun",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicAutoFillRunResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicAutoFillRunResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicAutoFillRunResult"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/template": {
      "put": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Uploads the template drawing (multipart, one \"file\" part, .dwg). Scan it next. Runs fill the\r\nnew drawing from the next save of the mapping (PUT .../setup).",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillUploadTemplate",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/template/from-file": {
      "put": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Uses a drawing uploaded before (by file id) as the template.",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillTemplateFromFile",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UseFileBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UseFileBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UseFileBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/template/sample": {
      "post": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Uses ByLayer's sample title block drawing as the template (\"Use a Sample Drawing\").",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillUseSampleTemplate",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/scan": {
      "post": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Scans the template: a free run that finds every place a value can land (attributes, texts,\r\ndrawing properties, dynamic block parameters…). Poll GET .../scan until it has succeeded.",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillStartScan",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartScanBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartScanBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartScanBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTemplateScan"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTemplateScan"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTemplateScan"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      },
      "get": {
        "tags": [
          "AutoFill"
        ],
        "summary": "The template's scan; with includeSchema=true, its targets: the keys bindings put values on.",
        "description": "Scope: `read`.",
        "operationId": "AutoFillGetScan",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeSchema",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTemplateScan"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTemplateScan"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTemplateScan"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/sample-workbook": {
      "put": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Uploads an Excel mapping's sample workbook (multipart, one \"file\" part, .xlsx or .xls): cells are picked from it and values previewed with it.",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillUploadSampleWorkbook",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      },
      "get": {
        "tags": [
          "AutoFill"
        ],
        "summary": "The sample workbook's cells, sheet by sheet: what an Excel binding's sheetIndex and cell point at. The file itself is at /v1/files/{sampleWorkbook.fileId}/content.",
        "description": "Scope: `read`.",
        "operationId": "AutoFillGetSampleWorkbook",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWorkbook"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWorkbook"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWorkbook"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/sample-workbook/from-file": {
      "put": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Uses a workbook uploaded before (by file id) as the sample workbook.",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillSampleWorkbookFromFile",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UseFileBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UseFileBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UseFileBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/sample-workbook/generate": {
      "post": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Makes a sample workbook from the mapping's data fields (\"Use a Sample Workbook\") and saves it\r\nwith the setup. The body is a setup save (fields left out keep the mapping's current ones).",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillGenerateSampleWorkbook",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveMappingSetupBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveMappingSetupBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveMappingSetupBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMapping"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/learn": {
      "post": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Learn from my drawings: 5 to 20 filled-in copies of one template (multipart \"files\" parts,\r\n.dwg). The first becomes the mapping's template; a free run reads them all and proposes the\r\nplaces they differ in as fills. Poll GET .../learn/{runId}; add the fills with a setup save.",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillLearn",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  }
                }
              },
              "encoding": {
                "files": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMappingLearning"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMappingLearning"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMappingLearning"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/learn/from-files": {
      "post": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Learn from drawings uploaded before, by file id. As the multipart call; the first id becomes the template.",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillLearnFromFiles",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.PublicFileIds"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.PublicFileIds"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.PublicFileIds"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMappingLearning"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMappingLearning"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMappingLearning"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/learn/{runId}": {
      "get": {
        "tags": [
          "AutoFill"
        ],
        "summary": "The learning run: still reading, failed, or the fills its drawings came to.",
        "description": "Scope: `read`.",
        "operationId": "AutoFillGetLearn",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMappingLearning"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMappingLearning"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicMappingLearning"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/auto-fill/assistant": {
      "get": {
        "tags": [
          "AutoFill"
        ],
        "summary": "Whether the assistant is available and whether a request can be made this month (shared with the portal).",
        "description": "Scope: `read`.",
        "operationId": "AutoFillAssistant",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicAssistantStatus"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicAssistantStatus"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicAssistantStatus"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/auto-fill/mappings/{mappingId}/assist": {
      "post": {
        "tags": [
          "AutoFill"
        ],
        "summary": "The assistant: what should be filled where, in words, becomes proposed fills (data fields and\r\nbindings) on the scanned template. Nothing is saved: add the fills you want with a setup save.",
        "description": "Scope: `setup`.",
        "operationId": "AutoFillAssist",
        "parameters": [
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.DescribeMappingBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.DescribeMappingBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.DescribeMappingBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicProposalOfPublicProposedFill"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicProposalOfPublicProposedFill"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicProposalOfPublicProposedFill"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/cad-resources": {
      "get": {
        "tags": [
          "CadResources"
        ],
        "summary": "The organization's fonts and plot style tables.",
        "description": "Scope: `read`.",
        "operationId": "CadResourcesList",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Controllers.PublicCadResource"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Controllers.PublicCadResource"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Controllers.PublicCadResource"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      },
      "post": {
        "tags": [
          "CadResources"
        ],
        "summary": "Uploads a font or plot style table (multipart: one \"file\" part, and \"kind\" if the portal's upload asks for one). Owners and admins.",
        "description": "Scope: `setup`.",
        "operationId": "CadResourcesUpload",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string"
                  },
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "kind": {
                  "style": "form"
                },
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicCadResource"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicCadResource"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicCadResource"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/cad-resources/{resourceId}/content": {
      "get": {
        "tags": [
          "CadResources"
        ],
        "summary": "Downloads a font or plot style table.",
        "description": "Scope: `read`.",
        "operationId": "CadResourcesDownload",
        "parameters": [
          {
            "name": "resourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/cad-resources/{resourceId}": {
      "delete": {
        "tags": [
          "CadResources"
        ],
        "summary": "Deletes a font or plot style table. Owners and admins.",
        "description": "Scope: `setup`.",
        "operationId": "CadResourcesDelete",
        "parameters": [
          {
            "name": "resourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "204": {
            "description": "No Content"
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/connections/{connectionId}": {
      "get": {
        "tags": [
          "Connections"
        ],
        "summary": "Where a sign-in is: pending (the person has not finished), authorized (finish it as next\r\nsays), completed (with the source or integration), failed or expired. Poll every few\r\nseconds while pending.",
        "description": "Scope: `read`.",
        "operationId": "ConnectionsGet",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnectionStatus"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnectionStatus"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnectionStatus"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/connections/{connectionId}/complete": {
      "post": {
        "tags": [
          "Connections"
        ],
        "summary": "Finishes an authorized sign-in. A new source: with folders it is saved as a source at once;\r\nwithout, its account is opened as a session to browse (sessionId) and saved with\r\nPOST /v1/sources. SharePoint needs driveId. A reconnect: the source or watched folder takes\r\nthe new sign-in.",
        "description": "Scope: `connections`.",
        "operationId": "ConnectionsComplete",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CompleteConnectionBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CompleteConnectionBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CompleteConnectionBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnectionStatus"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnectionStatus"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnectionStatus"
                }
              }
            }
          },
          "409": {
            "description": "Conflict"
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/connections/{connectionId}/sites": {
      "get": {
        "tags": [
          "Connections"
        ],
        "summary": "SharePoint: the sites the signed-in account can open, to pick the document library from.",
        "description": "Scope: `connections`.",
        "operationId": "ConnectionsSites",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicSite"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicSite"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicSite"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/connections/{connectionId}/sites/{siteId}/drives": {
      "get": {
        "tags": [
          "Connections"
        ],
        "summary": "SharePoint: a site's document libraries; send the chosen one's id as driveId.",
        "description": "Scope: `connections`.",
        "operationId": "ConnectionsSiteDrives",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "siteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicSiteDrive"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicSiteDrive"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicSiteDrive"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/connectors": {
      "get": {
        "tags": [
          "Connectors"
        ],
        "summary": "The watched folders the key's person may see.",
        "description": "Scope: `read`.",
        "operationId": "ConnectorsList",
        "parameters": [
          {
            "name": "tool",
            "in": "query",
            "description": "Only this tool's: standardizer, auto-fill, plotter, product-configurator or report-generator.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicConnector"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicConnector"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicConnector"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/connectors/{connectorId}/ingestions": {
      "get": {
        "tags": [
          "Connectors"
        ],
        "summary": "The files the watched folder picked up, newest first, with the runs they started.",
        "description": "Scope: `read`.",
        "operationId": "ConnectorsIngestions",
        "parameters": [
          {
            "name": "connectorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "take",
            "in": "query",
            "description": "How many, 1 to 100 (default 20).",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicIngestion"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicIngestion"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicIngestion"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/connectors/{connectorId}/pause": {
      "post": {
        "tags": [
          "Connectors"
        ],
        "summary": "Pauses the watched folder. One of the person's own auto runs (organizationId null on its\r\nfolder link) is paused in their personal scope, as the portal's Folders page does.",
        "description": "Scope: `connections`.",
        "operationId": "ConnectorsPause",
        "parameters": [
          {
            "name": "connectorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnector"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnector"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnector"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/connectors/{connectorId}/resume": {
      "post": {
        "tags": [
          "Connectors"
        ],
        "summary": "Resumes the watched folder (in its link's scope, as pause).",
        "description": "Scope: `connections and run`.",
        "operationId": "ConnectorsResume",
        "parameters": [
          {
            "name": "connectorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnector"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnector"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnector"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections",
              "run"
            ]
          }
        ],
        "x-required-scope": "connections and run"
      }
    },
    "/v1/connectors/{connectorId}/result-folder": {
      "put": {
        "tags": [
          "Connectors"
        ],
        "summary": "Points the watched folder's results at another folder of the same account (in its link's scope, as pause).",
        "description": "Scope: `connections`.",
        "operationId": "ConnectorsSetResultFolder",
        "parameters": [
          {
            "name": "connectorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetResultFolderBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetResultFolderBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetResultFolderBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnector"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnector"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnector"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/connectors/{connectorId}/reconnect": {
      "post": {
        "tags": [
          "Connectors"
        ],
        "summary": "Reconnects a watched folder that has its own sign-in (made before sources existed): with\r\ncredentials at once, or a sign-in link for an OAuth provider. One on a source is reconnected\r\nthrough the source.",
        "description": "Scope: `connections`.",
        "operationId": "ConnectorsReconnect",
        "parameters": [
          {
            "name": "connectorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.ReconnectBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.ReconnectBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.ReconnectBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReconnect"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReconnect"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReconnect"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/connectors/{connectorId}": {
      "delete": {
        "tags": [
          "Connectors"
        ],
        "summary": "Removes the watched folder and its pick-up history. The folder itself is not touched.",
        "description": "Scope: `connections`.",
        "operationId": "ConnectorsDelete",
        "parameters": [
          {
            "name": "connectorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "204": {
            "description": "No Content"
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/files/{fileId}/content": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "Downloads a file. A member downloads the files they put in, the files their own runs made\r\nand the files a setup names (its template, its samples); owners and admins any of the\r\norganization's.",
        "description": "Scope: `read`.",
        "operationId": "FilesDownload",
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/files/{fileId}/links": {
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "A download link: an address that gives this file for ten minutes with no API key, to hand to\r\nsomeone who has none (a person an assistant shows the result to, a service that takes a URL).\r\nAnyone holding the link can download the file until it expires.",
        "description": "Scope: `read`.",
        "operationId": "FilesCreateLink",
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PublicFileLink"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicFileLink"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicFileLink"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/files/{fileId}": {
      "delete": {
        "tags": [
          "Files"
        ],
        "summary": "Deletes a file that was put in (an upload, a template no setup uses any more). 409 conflict\r\nwhile a setup or a run uses it: a run's files, those it made and those it was given, go when\r\nthe run is deleted. A member deletes their own files; owners and admins any of the organization's.",
        "description": "Scope: `setup or run`.",
        "operationId": "FilesDelete",
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found"
          },
          "409": {
            "description": "Conflict"
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup",
              "run"
            ]
          }
        ],
        "x-required-scope": "setup or run"
      },
      "get": {
        "tags": [
          "Uploads"
        ],
        "summary": "A file's details: name, size, type, and whether it was put in or made by a run.",
        "description": "Scope: `read`.",
        "operationId": "UploadsGet",
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicUploadedFile"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicUploadedFile"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicUploadedFile"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/folders": {
      "get": {
        "tags": [
          "Folders"
        ],
        "summary": "Every folder across the sources. A source that cannot be read right now contributes its\r\nfolders as saved, and the folders only an auto run names marked not accessible, instead\r\nof failing the list.",
        "description": "Scope: `read`.",
        "operationId": "FoldersList",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicFolder"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicFolder"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicFolder"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/integrations": {
      "get": {
        "tags": [
          "Integrations"
        ],
        "summary": "The CRMs that can be connected (only those set up), each with the integration connected to it, if any.",
        "description": "Scope: `read`.",
        "operationId": "IntegrationsList",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicIntegrationCard"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicIntegrationCard"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicIntegrationCard"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/integrations/connect": {
      "post": {
        "tags": [
          "Integrations"
        ],
        "summary": "Starts connecting a CRM: returns a connection whose connectUrl the account's owner opens to\r\nsign in (the CRM's sign-in or API key form). Poll GET /v1/connections/{id} until it is\r\ncompleted with the integration.",
        "description": "Scope: `connections`.",
        "operationId": "IntegrationsConnect",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.ConnectProviderBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.ConnectProviderBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.ConnectProviderBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnectionStatus"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnectionStatus"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnectionStatus"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/integrations/{integrationId}": {
      "get": {
        "tags": [
          "Integrations"
        ],
        "summary": "One integration, with the tables ByLayer may read in it.",
        "description": "Scope: `read`.",
        "operationId": "IntegrationsGet",
        "parameters": [
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicIntegration"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicIntegration"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicIntegration"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      },
      "delete": {
        "tags": [
          "Integrations"
        ],
        "summary": "Disconnects the integration; tools that fill from it stop reading it.",
        "description": "Scope: `connections`.",
        "operationId": "IntegrationsDelete",
        "parameters": [
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "204": {
            "description": "No Content"
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/integrations/{integrationId}/pause": {
      "post": {
        "tags": [
          "Integrations"
        ],
        "summary": "Pauses the integration: no tool reads it until it is resumed.",
        "description": "Scope: `connections`.",
        "operationId": "IntegrationsPause",
        "parameters": [
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicIntegration"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicIntegration"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicIntegration"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/integrations/{integrationId}/resume": {
      "post": {
        "tags": [
          "Integrations"
        ],
        "summary": "Resumes a paused integration.",
        "description": "Scope: `connections and run`.",
        "operationId": "IntegrationsResume",
        "parameters": [
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicIntegration"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicIntegration"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicIntegration"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections",
              "run"
            ]
          }
        ],
        "x-required-scope": "connections and run"
      }
    },
    "/v1/integrations/{integrationId}/reconnect": {
      "post": {
        "tags": [
          "Integrations"
        ],
        "summary": "Reconnects an integration the CRM no longer accepts: returns a connection whose connectUrl\r\nthe account's owner opens to sign in again. Its tables and fields stay as they are.",
        "description": "Scope: `connections`.",
        "operationId": "IntegrationsReconnect",
        "parameters": [
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnectionStatus"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnectionStatus"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnectionStatus"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/integrations/{integrationId}/apps": {
      "get": {
        "tags": [
          "Integrations"
        ],
        "summary": "The CRM's apps (bases, boards, workspaces), for CRMs that group tables (hasApps).",
        "description": "Scope: `connections`.",
        "operationId": "IntegrationsApps",
        "parameters": [
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicApp"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicApp"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicApp"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/integrations/{integrationId}/tables": {
      "get": {
        "tags": [
          "Integrations"
        ],
        "summary": "The CRM's tables (objects), in an app for CRMs that have them.",
        "description": "Scope: `connections`.",
        "operationId": "IntegrationsTables",
        "parameters": [
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "appId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicTable"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicTable"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicTable"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/integrations/{integrationId}/tables/{tableId}/fields": {
      "get": {
        "tags": [
          "Integrations"
        ],
        "summary": "A table's fields and the field its records are looked up by.",
        "description": "Scope: `connections`.",
        "operationId": "IntegrationsFields",
        "parameters": [
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "tableId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "appId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTableSchema"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTableSchema"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTableSchema"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/integrations/{integrationId}/access/{accessId}": {
      "get": {
        "tags": [
          "Integrations"
        ],
        "summary": "One table ByLayer may read, and which fields.",
        "description": "Scope: `read`.",
        "operationId": "IntegrationsGetAccess",
        "parameters": [
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "accessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicDataAccess"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicDataAccess"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicDataAccess"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      },
      "put": {
        "tags": [
          "Integrations"
        ],
        "summary": "Changes which table or fields a data access reads.",
        "description": "Scope: `connections`.",
        "operationId": "IntegrationsUpdateAccess",
        "parameters": [
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "accessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveDataAccessBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveDataAccessBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveDataAccessBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicDataAccess"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicDataAccess"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicDataAccess"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      },
      "delete": {
        "tags": [
          "Integrations"
        ],
        "summary": "Stops ByLayer reading the table.",
        "description": "Scope: `connections`.",
        "operationId": "IntegrationsDeleteAccess",
        "parameters": [
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "accessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "204": {
            "description": "No Content"
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/integrations/{integrationId}/access": {
      "post": {
        "tags": [
          "Integrations"
        ],
        "summary": "Lets ByLayer read a table: all its fields, or the selected ones.",
        "description": "Scope: `connections`.",
        "operationId": "IntegrationsCreateAccess",
        "parameters": [
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveDataAccessBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveDataAccessBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveDataAccessBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicDataAccess"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicDataAccess"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicDataAccess"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/integrations/{integrationId}/access/{accessId}/records": {
      "get": {
        "tags": [
          "Integrations"
        ],
        "summary": "The first records of a data access's table, as the CRM lists them, filtered by search; only\r\nfields ByLayer may read. Record ids are what Auto Fill runs take.",
        "description": "Scope: `read`.",
        "operationId": "IntegrationsRecords",
        "parameters": [
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "accessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Comma separated field ids to read; left out reads every allowed field.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "1 to 200 (default 50).",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRecordPage"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRecordPage"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRecordPage"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/integrations/{integrationId}/access/{accessId}/records/find": {
      "post": {
        "tags": [
          "Integrations"
        ],
        "summary": "Records by their key field values, in the order asked; ids the CRM does not have are left out.",
        "description": "Scope: `read`.",
        "operationId": "IntegrationsFindRecords",
        "parameters": [
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "accessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.FindRecordsBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.FindRecordsBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.FindRecordsBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicRecord"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicRecord"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicRecord"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/me": {
      "get": {
        "tags": [
          "Me"
        ],
        "summary": "The person the key acts as, their organization and role, the key's scopes, and the credits\r\nruns are paid from (null for a salesperson, and when they cannot be read just now; GET\r\n/v1/usage/account has the full account).",
        "description": "Scope: `read`.",
        "operationId": "MeGet",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.MeResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.MeResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.MeResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/organization": {
      "get": {
        "tags": [
          "Organization"
        ],
        "summary": "The organization, and the key's person's role in it. 404 no_organization for a personal account.",
        "description": "Scope: `read`.",
        "operationId": "OrganizationGet",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicOrganization"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicOrganization"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicOrganization"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/organization/members": {
      "get": {
        "tags": [
          "Organization"
        ],
        "summary": "The organization's members and their roles.",
        "description": "Scope: `read`.",
        "operationId": "OrganizationMembers",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Controllers.PublicMember"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Controllers.PublicMember"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Controllers.PublicMember"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/plotter/reference": {
      "get": {
        "tags": [
          "Plotter"
        ],
        "summary": "How to write a profile document: its JSON Schema, the document with every default, the\r\nallowed values of each choice (layouts, page setup modes, papers, areas, colours, plot\r\nstyles, PDF shapes, text modes), the file naming tokens, and the steps to follow.",
        "description": "Scope: `read`.",
        "operationId": "PlotterReference",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPlotterReference"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPlotterReference"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPlotterReference"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/plotter/profiles": {
      "get": {
        "tags": [
          "Plotter"
        ],
        "summary": "The print profiles of the key's organization (or personal account). The first time, the\r\ncompany's two default configs (colour and black-and-white, on its region's paper) are made.",
        "description": "Scope: `read`.",
        "operationId": "PlotterList",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "Only Draft, Active or Archived ones.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicPrintProfile"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicPrintProfile"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicPrintProfile"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      },
      "post": {
        "tags": [
          "Plotter"
        ],
        "summary": "A new profile, in Draft. In an organization, owners and admins set profiles up.",
        "description": "Scope: `setup`.",
        "operationId": "PlotterCreate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CreatePrintProfileBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CreatePrintProfileBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CreatePrintProfileBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/plotter/profiles/{profileId}": {
      "get": {
        "tags": [
          "Plotter"
        ],
        "summary": "One profile, with its document, template and folders.",
        "description": "Scope: `read`.",
        "operationId": "PlotterGet",
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      },
      "patch": {
        "tags": [
          "Plotter"
        ],
        "summary": "Renames a profile or changes its description.",
        "description": "Scope: `setup`.",
        "operationId": "PlotterUpdate",
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UpdateSetupBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UpdateSetupBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UpdateSetupBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/plotter/profiles/from-example": {
      "post": {
        "tags": [
          "Plotter"
        ],
        "summary": "The Plotter's example profile, set up in the key's organization: made once, then the same\r\none comes back. A good model to read before writing a profile.",
        "description": "Scope: `setup`.",
        "operationId": "PlotterFromExample",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/plotter/profiles/{profileId}/profile": {
      "put": {
        "tags": [
          "Plotter"
        ],
        "summary": "Saves the whole profile document; a new version when anything changed. A document that\r\ndoes not fit the reference is refused with what is wrong, and nothing is saved.",
        "description": "Scope: `setup`.",
        "operationId": "PlotterSaveProfile",
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SavePrintProfileBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SavePrintProfileBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SavePrintProfileBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "409": {
            "description": "Conflict"
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/plotter/profiles/{profileId}/profile/validate": {
      "post": {
        "tags": [
          "Plotter"
        ],
        "summary": "A dry run of the profile save: whether the document would be accepted, and if not, what to correct. Nothing is saved.",
        "description": "Scope: `setup`.",
        "operationId": "PlotterValidateProfile",
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SavePrintProfileBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SavePrintProfileBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SavePrintProfileBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicValidation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicValidation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicValidation"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/plotter/profiles/{profileId}/publish": {
      "post": {
        "tags": [
          "Plotter"
        ],
        "summary": "Publishes a Draft profile (Active): its saved document is checked as a run checks it, and it\r\ncan print. Its watched folder, kept off during setup, starts.",
        "description": "Scope: `setup`.",
        "operationId": "PlotterPublish",
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/plotter/profiles/{profileId}/archive": {
      "post": {
        "tags": [
          "Plotter"
        ],
        "summary": "Archives a profile: it no longer prints, and its watched folder stops.",
        "description": "Scope: `setup`.",
        "operationId": "PlotterArchive",
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/plotter/profiles/{profileId}/restore": {
      "post": {
        "tags": [
          "Plotter"
        ],
        "summary": "Restores an archived profile as it was (Active if it had been published).",
        "description": "Scope: `setup`.",
        "operationId": "PlotterRestore",
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/plotter/profiles/{profileId}/versions": {
      "get": {
        "tags": [
          "Plotter"
        ],
        "summary": "The profile's saved versions, newest first, each with how many settings changed. A profile keeps its newest 100 versions.",
        "description": "Scope: `read`.",
        "operationId": "PlotterVersions",
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicPrintProfileVersion"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicPrintProfileVersion"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicPrintProfileVersion"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/plotter/profiles/{profileId}/versions/{version}": {
      "get": {
        "tags": [
          "Plotter"
        ],
        "summary": "One version: its document and each setting that changed against the version before.",
        "description": "Scope: `read`.",
        "operationId": "PlotterVersion",
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfileVersion"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfileVersion"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfileVersion"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/plotter/profiles/{profileId}/template": {
      "put": {
        "tags": [
          "Plotter"
        ],
        "summary": "The template drawing for a Template page setup (multipart, one \"file\" part, .dwg). The CAD\r\nworker then reads its named page setups: poll the profile until template.pageSetups is\r\nfilled, and set one as pageSetup.templateSetup in the document. Runs use the new drawing from\r\nthe next save of the profile (PUT .../profile).",
        "description": "Scope: `setup`.",
        "operationId": "PlotterUploadTemplate",
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/plotter/profiles/{profileId}/template/from-file": {
      "put": {
        "tags": [
          "Plotter"
        ],
        "summary": "The template drawing from a file uploaded before (POST /v1/files or an upload link). As the multipart call.",
        "description": "Scope: `setup`.",
        "operationId": "PlotterUseTemplateFile",
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Controllers.PlotterTemplateFileBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Controllers.PlotterTemplateFileBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Controllers.PlotterTemplateFileBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/plotter/profiles/{profileId}/runs": {
      "post": {
        "tags": [
          "Plotter"
        ],
        "summary": "Prints drawings with an Active profile: a folder of a connected source, or files uploaded\r\nbefore (give one of the two). Answers with the run (202): poll GET /v1/plotter/runs/{runId}\r\nuntil it has finished, then download the PDFs. Charged per drawing. Send an Idempotency-Key\r\nheader to make retrying safe: the same key returns the same run and is charged once.",
        "description": "Scope: `run`.",
        "operationId": "PlotterStartRun",
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartRunBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartRunBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartRunBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              }
            }
          },
          "402": {
            "description": "Client Error"
          }
        },
        "security": [
          {
            "ApiKey": [
              "run"
            ]
          }
        ],
        "x-required-scope": "run"
      }
    },
    "/v1/plotter/profiles/{profileId}/runs/upload": {
      "post": {
        "tags": [
          "Plotter"
        ],
        "summary": "Prints drawings sent with the request (multipart/form-data, one or more \"files\" parts, .dwg).\r\nAs the JSON run: answers with the run (202), charged per drawing, Idempotency-Key honoured.\r\nOne file may be named with a \"fileName\" field, for callers that send bytes without a name.",
        "description": "Scope: `run`.",
        "operationId": "PlotterStartRunFromUploads",
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  },
                  "saveToOutputFolder": {
                    "type": "boolean"
                  },
                  "fileName": {
                    "type": "string"
                  }
                }
              },
              "encoding": {
                "files": {
                  "style": "form"
                },
                "saveToOutputFolder": {
                  "style": "form"
                },
                "fileName": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "run"
            ]
          }
        ],
        "x-required-scope": "run"
      }
    },
    "/v1/plotter/sample-drawings": {
      "get": {
        "tags": [
          "Plotter"
        ],
        "summary": "The sample drawings the server ships, to try a profile without drawings of your own.",
        "description": "Scope: `read`.",
        "operationId": "PlotterSampleDrawings",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicPrintSampleDrawing"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicPrintSampleDrawing"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicPrintSampleDrawing"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/plotter/profiles/{profileId}/runs/sample": {
      "post": {
        "tags": [
          "Plotter"
        ],
        "summary": "Prints the server's sample drawings (all, or the ones named) with an Active profile; billed\r\nas an upload of them. Answers with the run (202). Idempotency-Key honoured: the same key\r\nreturns the same run and is charged once.",
        "description": "Scope: `run`.",
        "operationId": "PlotterStartSampleRun",
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartPrintSampleRunBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartPrintSampleRunBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartPrintSampleRunBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "run"
            ]
          }
        ],
        "x-required-scope": "run"
      }
    },
    "/v1/plotter/runs/{runId}": {
      "get": {
        "tags": [
          "Plotter"
        ],
        "summary": "A print's results: the run (with its PDFs once finished), and per drawing the sheets it\r\nprinted, on what paper, and what is worth a warning (missing fonts and references).",
        "description": "Scope: `read`.",
        "operationId": "PlotterGetRun",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintResult"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/plotter/profiles/{profileId}/input-folder": {
      "put": {
        "tags": [
          "Plotter"
        ],
        "summary": "Watch a folder of a connected source: every drawing dropped in it is printed on its own,\r\ncharged per drawing, once the profile is Active and runAutomatically is on.",
        "description": "Scope: `setup and run`.",
        "operationId": "PlotterSetInputFolder",
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetInputFolderBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetInputFolderBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetInputFolderBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup",
              "run"
            ]
          }
        ],
        "x-required-scope": "setup and run"
      },
      "delete": {
        "tags": [
          "Plotter"
        ],
        "summary": "Stops watching the input folder.",
        "description": "Scope: `setup`.",
        "operationId": "PlotterClearInputFolder",
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/plotter/profiles/{profileId}/input-folder/run-automatically": {
      "put": {
        "tags": [
          "Plotter"
        ],
        "summary": "Turns automatic prints of the input folder on or off, keeping the folder. Turning them on needs the run scope as well.",
        "description": "Scope: `setup`.",
        "operationId": "PlotterSetRunAutomatically",
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetRunAutomaticallyBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetRunAutomaticallyBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetRunAutomaticallyBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/plotter/profiles/{profileId}/output-folder": {
      "put": {
        "tags": [
          "Plotter"
        ],
        "summary": "Where runs that save to a folder deliver the PDFs: a folder on the input folder's source. Empty clears it.",
        "description": "Scope: `setup`.",
        "operationId": "PlotterSetOutputFolder",
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetOutputFolderBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetOutputFolderBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetOutputFolderBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPrintProfile"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/product-configurator/reference": {
      "get": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "How to write a configuration document: its JSON Schema, the form field kinds, rule limits and\r\nvalue types, and the order of the setup. Read it before saving a document.",
        "description": "Scope: `read`.",
        "operationId": "ProductConfiguratorReference",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguratorReference"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguratorReference"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguratorReference"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/product-configurator/configurations": {
      "get": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "The configurations of the key's organization (or personal account); a salesperson's key lists the published ones.",
        "description": "Scope: `read`.",
        "operationId": "ProductConfiguratorList",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "Only Draft, Active or Archived ones.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicConfiguration"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicConfiguration"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicConfiguration"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      },
      "post": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "A new configuration, in Draft. In an organization, owners and admins set configurations up.",
        "description": "Scope: `setup`.",
        "operationId": "ProductConfiguratorCreate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CreateConfigurationBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CreateConfigurationBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CreateConfigurationBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/product-configurator/configurations/{configurationId}": {
      "get": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "One configuration, with its document and printing.",
        "description": "Scope: `read`.",
        "operationId": "ProductConfiguratorGet",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      },
      "patch": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "Renames a configuration or changes its description.",
        "description": "Scope: `setup`.",
        "operationId": "ProductConfiguratorUpdate",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UpdateSetupBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UpdateSetupBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UpdateSetupBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      },
      "delete": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "Deletes a configuration that is still a Draft and was never published nor printed (409 otherwise).",
        "description": "Scope: `setup`.",
        "operationId": "ProductConfiguratorDelete",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "204": {
            "description": "No Content"
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/product-configurator/configurations/{configurationId}/values-schema": {
      "get": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "The values a fill takes (POST .../runs and .../previews): the configuration's form fields, as\r\na list and as a JSON Schema of the \"values\" object. A visibility state field with no states\r\nnamed takes any state of its block, so it lists none.",
        "description": "Scope: `read`.",
        "operationId": "ProductConfiguratorValuesSchema",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicValuesSchema"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicValuesSchema"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicValuesSchema"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/product-configurator/configurations/from-example": {
      "post": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "The Configurator's example (a door with sizes, finishes and a visibility state), set up in the\r\nkey's organization: made once, then the same one comes back. A good model to read.",
        "description": "Scope: `setup`.",
        "operationId": "ProductConfiguratorFromExample",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/product-configurator/configurations/{configurationId}/document": {
      "put": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "Saves the configuration document (mapping, form fields, rules, printing, file name pattern);\r\na new version when it changed. A document that does not fit is refused with what is wrong,\r\nand nothing is saved.",
        "description": "Scope: `setup`.",
        "operationId": "ProductConfiguratorSaveDocument",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveConfigurationDocumentBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveConfigurationDocumentBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveConfigurationDocumentBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "409": {
            "description": "Conflict"
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/product-configurator/configurations/{configurationId}/document/validate": {
      "post": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "A dry run of a document save: whether the document would be accepted, and if not, what to correct. Nothing is saved.",
        "description": "Scope: `setup`.",
        "operationId": "ProductConfiguratorValidateDocument",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveConfigurationDocumentBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveConfigurationDocumentBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveConfigurationDocumentBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicValidation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicValidation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicValidation"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/product-configurator/configurations/{configurationId}/checks": {
      "get": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "What Publish checks (template, fields, printing), each with what to do about it.",
        "description": "Scope: `read`.",
        "operationId": "ProductConfiguratorChecks",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfigurationReadiness"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfigurationReadiness"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfigurationReadiness"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/product-configurator/configurations/{configurationId}/publish": {
      "post": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "Publishes a Draft (Active): it must pass the checks; then members and salespeople can fill it in.",
        "description": "Scope: `setup`.",
        "operationId": "ProductConfiguratorPublish",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/product-configurator/configurations/{configurationId}/archive": {
      "post": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "Archives a configuration: nobody fills it in any more.",
        "description": "Scope: `setup`.",
        "operationId": "ProductConfiguratorArchive",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/product-configurator/configurations/{configurationId}/restore": {
      "post": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "Restores an archived configuration as it was (Active if it had been published).",
        "description": "Scope: `setup`.",
        "operationId": "ProductConfiguratorRestore",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/product-configurator/configurations/{configurationId}/versions": {
      "get": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "The configuration's saved versions, newest first. A configuration keeps its newest 100 versions.",
        "description": "Scope: `read`.",
        "operationId": "ProductConfiguratorVersions",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicConfigurationVersion"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicConfigurationVersion"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicConfigurationVersion"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/product-configurator/configurations/{configurationId}/versions/{version}": {
      "get": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "One version: its document and what changed against the version before.",
        "description": "Scope: `read`.",
        "operationId": "ProductConfiguratorVersion",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfigurationVersion"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfigurationVersion"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfigurationVersion"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/product-configurator/configurations/{configurationId}/template": {
      "put": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "The template drawing the form fills (multipart, one \"file\" part, .dwg). Scan it next\r\n(POST .../scan) to see the places a form field can fill. Runs fill the new drawing from the\r\nnext save of the document (PUT .../document).",
        "description": "Scope: `setup`.",
        "operationId": "ProductConfiguratorUploadTemplate",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/product-configurator/configurations/{configurationId}/template/from-file": {
      "put": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "The template from a file uploaded before (POST /v1/files or an upload link), by id.",
        "description": "Scope: `setup`.",
        "operationId": "ProductConfiguratorTemplateFromFile",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.TemplateFromFileBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.TemplateFromFileBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.TemplateFromFileBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/product-configurator/configurations/{configurationId}/template/sample": {
      "post": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "The server's sample door drawing becomes the template, as if uploaded.",
        "description": "Scope: `setup`.",
        "operationId": "ProductConfiguratorUseSampleTemplate",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/product-configurator/configurations/{configurationId}/scan": {
      "post": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "Scans the template: a free run that reads its attributes, texts, dimensions and block\r\nparameters. Poll GET .../scan until it has finished.",
        "description": "Scope: `setup`.",
        "operationId": "ProductConfiguratorStartScan",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartConfigurationScanBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartConfigurationScanBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartConfigurationScanBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTemplateScan"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTemplateScan"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTemplateScan"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      },
      "get": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "The template's scan: its status and, with includeSchema=true once it succeeded, what it found\r\n(the places by target key, and a visibility state's choices for the form).",
        "description": "Scope: `read`.",
        "operationId": "ProductConfiguratorGetScan",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeSchema",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTemplateScan"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTemplateScan"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTemplateScan"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/product-configurator/configurations/{configurationId}/print-template": {
      "put": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "The page setup template printing uses (multipart, one \"file\" part, .dwg).",
        "description": "Scope: `setup`.",
        "operationId": "ProductConfiguratorUploadPrintTemplate",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/product-configurator/configurations/{configurationId}/print-template/from-file": {
      "put": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "The print template from a file uploaded before, by id.",
        "description": "Scope: `setup`.",
        "operationId": "ProductConfiguratorPrintTemplateFromFile",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.TemplateFromFileBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.TemplateFromFileBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.TemplateFromFileBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguration"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/product-configurator/configurations/{configurationId}/learn": {
      "post": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "Learn from drawings: 5 to 20 drawings made from one template (multipart \"files\" parts, .dwg).\r\nThe first becomes the configuration's template; all are read by a free run, and the fields\r\nthey vary in are proposed. Poll GET .../learn/{runId}; nothing else is saved.",
        "description": "Scope: `setup`.",
        "operationId": "ProductConfiguratorLearn",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  }
                }
              },
              "encoding": {
                "files": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguratorLearning"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguratorLearning"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguratorLearning"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/product-configurator/configurations/{configurationId}/learn/from-files": {
      "post": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "Learn from drawings uploaded before, by file id (the first becomes the template). As the multipart call.",
        "description": "Scope: `setup`.",
        "operationId": "ProductConfiguratorLearnFromFiles",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.PublicFileIds"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.PublicFileIds"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.PublicFileIds"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguratorLearning"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguratorLearning"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguratorLearning"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/product-configurator/configurations/{configurationId}/learn/{runId}": {
      "get": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "The learning run: still reading, failed, or the form fields the drawings vary in (add them with the document save).",
        "description": "Scope: `read`.",
        "operationId": "ProductConfiguratorGetLearn",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguratorLearning"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguratorLearning"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguratorLearning"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/product-configurator/assistant": {
      "get": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "Whether the assistant is available and whether a request can be made this month (shared with the portal).",
        "description": "Scope: `read`.",
        "operationId": "ProductConfiguratorAssistant",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicAssistantStatus"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicAssistantStatus"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicAssistantStatus"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/product-configurator/configurations/{configurationId}/assist": {
      "post": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "The assistant: the form described in words becomes proposed form fields, placed in the\r\nscanned template. Nothing is saved: add the fields you want to the document and save it.",
        "description": "Scope: `setup`.",
        "operationId": "ProductConfiguratorAssist",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.DescribeConfigurationBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.DescribeConfigurationBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.DescribeConfigurationBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicProposalOfPublicProposedField"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicProposalOfPublicProposedField"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicProposalOfPublicProposedField"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/product-configurator/configurations/{configurationId}/runs": {
      "post": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "Fills in a published configuration and prints it to a PDF: the values are checked against the\r\nform's rules first (400 with what is wrong), then the print runs, charged per drawing. Answers\r\nwith the run (202): poll GET /v1/product-configurator/runs/{runId}, then download the PDF.\r\nSend an Idempotency-Key header to make retrying safe.",
        "description": "Scope: `run`.",
        "operationId": "ProductConfiguratorStartRun",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.FillConfigurationBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.FillConfigurationBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.FillConfigurationBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              }
            }
          },
          "402": {
            "description": "Client Error"
          }
        },
        "security": [
          {
            "ApiKey": [
              "run"
            ]
          }
        ],
        "x-required-scope": "run"
      }
    },
    "/v1/product-configurator/configurations/{configurationId}/previews": {
      "post": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "The PDF as the values make it, every page marked \"PREVIEW\": the same checks and the same\r\nprint as a run, free, not charged. Answers with a preview run (202); once it succeeds its\r\nfile is the marked PDF. The filled drawing is not handed out, and a PDF without the mark\r\ncomes from a run. A new preview replaces your earlier ones for this configuration.",
        "description": "Scope: `run`.",
        "operationId": "ProductConfiguratorStartPreview",
        "parameters": [
          {
            "name": "configurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.FillConfigurationBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.FillConfigurationBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.FillConfigurationBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "run"
            ]
          }
        ],
        "x-required-scope": "run"
      }
    },
    "/v1/product-configurator/runs": {
      "get": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "The Configurator's prints, newest first: a salesperson's and a member's own, every print of the\r\norganization for its owners and admins.",
        "description": "Scope: `read`.",
        "operationId": "ProductConfiguratorRuns",
        "parameters": [
          {
            "name": "configurationId",
            "in": "query",
            "description": "Only the prints of this configuration (all its versions).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Runs per page, 1 to 100 (default 20).",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The nextCursor of the page before.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPageOfPublicRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPageOfPublicRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPageOfPublicRun"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/product-configurator/runs/{runId}": {
      "get": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "One print or preview: its status, once it has finished its files (the PDF; a preview's is\r\nmarked \"PREVIEW\"), the configuration it filled in and the values it was filled in with (send\r\nthem again to the runs call to print it again).",
        "description": "Scope: `read`.",
        "operationId": "ProductConfiguratorGetRun",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguratorRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguratorRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConfiguratorRun"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/product-configurator/runs/{runId}/files/{fileId}/content": {
      "get": {
        "tags": [
          "ProductConfigurator"
        ],
        "summary": "Downloads a file a print or preview made (its PDF), as GET /v1/files/{fileId}/content does\r\nfor a file of this run.",
        "description": "Scope: `read`.",
        "operationId": "ProductConfiguratorDownloadRunFile",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/report-generator/reference": {
      "get": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "How to write a report document: its JSON Schema, the allowed values of each choice (value\r\nkinds, run fields, record kinds, directions, fill modes, aggregates, splits), the fields a\r\ncell or column reads, the object types and properties a selection may use, and the steps.",
        "description": "Scope: `read`.",
        "operationId": "ReportGeneratorReference",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReportReference"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReportReference"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReportReference"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/report-generator/reports": {
      "get": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "The reports of the key's organization (or personal account).",
        "description": "Scope: `read`.",
        "operationId": "ReportGeneratorList",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "Only Draft, Active or Archived ones.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicReport"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicReport"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicReport"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      },
      "post": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "A new report, in Draft. In an organization, owners and admins set reports up.",
        "description": "Scope: `setup`.",
        "operationId": "ReportGeneratorCreate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CreateReportBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CreateReportBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CreateReportBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/report-generator/reports/{reportId}": {
      "get": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "One report, with its document, folders and files.",
        "description": "Scope: `read`.",
        "operationId": "ReportGeneratorGet",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      },
      "patch": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "Renames a report or changes its description.",
        "description": "Scope: `setup`.",
        "operationId": "ReportGeneratorUpdate",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UpdateSetupBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UpdateSetupBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UpdateSetupBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      },
      "delete": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "Deletes a report that was never saved (a Draft with no document version), with its files.\r\nAny other answers 409 conflict: archive it instead.",
        "description": "Scope: `setup`.",
        "operationId": "ReportGeneratorDelete",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "204": {
            "description": "No Content"
          },
          "409": {
            "description": "Conflict"
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/report-generator/reports/from-example": {
      "post": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "The Report Generator's example (a BOMA area report: its template, sample drawing and\r\ndocument), set up in the key's organization: made once, then the same one comes back.",
        "description": "Scope: `setup`.",
        "operationId": "ReportGeneratorFromExample",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/report-generator/reports/{reportId}/document": {
      "put": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "Saves the whole report document; a new version when anything changed. A Draft may keep a\r\nhalf-made document (GET the report: problem says what it still lacks); an Active report's\r\nmust stay runnable, or it is refused and nothing is saved.",
        "description": "Scope: `setup`.",
        "operationId": "ReportGeneratorSaveDocument",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveReportDocumentBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveReportDocumentBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveReportDocumentBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              }
            }
          },
          "409": {
            "description": "Conflict"
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/report-generator/reports/{reportId}/document/validate": {
      "post": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "A dry run: whether the document is complete enough to run (as publish, a test and an Active\r\nreport's save check it), and if not, what to correct. Nothing is saved.",
        "description": "Scope: `setup`.",
        "operationId": "ReportGeneratorValidateDocument",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveReportDocumentBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveReportDocumentBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveReportDocumentBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicValidation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicValidation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicValidation"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/report-generator/reports/{reportId}/previews": {
      "post": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "Test Report: the document (the one sent, or the saved one when none is) run on the sample\r\ndrawing, free. Answers with the run (202): poll GET /v1/report-generator/runs/{runId}, then\r\ndownload its workbook and PDF, which are marked \"PREVIEW\" (a run's are not). A person can\r\nmake 20 tests in 24 hours; the next answers 429 rate_limited. Tests are kept for a day.",
        "description": "Scope: `setup`.",
        "operationId": "ReportGeneratorPreview",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveReportDocumentBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveReportDocumentBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveReportDocumentBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/report-generator/reports/{reportId}/publish": {
      "post": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "Publishes a Draft report (Active): its document is checked as a run checks it, and it can run.",
        "description": "Scope: `setup`.",
        "operationId": "ReportGeneratorPublish",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/report-generator/reports/{reportId}/archive": {
      "post": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "Archives a report: it no longer runs, and its watched folder stops.",
        "description": "Scope: `setup`.",
        "operationId": "ReportGeneratorArchive",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/report-generator/reports/{reportId}/restore": {
      "post": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "Restores an archived report as it was (Active if it had been published).",
        "description": "Scope: `setup`.",
        "operationId": "ReportGeneratorRestore",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/report-generator/reports/{reportId}/versions": {
      "get": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "The report's saved versions, newest first. A report keeps its newest 100 versions.",
        "description": "Scope: `read`.",
        "operationId": "ReportGeneratorVersions",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicReportVersion"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicReportVersion"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicReportVersion"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/report-generator/reports/{reportId}/versions/{version}": {
      "get": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "One version: its document and what changed against the version before.",
        "description": "Scope: `read`.",
        "operationId": "ReportGeneratorVersion",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReportVersion"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReportVersion"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReportVersion"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/report-generator/reports/{reportId}/template": {
      "put": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "Uploads the customer's Excel template (.xlsx; multipart, one \"file\" part). Replaces the one\r\nthere; runs fill the new workbook from the next save of the document (PUT .../document).",
        "description": "Scope: `setup`.",
        "operationId": "ReportGeneratorUploadTemplate",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/report-generator/reports/{reportId}/template/from-file": {
      "put": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "Uses an Excel file uploaded before (POST /v1/files or an upload link) as the template.",
        "description": "Scope: `setup`.",
        "operationId": "ReportGeneratorTemplateFromFile",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.ReportFileBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.ReportFileBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.ReportFileBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/report-generator/reports/{reportId}/template/file": {
      "get": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "Downloads the template as uploaded.",
        "description": "Scope: `read`.",
        "operationId": "ReportGeneratorDownloadTemplate",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/report-generator/reports/{reportId}/template/cells": {
      "get": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "The template's sheets as the setup reads them: used ranges, cell texts and formulas, merged\r\nranges and Excel tables. Read it to choose the cells and ranges the document fills.",
        "description": "Scope: `read`.",
        "operationId": "ReportGeneratorTemplateCells",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTemplateCells"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTemplateCells"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTemplateCells"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/report-generator/reports/{reportId}/sample": {
      "put": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "Uploads the sample drawing (.dwg; multipart, one \"file\" part) the setup reads for block names,\r\ntags and layers; runs never use it. Its scan starts: follow it at GET .../sample/scan.",
        "description": "Scope: `setup`.",
        "operationId": "ReportGeneratorUploadSample",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/report-generator/reports/{reportId}/sample/from-file": {
      "put": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "Uses a drawing uploaded before (POST /v1/files or an upload link) as the sample drawing.",
        "description": "Scope: `setup`.",
        "operationId": "ReportGeneratorSampleFromFile",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.ReportFileBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.ReportFileBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.ReportFileBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/report-generator/reports/{reportId}/sample/use-sample": {
      "post": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "Uses the server's sample AV floor plan as the sample drawing.",
        "description": "Scope: `setup`.",
        "operationId": "ReportGeneratorUseSampleDrawing",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/report-generator/reports/{reportId}/sample/scan": {
      "get": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "The sample drawing's scan; with includeSchema, what it holds once it succeeded.",
        "description": "Scope: `read`.",
        "operationId": "ReportGeneratorGetSampleScan",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeSchema",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSampleScan"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSampleScan"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSampleScan"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      },
      "post": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "Scans the sample drawing again (free).",
        "description": "Scope: `setup`.",
        "operationId": "ReportGeneratorRescanSample",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSampleScan"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSampleScan"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSampleScan"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/report-generator/assistant": {
      "get": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "Whether the assistant is available and whether a request can be made this month (shared with the portal).",
        "description": "Scope: `read`.",
        "operationId": "ReportGeneratorAssistant",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicAssistantStatus"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicAssistantStatus"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicAssistantStatus"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/report-generator/reports/{reportId}/assist": {
      "post": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "The assistant: what the report should fill, in words (or learn = true to read the template\r\nand sample scan for everything it asks for), proposed as changes to the document. Nothing is\r\nsaved: apply the operations you want to the document, then save it.",
        "description": "Scope: `setup`.",
        "operationId": "ReportGeneratorAssist",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.DescribeReportBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.DescribeReportBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.DescribeReportBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicProposalOfPublicReportOperation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicProposalOfPublicReportOperation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicProposalOfPublicReportOperation"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/report-generator/reports/{reportId}/runs": {
      "post": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "Runs an Active report on drawings: a folder of a connected source (source) or drawings\r\nuploaded before (fileIds). Answers with the run (202): poll GET\r\n/v1/report-generator/runs/{runId}. Charged per drawing. Send an Idempotency-Key header to make\r\nretrying safe: the same key returns the same run and is charged once.",
        "description": "Scope: `run`.",
        "operationId": "ReportGeneratorStartRun",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartRunBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartRunBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartRunBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              }
            }
          },
          "402": {
            "description": "Client Error"
          }
        },
        "security": [
          {
            "ApiKey": [
              "run"
            ]
          }
        ],
        "x-required-scope": "run"
      },
      "get": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "The report's runs, newest first: the portal's Created Reports tab. Tests (previews) are not\r\nlisted. A member sees the runs they started; owners and admins every run of the report.",
        "description": "Scope: `read`.",
        "operationId": "ReportGeneratorReportRuns",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Only runs with these statuses, comma separated: Queued, Running, Succeeded, Failed, Cancelled.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Runs per page, 1 to 100 (default 20).",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The nextCursor of the page before.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPageOfPublicRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPageOfPublicRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPageOfPublicRun"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/report-generator/reports/{reportId}/runs/upload": {
      "post": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "Runs an Active report on drawings sent with the request (multipart/form-data, one or more\r\n\"files\" parts, .dwg). As the JSON call: 202 with the run, charged per drawing, Idempotency-Key honoured.\r\nOne file may be named with a \"fileName\" field, for callers that send bytes without a name.",
        "description": "Scope: `run`.",
        "operationId": "ReportGeneratorStartRunFromUploads",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  },
                  "saveToOutputFolder": {
                    "type": "boolean"
                  },
                  "fileName": {
                    "type": "string"
                  }
                }
              },
              "encoding": {
                "files": {
                  "style": "form"
                },
                "saveToOutputFolder": {
                  "style": "form"
                },
                "fileName": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "run"
            ]
          }
        ],
        "x-required-scope": "run"
      }
    },
    "/v1/report-generator/runs/{runId}": {
      "get": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "A report run or Test Report: the run (once finished, its files are the workbooks and PDFs it\r\nwrote: download them from /v1/files/{id}/content) and what it read from each drawing.",
        "description": "Scope: `read`.",
        "operationId": "ReportGeneratorGetRun",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReportRunResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReportRunResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReportRunResult"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/report-generator/reports/{reportId}/input-folder": {
      "put": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "Watch a folder of a connected source: drawings dropped in it make reports on their own\r\n(per drawing or per subfolder, see input-grouping), charged per drawing, once the report is\r\nActive and runAutomatically is on.",
        "description": "Scope: `setup and run`.",
        "operationId": "ReportGeneratorSetInputFolder",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetInputFolderBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetInputFolderBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetInputFolderBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup",
              "run"
            ]
          }
        ],
        "x-required-scope": "setup and run"
      },
      "delete": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "Stops watching the input folder.",
        "description": "Scope: `setup`.",
        "operationId": "ReportGeneratorClearInputFolder",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/report-generator/reports/{reportId}/input-folder/run-automatically": {
      "put": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "Turns automatic runs of the input folder on or off, keeping the folder. Turning them on needs the run scope as well.",
        "description": "Scope: `setup`.",
        "operationId": "ReportGeneratorSetRunAutomatically",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetRunAutomaticallyBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetRunAutomaticallyBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetRunAutomaticallyBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/report-generator/reports/{reportId}/input-grouping": {
      "put": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "A report per dropped drawing (PerDrawing), or one per subfolder once it has been quiet for quietMinutes (PerSubfolder).",
        "description": "Scope: `setup`.",
        "operationId": "ReportGeneratorSetInputGrouping",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetInputGroupingBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetInputGroupingBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetInputGroupingBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/report-generator/reports/{reportId}/output-folder": {
      "put": {
        "tags": [
          "ReportGenerator"
        ],
        "summary": "Where runs that save to a folder deliver the workbooks and PDFs: a folder on the input folder's source. Empty clears it.",
        "description": "Scope: `setup`.",
        "operationId": "ReportGeneratorSetOutputFolder",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetOutputFolderBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetOutputFolderBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetOutputFolderBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReport"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/runs": {
      "get": {
        "tags": [
          "Runs"
        ],
        "summary": "Runs, newest first.",
        "description": "Scope: `read`.",
        "operationId": "RunsList",
        "parameters": [
          {
            "name": "tool",
            "in": "query",
            "description": "Only this tool's runs: standardizer, auto-fill, plotter, product-configurator or report-generator.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Only runs with these statuses, comma separated: Queued, Running, Succeeded, Failed, Cancelled.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sinceDays",
            "in": "query",
            "description": "Only runs started in the last this many days.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Runs per page, 1 to 100 (default 20).",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The nextCursor of the page before.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "setupGroupId",
            "in": "query",
            "description": "Only the runs of one setup (a ruleset, mapping, profile, configuration or report): its setupGroupId.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPageOfPublicRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPageOfPublicRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicPageOfPublicRun"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/runs/{runId}": {
      "get": {
        "tags": [
          "Runs"
        ],
        "summary": "One run: its status, and once finished the files it made.",
        "description": "Scope: `read`.",
        "operationId": "RunsGet",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      },
      "delete": {
        "tags": [
          "Runs"
        ],
        "summary": "Deletes a finished run with the files it made and the files it was given, except a file a\r\nsetup or another run still uses. It cannot be undone; a run that has not finished is\r\ncancelled first (409 conflict until then). A member deletes their own runs; owners and admins any.",
        "description": "Scope: `run`.",
        "operationId": "RunsDelete",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found"
          },
          "409": {
            "description": "Conflict"
          }
        },
        "security": [
          {
            "ApiKey": [
              "run"
            ]
          }
        ],
        "x-required-scope": "run"
      }
    },
    "/v1/runs/{runId}/wait": {
      "get": {
        "tags": [
          "Runs"
        ],
        "summary": "Waits for a run: 202 with a Location (this address) and a Retry-After while it has not\r\nfinished, 200 with the run and its files once it has succeeded. A run that failed or was\r\ncancelled answers 422 (run_failed, run_cancelled) with why, so a caller that follows the 202\r\nby itself fails when the run does; GET /v1/runs/{id} reads such a run as it is.",
        "description": "Scope: `read`.",
        "operationId": "RunsWait",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              }
            }
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "422": {
            "description": "Client Error"
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/runs/{runId}/links": {
      "post": {
        "tags": [
          "Runs"
        ],
        "summary": "Download links for every file a run made, in one call: each gives its file for ten minutes\r\nwith no API key, as POST /v1/files/{id}/links does for one. A run that has not succeeded made none.",
        "description": "Scope: `read`.",
        "operationId": "RunsCreateLinks",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicRunFileLink"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicRunFileLink"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicRunFileLink"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/runs/{runId}/cancel": {
      "post": {
        "tags": [
          "Runs"
        ],
        "summary": "Cancels a run that has not finished. A member cancels their own runs; owners and admins any.",
        "description": "Scope: `run`.",
        "operationId": "RunsCancel",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "run"
            ]
          }
        ],
        "x-required-scope": "run"
      }
    },
    "/v1/sources/providers": {
      "get": {
        "tags": [
          "Sources"
        ],
        "summary": "The cloud storage providers that can be connected, and how each signs in.",
        "description": "Scope: `read`.",
        "operationId": "SourcesProviders",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicSourceProvider"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicSourceProvider"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicSourceProvider"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/sources": {
      "get": {
        "tags": [
          "Sources"
        ],
        "summary": "Every provider that can be connected, each with the source connected to it, if any.",
        "description": "Scope: `read`.",
        "operationId": "SourcesList",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicSourceCard"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicSourceCard"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicSourceCard"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      },
      "post": {
        "tags": [
          "Sources"
        ],
        "summary": "Saves a session's account as a source, with the folders ByLayer may use (at least one).",
        "description": "Scope: `connections`.",
        "operationId": "SourcesCreate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CreateSourceBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CreateSourceBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CreateSourceBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSource"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSource"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSource"
                }
              }
            }
          },
          "409": {
            "description": "Conflict"
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/sources/connect": {
      "post": {
        "tags": [
          "Sources"
        ],
        "summary": "Starts connecting an OAuth provider: returns a connection with the link its owner opens to\r\nsign in. Then poll GET /v1/connections/{id}; once authorized, finish it with\r\nPOST /v1/connections/{id}/complete (with the folders) or browse first through its session.",
        "description": "Scope: `connections`.",
        "operationId": "SourcesConnect",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.ConnectProviderBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.ConnectProviderBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.ConnectProviderBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnectionStatus"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnectionStatus"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicConnectionStatus"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/sources/sessions": {
      "post": {
        "tags": [
          "Sources"
        ],
        "summary": "Opens a signed-in account to browse before it is saved: from an authorized connection\r\n(connectionId), or for a credentials provider (provider and credentials).",
        "description": "Scope: `connections`.",
        "operationId": "SourcesStartSession",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartSourceSessionBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartSourceSessionBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartSourceSessionBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSourceSession"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSourceSession"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSourceSession"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/sources/sessions/{sessionId}/folders": {
      "get": {
        "tags": [
          "Sources"
        ],
        "summary": "The folders at a path of a session's account (\"\" for the top), to choose from.",
        "description": "Scope: `connections`.",
        "operationId": "SourcesBrowseSession",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicEntry"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicEntry"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicEntry"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/sources/{sourceId}": {
      "get": {
        "tags": [
          "Sources"
        ],
        "summary": "One source.",
        "description": "Scope: `read`.",
        "operationId": "SourcesGet",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSource"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSource"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSource"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      },
      "delete": {
        "tags": [
          "Sources"
        ],
        "summary": "Disconnects the source: its watched folders and their history are removed.",
        "description": "Scope: `connections`.",
        "operationId": "SourcesDelete",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "204": {
            "description": "No Content"
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/sources/{sourceId}/folders": {
      "get": {
        "tags": [
          "Sources"
        ],
        "summary": "The folders ByLayer may use in the source, with the watched-folder runs on each.",
        "description": "Scope: `read`.",
        "operationId": "SourcesFolders",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicFolder"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicFolder"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicFolder"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      },
      "put": {
        "tags": [
          "Sources"
        ],
        "summary": "Changes the folders ByLayer may use in the source: the whole new list (folders), or changes to\r\nthe current one (add, remove). A folder an auto run watches or saves to stays: removing it\r\nanswers 409 folder_in_use, naming the folders and their auto runs.",
        "description": "Scope: `connections`.",
        "operationId": "SourcesUpdateFolders",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UpdateSourceFoldersBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UpdateSourceFoldersBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UpdateSourceFoldersBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSource"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSource"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSource"
                }
              }
            }
          },
          "409": {
            "description": "Conflict"
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/sources/{sourceId}/account-folders": {
      "get": {
        "tags": [
          "Sources"
        ],
        "summary": "Every top-level folder of the account, whether ByLayer may use it or not: the choice for\r\nPUT .../folders. For an organization's source, owners and admins only.",
        "description": "Scope: `read`.",
        "operationId": "SourcesAccountFolders",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicEntry"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicEntry"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicEntry"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/sources/{sourceId}/files": {
      "get": {
        "tags": [
          "Sources"
        ],
        "summary": "The files in one of the source's folders (GET .../folders), or in a folder inside one.",
        "description": "Scope: `read`.",
        "operationId": "SourcesFiles",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "path",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicEntry"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicEntry"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicEntry"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/sources/{sourceId}/folder-link": {
      "get": {
        "tags": [
          "Sources"
        ],
        "summary": "A folder's link in the provider's web app; webUrl is null when the provider has none.",
        "description": "Scope: `read`.",
        "operationId": "SourcesFolderLink",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "path",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicFolderLinkUrl"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicFolderLinkUrl"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicFolderLinkUrl"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/sources/{sourceId}/pause": {
      "post": {
        "tags": [
          "Sources"
        ],
        "summary": "Pauses the source: its watched folders are not read until it is resumed.",
        "description": "Scope: `connections`.",
        "operationId": "SourcesPause",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSource"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSource"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSource"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/sources/{sourceId}/resume": {
      "post": {
        "tags": [
          "Sources"
        ],
        "summary": "Resumes a paused source as it was.",
        "description": "Scope: `connections and run`.",
        "operationId": "SourcesResume",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSource"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSource"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicSource"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections",
              "run"
            ]
          }
        ],
        "x-required-scope": "connections and run"
      }
    },
    "/v1/sources/{sourceId}/reconnect": {
      "post": {
        "tags": [
          "Sources"
        ],
        "summary": "Reconnects a source the provider no longer accepts: with new credentials at once, or for an\r\nOAuth provider a sign-in link (connection) to finish with POST /v1/connections/{id}/complete.",
        "description": "Scope: `connections`.",
        "operationId": "SourcesReconnect",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.ReconnectBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.ReconnectBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.ReconnectBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReconnect"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReconnect"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicReconnect"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "connections"
            ]
          }
        ],
        "x-required-scope": "connections"
      }
    },
    "/v1/standardizer/reference": {
      "get": {
        "tags": [
          "Standardizer"
        ],
        "summary": "How to write rules: the JSON Schema of one rule, the allowed categories, severities,\r\nsubjects, operators, checks and units, and the catalog of object types and the properties\r\na rule may select on and require. Read it before saving rules.",
        "description": "Scope: `read`.",
        "operationId": "StandardizerReference",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicStandardizerReference"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicStandardizerReference"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicStandardizerReference"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/standardizer/rulesets": {
      "get": {
        "tags": [
          "Standardizer"
        ],
        "summary": "The rulesets of the key's organization (or personal account).",
        "description": "Scope: `read`.",
        "operationId": "StandardizerList",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "Only Draft, Active or Archived ones.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicRuleset"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicRuleset"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicRuleset"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      },
      "post": {
        "tags": [
          "Standardizer"
        ],
        "summary": "A new ruleset, in Draft. In an organization, owners and admins set rulesets up.",
        "description": "Scope: `setup`.",
        "operationId": "StandardizerCreate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CreateRulesetBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CreateRulesetBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CreateRulesetBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/standardizer/rulesets/{rulesetId}": {
      "get": {
        "tags": [
          "Standardizer"
        ],
        "summary": "One ruleset, with its rules document.",
        "description": "Scope: `read`.",
        "operationId": "StandardizerGet",
        "parameters": [
          {
            "name": "rulesetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      },
      "patch": {
        "tags": [
          "Standardizer"
        ],
        "summary": "Renames a ruleset or changes its description.",
        "description": "Scope: `setup`.",
        "operationId": "StandardizerUpdate",
        "parameters": [
          {
            "name": "rulesetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UpdateSetupBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UpdateSetupBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UpdateSetupBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/standardizer/rulesets/from-example": {
      "post": {
        "tags": [
          "Standardizer"
        ],
        "summary": "The Standardizer's example ruleset (an AV office's standard: layers, blocks, text, dimensions),\r\nset up in the key's organization: made once, then the same one comes back. A good model to\r\nread before writing rules.",
        "description": "Scope: `setup`.",
        "operationId": "StandardizerFromExample",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/standardizer/rulesets/{rulesetId}/rules": {
      "put": {
        "tags": [
          "Standardizer"
        ],
        "summary": "Saves the whole rules document; a new version when anything changed. Rules that do not fit\r\nthe reference are refused with what is wrong, and nothing is saved.",
        "description": "Scope: `setup`.",
        "operationId": "StandardizerSaveRules",
        "parameters": [
          {
            "name": "rulesetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveRulesBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveRulesBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveRulesBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "409": {
            "description": "Conflict"
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/standardizer/rulesets/{rulesetId}/publish": {
      "post": {
        "tags": [
          "Standardizer"
        ],
        "summary": "Publishes a Draft ruleset (Active): its rules are checked as a run checks them, and it can run.",
        "description": "Scope: `setup`.",
        "operationId": "StandardizerPublish",
        "parameters": [
          {
            "name": "rulesetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/standardizer/rulesets/{rulesetId}/archive": {
      "post": {
        "tags": [
          "Standardizer"
        ],
        "summary": "Archives a ruleset: it no longer runs, and its watched folder stops.",
        "description": "Scope: `setup`.",
        "operationId": "StandardizerArchive",
        "parameters": [
          {
            "name": "rulesetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/standardizer/rulesets/{rulesetId}/restore": {
      "post": {
        "tags": [
          "Standardizer"
        ],
        "summary": "Restores an archived ruleset as it was (Active if it had been published).",
        "description": "Scope: `setup`.",
        "operationId": "StandardizerRestore",
        "parameters": [
          {
            "name": "rulesetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/standardizer/rulesets/{rulesetId}/versions": {
      "get": {
        "tags": [
          "Standardizer"
        ],
        "summary": "The ruleset's saved versions, newest first. A ruleset keeps its newest 100 versions.",
        "description": "Scope: `read`.",
        "operationId": "StandardizerVersions",
        "parameters": [
          {
            "name": "rulesetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicRulesetVersion"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicRulesetVersion"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicRulesetVersion"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/standardizer/rulesets/{rulesetId}/versions/{version}": {
      "get": {
        "tags": [
          "Standardizer"
        ],
        "summary": "One version: its rules and what changed against the version before.",
        "description": "Scope: `read`.",
        "operationId": "StandardizerVersion",
        "parameters": [
          {
            "name": "rulesetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRulesetVersion"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRulesetVersion"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRulesetVersion"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/standardizer/rulesets/{rulesetId}/runs": {
      "post": {
        "tags": [
          "Standardizer"
        ],
        "summary": "Checks the drawings in a folder of a connected source with an Active ruleset. Answers with\r\nthe run (202): poll GET /v1/standardizer/runs/{runId} until it has finished. Charged per\r\ndrawing. Send an Idempotency-Key header to make retrying safe: the same key returns the same\r\nrun and is charged once.",
        "description": "Scope: `run`.",
        "operationId": "StandardizerStartRun",
        "parameters": [
          {
            "name": "rulesetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartRunBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartRunBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.StartRunBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              }
            }
          },
          "402": {
            "description": "Client Error"
          }
        },
        "security": [
          {
            "ApiKey": [
              "run"
            ]
          }
        ],
        "x-required-scope": "run"
      }
    },
    "/v1/standardizer/rulesets/{rulesetId}/runs/upload": {
      "post": {
        "tags": [
          "Standardizer"
        ],
        "summary": "Checks drawings sent with the request (multipart/form-data, one or more \"files\" parts, .dwg).\r\nAs the folder run: answers with the run (202), charged per drawing, Idempotency-Key honoured.\r\nOne file may be named with a \"fileName\" field, for callers that send bytes without a name.",
        "description": "Scope: `run`.",
        "operationId": "StandardizerStartRunFromUploads",
        "parameters": [
          {
            "name": "rulesetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  },
                  "saveToOutputFolder": {
                    "type": "boolean"
                  },
                  "fileName": {
                    "type": "string"
                  }
                }
              },
              "encoding": {
                "files": {
                  "style": "form"
                },
                "saveToOutputFolder": {
                  "style": "form"
                },
                "fileName": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRun"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "run"
            ]
          }
        ],
        "x-required-scope": "run"
      }
    },
    "/v1/standardizer/runs/{runId}": {
      "get": {
        "tags": [
          "Standardizer"
        ],
        "summary": "A check's results: the run, each drawing's outcome per rule, and its issues with their\r\nStatus and fix (at most 100 of one rule in one drawing and 5,000 in all; the counts are of\r\nevery issue). Poll this after starting a run; drawings and issues fill in once it succeeds.",
        "description": "Scope: `read`.",
        "operationId": "StandardizerGetRun",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicCheckResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicCheckResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicCheckResult"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/standardizer/runs/{runId}/issues/{index}/status": {
      "put": {
        "tags": [
          "Standardizer"
        ],
        "summary": "Marks an issue Done (resolved by a person) or Open again.",
        "description": "Scope: `run`.",
        "operationId": "StandardizerSetIssueStatus",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "index",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetIssueStatusBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetIssueStatusBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetIssueStatusBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicIssueState"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicIssueState"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicIssueState"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "run"
            ]
          }
        ],
        "x-required-scope": "run"
      }
    },
    "/v1/standardizer/runs/{runId}/issues/{index}/fix": {
      "post": {
        "tags": [
          "Standardizer"
        ],
        "summary": "Apply fix: runs the issue's rule, its fix on, over the issue's drawing; one billable unit.\r\nThe issue's fixRunId is that run: poll it at GET /v1/runs/{id}.",
        "description": "Scope: `run`.",
        "operationId": "StandardizerApplyFix",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "index",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicIssueState"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicIssueState"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicIssueState"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "run"
            ]
          }
        ],
        "x-required-scope": "run"
      }
    },
    "/v1/standardizer/runs/{runId}/issues/pdf": {
      "get": {
        "tags": [
          "Standardizer"
        ],
        "summary": "The run's issues as a PDF report.",
        "description": "Scope: `read`.",
        "operationId": "StandardizerIssuesPdf",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/standardizer/rulesets/{rulesetId}/rules/validate": {
      "post": {
        "tags": [
          "Standardizer"
        ],
        "summary": "A dry run of a rules save: whether the document would be accepted, and if not, what to\r\ncorrect. Nothing is saved.",
        "description": "Scope: `setup`.",
        "operationId": "StandardizerValidateRules",
        "parameters": [
          {
            "name": "rulesetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveRulesBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveRulesBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SaveRulesBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicValidation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicValidation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicValidation"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/standardizer/rulesets/{rulesetId}/export": {
      "get": {
        "tags": [
          "Standardizer"
        ],
        "summary": "The ruleset's current rules as a portable file, to keep or to import elsewhere.",
        "description": "Scope: `read`.",
        "operationId": "StandardizerExport",
        "parameters": [
          {
            "name": "rulesetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Modules.Tools.Application.DTOs.StandardizerExportDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Modules.Tools.Application.DTOs.StandardizerExportDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Modules.Tools.Application.DTOs.StandardizerExportDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/standardizer/rulesets/import": {
      "post": {
        "tags": [
          "Standardizer"
        ],
        "summary": "A new Draft ruleset from an export: its name, description and rules.",
        "description": "Scope: `setup`.",
        "operationId": "StandardizerImport",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.ImportRulesetBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.ImportRulesetBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.ImportRulesetBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/standardizer/rulesets/{rulesetId}/learn": {
      "post": {
        "tags": [
          "Standardizer"
        ],
        "summary": "Learn from drawings: reference drawings (multipart \"files\" parts, .dwg) are read by a free\r\nrun, and the rules they share are proposed. Poll GET .../learn/{runId}; nothing is saved.",
        "description": "Scope: `setup`.",
        "operationId": "StandardizerLearn",
        "parameters": [
          {
            "name": "rulesetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  }
                }
              },
              "encoding": {
                "files": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicLearningOfStandardizerRule"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicLearningOfStandardizerRule"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicLearningOfStandardizerRule"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/standardizer/rulesets/{rulesetId}/learn/from-files": {
      "post": {
        "tags": [
          "Standardizer"
        ],
        "summary": "Learn from drawings uploaded before, by file id. As the multipart call.",
        "description": "Scope: `setup`.",
        "operationId": "StandardizerLearnFromFiles",
        "parameters": [
          {
            "name": "rulesetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.PublicFileIds"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.PublicFileIds"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.PublicFileIds"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicLearningOfStandardizerRule"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicLearningOfStandardizerRule"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicLearningOfStandardizerRule"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/standardizer/rulesets/{rulesetId}/learn/{runId}": {
      "get": {
        "tags": [
          "Standardizer"
        ],
        "summary": "The learning run: still going, failed, or the rules the drawings share (add them with the rules save).",
        "description": "Scope: `read`.",
        "operationId": "StandardizerGetLearn",
        "parameters": [
          {
            "name": "rulesetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicLearningOfStandardizerRule"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicLearningOfStandardizerRule"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicLearningOfStandardizerRule"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/standardizer/assistant": {
      "get": {
        "tags": [
          "Standardizer"
        ],
        "summary": "Whether the assistant is available and whether a request can be made this month (shared with the portal).",
        "description": "Scope: `read`.",
        "operationId": "StandardizerAssistant",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicAssistantStatus"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicAssistantStatus"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicAssistantStatus"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/standardizer/rulesets/{rulesetId}/assist": {
      "post": {
        "tags": [
          "Standardizer"
        ],
        "summary": "The assistant: standards described in words become proposed rules for this ruleset (it\r\nsees the rules it has). Nothing is saved: add the rules you want with the rules save.",
        "description": "Scope: `setup`.",
        "operationId": "StandardizerAssist",
        "parameters": [
          {
            "name": "rulesetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.DescribeBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.DescribeBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.DescribeBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicProposalOfStandardizerRule"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicProposalOfStandardizerRule"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicProposalOfStandardizerRule"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/standardizer/assist": {
      "post": {
        "tags": [
          "Standardizer"
        ],
        "summary": "The assistant for a ruleset not made yet: rules proposed from words, to create a ruleset with.",
        "description": "Scope: `setup`.",
        "operationId": "StandardizerAssistNew",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.DescribeBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.DescribeBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.DescribeBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicProposalOfStandardizerRule"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicProposalOfStandardizerRule"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicProposalOfStandardizerRule"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/standardizer/rulesets/{rulesetId}/input-folder": {
      "put": {
        "tags": [
          "Standardizer"
        ],
        "summary": "Watch a folder of a connected source: every drawing dropped in it is checked on its own,\r\ncharged per drawing, once the ruleset is Active and runAutomatically is on.",
        "description": "Scope: `setup and run`.",
        "operationId": "StandardizerSetInputFolder",
        "parameters": [
          {
            "name": "rulesetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetInputFolderBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetInputFolderBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetInputFolderBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup",
              "run"
            ]
          }
        ],
        "x-required-scope": "setup and run"
      },
      "delete": {
        "tags": [
          "Standardizer"
        ],
        "summary": "Stops watching the input folder.",
        "description": "Scope: `setup`.",
        "operationId": "StandardizerClearInputFolder",
        "parameters": [
          {
            "name": "rulesetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/standardizer/rulesets/{rulesetId}/input-folder/run-automatically": {
      "put": {
        "tags": [
          "Standardizer"
        ],
        "summary": "Turns automatic runs of the input folder on or off, keeping the folder. Turning them on needs the run scope as well.",
        "description": "Scope: `setup`.",
        "operationId": "StandardizerSetRunAutomatically",
        "parameters": [
          {
            "name": "rulesetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetRunAutomaticallyBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetRunAutomaticallyBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetRunAutomaticallyBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/standardizer/rulesets/{rulesetId}/output-folder": {
      "put": {
        "tags": [
          "Standardizer"
        ],
        "summary": "Where runs that save to a folder deliver the fixed drawings: a folder on the input folder's source. Empty clears it.",
        "description": "Scope: `setup`.",
        "operationId": "StandardizerSetOutputFolder",
        "parameters": [
          {
            "name": "rulesetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetOutputFolderBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetOutputFolderBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.SetOutputFolderBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRuleset"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup"
            ]
          }
        ],
        "x-required-scope": "setup"
      }
    },
    "/v1/files": {
      "post": {
        "tags": [
          "Uploads"
        ],
        "summary": "Uploads one file (multipart/form-data, a \"file\" part). For files over 100 MB use an upload\r\nlink (POST /v1/files/uploads) instead. A \"fileName\" field names the file, for callers that\r\nsend bytes without a name: ByLayer tells a file's type by its name.",
        "description": "Scope: `setup or run`.",
        "operationId": "UploadsUpload",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "fileName": {
                    "type": "string"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                },
                "fileName": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicUploadedFile"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicUploadedFile"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicUploadedFile"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup",
              "run"
            ]
          }
        ],
        "x-required-scope": "setup or run"
      }
    },
    "/v1/files/from-url": {
      "post": {
        "tags": [
          "Uploads"
        ],
        "summary": "Adds a file from an address: ByLayer fetches it (https, a public host, at most 100 MB, no\r\nredirects) and it becomes a file as an upload does. For a caller that has a link to a\r\ndrawing and cannot send its bytes. Larger files go through an upload link.",
        "description": "Scope: `setup or run`.",
        "operationId": "UploadsAddFromUrl",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Controllers.AddFileFromUrlBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Controllers.AddFileFromUrlBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Controllers.AddFileFromUrlBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicUploadedFile"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicUploadedFile"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicUploadedFile"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup",
              "run"
            ]
          }
        ],
        "x-required-scope": "setup or run"
      }
    },
    "/v1/files/uploads": {
      "post": {
        "tags": [
          "Uploads"
        ],
        "summary": "An upload link, for a file of any allowed size: PUT the bytes to uploadUrl (with the headers\r\ngiven, and no API key) within the hour, then POST .../complete. The size must be exact.",
        "description": "Scope: `setup or run`.",
        "operationId": "UploadsCreateLink",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Controllers.CreateUploadLinkBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Controllers.CreateUploadLinkBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Controllers.CreateUploadLinkBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicUploadLink"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicUploadLink"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicUploadLink"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup",
              "run"
            ]
          }
        ],
        "x-required-scope": "setup or run"
      }
    },
    "/v1/files/uploads/{uploadId}/complete": {
      "post": {
        "tags": [
          "Uploads"
        ],
        "summary": "Completes an upload link: the bytes are checked (all there, the declared size, what the name\r\nsays) and become a file. Completing again returns the same file.",
        "description": "Scope: `setup or run`.",
        "operationId": "UploadsComplete",
        "parameters": [
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicUploadedFile"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicUploadedFile"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Controllers.PublicUploadedFile"
                }
              }
            }
          },
          "409": {
            "description": "Conflict"
          }
        },
        "security": [
          {
            "ApiKey": [
              "setup",
              "run"
            ]
          }
        ],
        "x-required-scope": "setup or run"
      }
    },
    "/v1/usage/account": {
      "get": {
        "tags": [
          "Usage"
        ],
        "summary": "The credit account: balance, plan allowance left this period, auto-recharge, whether it can run.",
        "description": "Scope: `read`.",
        "operationId": "UsageAccount",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicCreditAccount"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicCreditAccount"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicCreditAccount"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/usage": {
      "get": {
        "tags": [
          "Usage"
        ],
        "summary": "This calendar month: what each tool cost and how its runs ended.",
        "description": "Scope: `read`.",
        "operationId": "UsageThisMonth",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicUsageMonth"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicUsageMonth"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicUsageMonth"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/usage/rates/{tool}": {
      "get": {
        "tags": [
          "Usage"
        ],
        "summary": "What a tool costs per unit (drawing, record or PDF), with any volume bands.",
        "description": "Scope: `read`.",
        "operationId": "UsageRates",
        "parameters": [
          {
            "name": "tool",
            "in": "path",
            "description": "standardizer, auto-fill, plotter, product-configurator or report-generator.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicToolRates"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicToolRates"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicToolRates"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/usage/check/{tool}": {
      "get": {
        "tags": [
          "Usage"
        ],
        "summary": "Whether a run of this many units could start now (balance, allowance, suspension), without starting one.",
        "description": "Scope: `read`.",
        "operationId": "UsageCheck",
        "parameters": [
          {
            "name": "tool",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "units",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRunCheck"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRunCheck"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicRunCheck"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/usage/transactions": {
      "get": {
        "tags": [
          "Usage"
        ],
        "summary": "Credit transactions (top-ups, charges, refunds), newest first.",
        "description": "Scope: `read`.",
        "operationId": "UsageTransactions",
        "parameters": [
          {
            "name": "sinceDays",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The nextCursor of the page before.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTransactionPage"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTransactionPage"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicTransactionPage"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read"
            ]
          }
        ],
        "x-required-scope": "read"
      }
    },
    "/v1/webhooks/events": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "The event types a webhook can subscribe to, and what each one's data holds.",
        "description": "Scope: `webhooks`.",
        "operationId": "WebhooksEvents",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicWebhookEventType"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicWebhookEventType"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicWebhookEventType"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "webhooks"
            ]
          }
        ],
        "x-required-scope": "webhooks"
      }
    },
    "/v1/webhooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "The key's person's webhooks in the key's organization.",
        "description": "Scope: `webhooks`.",
        "operationId": "WebhooksList",
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicWebhook"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicWebhook"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicWebhook"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "webhooks"
            ]
          }
        ],
        "x-required-scope": "webhooks"
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "A new webhook. The answer holds its signing secret, shown this once. tool and setupGroupId\r\nnarrow its run events to one tool's or one setup's runs.",
        "description": "Scope: `webhooks and read`.",
        "operationId": "WebhooksCreate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CreateWebhookBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CreateWebhookBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.CreateWebhookBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWebhookWithSecret"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWebhookWithSecret"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWebhookWithSecret"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          }
        },
        "security": [
          {
            "ApiKey": [
              "webhooks",
              "read"
            ]
          }
        ],
        "x-required-scope": "webhooks and read"
      }
    },
    "/v1/webhooks/flow/{trigger}": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "A Power Automate flow's trigger (docs/power-automate-connector-plan.md §4.6): a webhook to\r\nthe flow's callback address for the trigger's events. trigger is one of standardizer-run,\r\nauto-fill-run, plotter-run, report-generator-run, product-configurator-run (a tool's runs,\r\noptionally one setup's), run (every run), needs-sign-in (a source or an integration must be\r\nsigned in to again), credits-low, or connection (a connect link completed or failed). The\r\nanswer's Location is where the flow deletes it (DELETE) when it is turned off or removed.\r\nThese are counted apart from the webhooks made with POST /v1/webhooks.",
        "description": "Scope: `webhooks and read`.",
        "operationId": "WebhooksCreateForFlow",
        "parameters": [
          {
            "name": "trigger",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.FlowTriggerBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.FlowTriggerBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.FlowTriggerBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWebhook"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWebhook"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWebhook"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          }
        },
        "security": [
          {
            "ApiKey": [
              "webhooks",
              "read"
            ]
          }
        ],
        "x-required-scope": "webhooks and read"
      }
    },
    "/v1/webhooks/make/{trigger}": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "A Make scenario's trigger (docs/make-plan.md §3): as POST /v1/webhooks/flow/{trigger}, with\r\nthe same triggers and body, for the address Make gives its webhook. Make deletes it (DELETE\r\n/v1/webhooks/{id}) when the webhook is removed there. These are counted apart from a\r\nperson's own webhooks and from flows' triggers.",
        "description": "Scope: `webhooks and read`.",
        "operationId": "WebhooksCreateForMake",
        "parameters": [
          {
            "name": "trigger",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.FlowTriggerBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.FlowTriggerBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.FlowTriggerBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWebhook"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWebhook"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWebhook"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          }
        },
        "security": [
          {
            "ApiKey": [
              "webhooks",
              "read"
            ]
          }
        ],
        "x-required-scope": "webhooks and read"
      }
    },
    "/v1/webhooks/{webhookId}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "One webhook.",
        "description": "Scope: `webhooks`.",
        "operationId": "WebhooksGet",
        "parameters": [
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWebhook"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWebhook"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWebhook"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "webhooks"
            ]
          }
        ],
        "x-required-scope": "webhooks"
      },
      "patch": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Changes a webhook's URL, events or description, or turns it on or off.",
        "description": "Scope: `webhooks and read`.",
        "operationId": "WebhooksUpdate",
        "parameters": [
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UpdateWebhookBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UpdateWebhookBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Models.UpdateWebhookBody"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWebhook"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWebhook"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWebhook"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "webhooks",
              "read"
            ]
          }
        ],
        "x-required-scope": "webhooks and read"
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Deletes a webhook: nothing more is sent to it.",
        "description": "Scope: `webhooks`.",
        "operationId": "WebhooksDelete",
        "parameters": [
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "204": {
            "description": "No Content"
          }
        },
        "security": [
          {
            "ApiKey": [
              "webhooks"
            ]
          }
        ],
        "x-required-scope": "webhooks"
      }
    },
    "/v1/webhooks/{webhookId}/rotate-secret": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "A new signing secret, shown this once; the old one stops signing at once.",
        "description": "Scope: `webhooks`.",
        "operationId": "WebhooksRotateSecret",
        "parameters": [
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWebhookWithSecret"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWebhookWithSecret"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWebhookWithSecret"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "webhooks"
            ]
          }
        ],
        "x-required-scope": "webhooks"
      }
    },
    "/v1/webhooks/{webhookId}/test": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Sends a webhook.test event to the webhook now and answers with how it went: a quick check\r\nthat the URL is reachable and the signature is verified. A failed test is not retried and\r\ndoes not turn the webhook off.",
        "description": "Scope: `webhooks`.",
        "operationId": "WebhooksTest",
        "parameters": [
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWebhookDelivery"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWebhookDelivery"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models.PublicWebhookDelivery"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "webhooks"
            ]
          }
        ],
        "x-required-scope": "webhooks"
      }
    },
    "/v1/webhooks/{webhookId}/deliveries": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "The webhook's latest deliveries, newest first, with how each went.",
        "description": "Scope: `webhooks`.",
        "operationId": "WebhooksDeliveries",
        "parameters": [
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "How many, 1 to 100 (default 50).",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicWebhookDelivery"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicWebhookDelivery"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Models.PublicWebhookDelivery"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "webhooks"
            ]
          }
        ],
        "x-required-scope": "webhooks"
      }
    }
  },
  "components": {
    "schemas": {
      "Controllers.AddFileFromUrlBody": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "The file's address: https, on a public host. It must give the file itself, not a page or a redirect.",
            "nullable": true
          },
          "fileName": {
            "type": "string",
            "description": "The file's name, with its extension (A-101.dwg), when the address does not give one. ByLayer tells a file's type by its name.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Controllers.CreateUploadLinkBody": {
        "type": "object",
        "properties": {
          "fileName": {
            "type": "string",
            "description": "The file's name, with its extension (A-101.dwg); its type must be one uploads allow.",
            "nullable": true
          },
          "sizeBytes": {
            "type": "integer",
            "description": "The exact size in bytes; completing refuses any other size.",
            "format": "int64"
          },
          "contentType": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Controllers.MeApiKey": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What the key may do: read, setup, run, connections, webhooks.",
            "nullable": true
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The tools the key is limited to (standardizer, auto-fill, plotter, product-configurator, report-generator); empty for every tool.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Controllers.MeCredits": {
        "type": "object",
        "properties": {
          "balance": {
            "type": "number",
            "description": "Paid credits' value left, in Currency.",
            "format": "double"
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "isLowBalance": {
            "type": "boolean",
            "description": "The balance is running low."
          },
          "includedCredits": {
            "type": "number",
            "description": "The plan's credits this period; null without a plan.",
            "format": "double",
            "nullable": true
          },
          "includedCreditsUsed": {
            "type": "number",
            "description": "How many of the plan's credits are used; null without a plan.",
            "format": "double",
            "nullable": true
          },
          "periodEnd": {
            "type": "string",
            "description": "When the plan's period (and its included credits) renews.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Controllers.MeOrganization": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "string",
            "description": "Owner, Admin, Member or Salesperson. A key never does more than its person's role allows.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Controllers.MeResponse": {
        "type": "object",
        "properties": {
          "user": {
            "$ref": "#/components/schemas/Controllers.MeUser"
          },
          "organization": {
            "$ref": "#/components/schemas/Controllers.MeOrganization"
          },
          "apiKey": {
            "$ref": "#/components/schemas/Controllers.MeApiKey"
          },
          "credits": {
            "$ref": "#/components/schemas/Controllers.MeCredits"
          }
        },
        "additionalProperties": false
      },
      "Controllers.MeUser": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "firstName": {
            "type": "string",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Controllers.PlotterTemplateFileBody": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "integer",
            "description": "The template drawing (.dwg), uploaded with POST /v1/files or an upload link.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "A file uploaded before, by id."
      },
      "Controllers.PublicCadResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "kind": {
            "type": "string",
            "description": "Font or PlotStyle.",
            "nullable": true
          },
          "format": {
            "type": "string",
            "description": "Shx, TrueType, OpenType, TrueTypeCollection, Ctb or Stb: what the file is.",
            "nullable": true
          },
          "fileName": {
            "type": "string",
            "nullable": true
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          },
          "sha256": {
            "type": "string",
            "nullable": true
          },
          "uploadedBy": {
            "$ref": "#/components/schemas/Models.PublicPerson"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "Controllers.PublicIssueState": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "type": "string",
            "description": "Open or Done.",
            "nullable": true
          },
          "fixRunId": {
            "type": "integer",
            "description": "The run Apply fix started, if any; poll it at GET /v1/runs/{id}.",
            "format": "int32",
            "nullable": true
          },
          "fixRunStatus": {
            "type": "string",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Controllers.PublicMember": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "integer",
            "format": "int32"
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "string",
            "description": "Owner, Admin, Member or Salesperson.",
            "nullable": true
          },
          "joinedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "Controllers.PublicOrganization": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "contactEmail": {
            "type": "string",
            "nullable": true
          },
          "industry": {
            "type": "string",
            "nullable": true
          },
          "companySize": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "role": {
            "type": "string",
            "description": "The key's person's role: Owner, Admin, Member or Salesperson.",
            "nullable": true
          },
          "memberCount": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Controllers.PublicUploadLink": {
        "type": "object",
        "properties": {
          "uploadId": {
            "type": "string",
            "description": "Names the upload in the complete call.",
            "nullable": true
          },
          "uploadUrl": {
            "type": "string",
            "description": "PUT the file's bytes here, with Headers, and no API key.",
            "nullable": true
          },
          "method": {
            "type": "string",
            "nullable": true
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          },
          "completePath": {
            "type": "string",
            "description": "POST here with the API key once the bytes are up.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Controllers.PublicUploadedFile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          },
          "contentType": {
            "type": "string",
            "nullable": true
          },
          "direction": {
            "type": "string",
            "description": "Input (put in) or Output (made by a run).",
            "nullable": true
          },
          "runId": {
            "type": "integer",
            "description": "The run that made it, for an output.",
            "format": "int32",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "downloadPath": {
            "type": "string",
            "description": "GET it with the API key to download the file.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.CheckCrmRecordsBody": {
        "type": "object",
        "properties": {
          "recordIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.CompleteConnectionBody": {
        "type": "object",
        "properties": {
          "driveId": {
            "type": "string",
            "description": "SharePoint: the document library picked from GET /v1/connections/{id}/sites/{siteId}/drives.",
            "nullable": true
          },
          "folders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicFolderSelection"
            },
            "description": "A new source: the folders ByLayer may use (at least one). Left out, the source's account is\r\nopened as a session to browse first; save it with POST /v1/sources.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Finishes a signed-in connection."
      },
      "Models.ConnectProviderBody": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "description": "The provider, as GET /v1/sources/providers or GET /v1/integrations lists it (\"google-drive\", \"hubspot\").",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.CreateConfigurationBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "What the form is for (\"Meeting room door\").",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "copyFromConfigurationId": {
            "type": "integer",
            "description": "Start as a copy of this configuration: its document, template and printing.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.CreateMappingBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "What the office calls it (\"Title block A1\").",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "copyFromMappingId": {
            "type": "integer",
            "description": "Start as a copy of this mapping: its template, scan, source, output and mapping document.",
            "format": "int32",
            "nullable": true
          },
          "templateFileId": {
            "type": "integer",
            "description": "Use a template drawing uploaded before (a file id, e.g. another mapping's template) instead of uploading one.",
            "format": "int32",
            "nullable": true
          },
          "fillDrawingsYouProvide": {
            "type": "boolean",
            "description": "True: every run brings its own drawing to fill. False or left out: runs fill copies of the template.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.CreatePrintProfileBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "What the office calls it (\"A1 colour sets\").",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "copyFromProfileId": {
            "type": "integer",
            "description": "Start with a copy of this profile's document and template drawing.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.CreateReportBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "What the office calls it (\"BOMA area report\").",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "copyFromReportId": {
            "type": "integer",
            "description": "Start as a copy of this report: its document, template and sample drawing.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.CreateRulesetBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "What the office calls it (\"Architectural CAD standard\").",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "copyRulesFromRulesetId": {
            "type": "integer",
            "description": "Start with a copy of this ruleset's rules.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.CreateSourceBody": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string",
            "description": "The session (POST /v1/sources/sessions or a connection's sessionId).",
            "nullable": true
          },
          "folders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicFolderSelection"
            },
            "description": "The folders ByLayer may use; at least one.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.CreateWebhookBody": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "An https URL on a public host.",
            "nullable": true
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The events to send (GET /v1/webhooks/events lists them).",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "What the webhook is for; at most 200 characters.",
            "nullable": true
          },
          "tool": {
            "type": "string",
            "description": "Run events only: hear of this tool's runs alone (standardizer, auto-fill, plotter, product-configurator, report-generator).",
            "nullable": true
          },
          "setupGroupId": {
            "type": "string",
            "description": "Run events only: hear of this setup's runs alone (a ruleset's, mapping's, profile's, configuration's or report's setupGroupId).",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.DescribeBody": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Your standards or setup in plain words, for the assistant to turn into proposed items."
      },
      "Models.DescribeConfigurationBody": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "nullable": true
          },
          "document": {
            "description": "The draft document to propose against; left out uses the saved one.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Your form described in words, and optionally the draft document as it is now (unsaved changes included)."
      },
      "Models.DescribeMappingBody": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "nullable": true
          },
          "mapping": {
            "description": "The mapping document as it is now, unsaved changes included.",
            "nullable": true
          },
          "sourceKind": {
            "type": "string",
            "description": "Manual, Excel or Crm.",
            "nullable": true
          },
          "crmIntegrationId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "crmDataAccessId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The assistant for a mapping: the setup described in words. Mapping and source left out use the\r\nmapping as saved; send the document you are working on to have the assistant see unsaved changes."
      },
      "Models.DescribeReportBody": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "What the report should fill, in plain words. Leave it out with learn = true.",
            "nullable": true
          },
          "learn": {
            "type": "boolean",
            "description": "Read the template and the sample drawing's scan and propose everything the template asks for (no description needed)."
          },
          "document": {
            "description": "The draft as it is now, unsaved changes included; left out uses the saved document.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Describe: the setup's needs in words, proposed as changes to the document."
      },
      "Models.FillConfigurationBody": {
        "type": "object",
        "properties": {
          "values": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "nullable": true
            },
            "description": "Values by data field key: text as typed, numbers with a dot (\"1200.5\"), yes/no as \"true\"/\"false\",\r\na choice or visibility state by its name, dates as yyyy-MM-dd. Required fields must be given.\r\nA number or true/false may be sent as such. GET .../values-schema lists the fields.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A filled-in form: values by data field key, as the configuration's fields accept them."
      },
      "Models.FindRecordsBody": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Key field values of the records to read.",
            "nullable": true
          },
          "fieldIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The fields to read; left out reads every field ByLayer may read.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.FlowTriggerBody": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "The flow's callback address: an https URL on a public host. Filled in by Power Automate.",
            "nullable": true
          },
          "outcome": {
            "type": "string",
            "description": "A run trigger: start on runs that ended this way: any (the default), succeeded, failed or cancelled.",
            "nullable": true
          },
          "setupGroupId": {
            "type": "string",
            "description": "A tool's run trigger: only the runs of this setup (its setupGroupId); left out, every run of the tool.",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A flow trigger's webhook (POST /v1/webhooks/flow/{trigger}), or a Make scenario's (POST\r\n/v1/webhooks/make/{trigger}): where it listens, and which of the trigger's events start it."
      },
      "Models.ImportRulesetBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The new ruleset's name; left out uses the export's.",
            "nullable": true
          },
          "export": {
            "description": "The export, as it was downloaded (format bylayer-standardizer-ruleset)."
          }
        },
        "additionalProperties": false,
        "description": "A ruleset as GET /v1/standardizer/rulesets/{id}/export writes it, to make a new ruleset from."
      },
      "Models.PublicApp": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicAssistantStatus": {
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean"
          },
          "remaining": {
            "type": "integer",
            "description": "1 while a request can be made, 0 once this month's spending cap is reached or the assistant is not available. It is not a count of requests.",
            "format": "int32"
          },
          "maxLength": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Whether the assistant is available, whether a request can be made this month, and the longest description it takes."
      },
      "Models.PublicAutoFillReference": {
        "type": "object",
        "properties": {
          "mappingSchema": {
            "description": "JSON Schema of the mapping document (dataFields, bindings, repeats)."
          },
          "sourceKinds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A mapping's sourceKind.",
            "nullable": true
          },
          "bindingSourceKinds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A binding's source.kind: manual (the data field's default), excel (sheetIndex + cell), crm (fieldId).",
            "nullable": true
          },
          "outputModes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A mapping's outputMode.",
            "nullable": true
          },
          "valueTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A data field's type.",
            "nullable": true
          },
          "transforms": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A binding's transform.",
            "nullable": true
          },
          "targetKinds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The kinds of places a scan finds; a binding's target is a scan target key.",
            "nullable": true
          },
          "dwgVersions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicDwgVersion"
            },
            "description": "outputDwgVersion codes and what they are.",
            "nullable": true
          },
          "quickSelectTargets": {
            "$ref": "#/components/schemas/Models.PublicQuickSelectTargets"
          },
          "targetKeyPrefixes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The prefixes of target keys that name a property rather than a scanned place (entprop:, refprop:, xdata:, xrec:, layer:) or a quick select (qsel:).",
            "nullable": true
          },
          "templateFingerprint": {
            "type": "string",
            "description": "What the mapping document's templateFingerprint is for.",
            "nullable": true
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "howMappingsWork": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What a mapping is and what each part of its document does, in words: the schema says what it may hold, this what it means.",
            "nullable": true
          },
          "example": {
            "description": "A whole mapping document, for a mapping whose values are filled in when it runs; its targets stand for keys copied from a scan."
          }
        },
        "additionalProperties": false,
        "description": "Everything needed to write a mapping document, and the values its setup takes."
      },
      "Models.PublicAutoFillRunResult": {
        "type": "object",
        "properties": {
          "run": {
            "$ref": "#/components/schemas/Models.PublicRun"
          },
          "dataSource": {
            "type": "string",
            "description": "Where the run's data came from (\"Upload from computer\", \"HubSpot\", a source's name).",
            "nullable": true
          },
          "location": {
            "type": "string",
            "description": "The files or folder it read (\"Projects / Tower A\", \"a.xlsx, b.xlsx\").",
            "nullable": true
          },
          "output": {
            "type": "string",
            "description": "Where the drawings were delivered, when the run saved them to a folder.",
            "nullable": true
          },
          "notFound": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A CRM run's record ids the CRM did not have; they were left out (and not charged).",
            "nullable": true
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What the run reported but did not fail on (a changed template, locations a drawing does not have).",
            "nullable": true
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicFilledDrawing"
            },
            "description": "Each drawing made, once the run has succeeded; empty before, and for runs made before this was recorded.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An Auto Fill run's results (GET /v1/auto-fill/runs/{id}): the run, where its data came from, each\r\ndrawing it made with the values written into it, and what it left out."
      },
      "Models.PublicCategoryCount": {
        "type": "object",
        "properties": {
          "rules": {
            "type": "integer",
            "format": "int32"
          },
          "errors": {
            "type": "integer",
            "format": "int32"
          },
          "warnings": {
            "type": "integer",
            "format": "int32"
          },
          "infos": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Models.PublicCell": {
        "type": "object",
        "properties": {
          "row": {
            "type": "integer",
            "description": "Zero-based; a binding's cell is A1-style (\"B4\" is row 3, column 1).",
            "format": "int32"
          },
          "column": {
            "type": "integer",
            "description": "Zero-based.",
            "format": "int32"
          },
          "value": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicCheckResult": {
        "type": "object",
        "properties": {
          "run": {
            "$ref": "#/components/schemas/Models.PublicRun"
          },
          "drawings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicCheckedDrawing"
            },
            "nullable": true
          },
          "issues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicIssue"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A check's results: the run, how each drawing did, and its issues with what was done about each.\r\nDrawings and issues are empty until the run has succeeded. At most 100 issues of one rule in one\r\ndrawing are listed, and 5,000 in all; a drawing's and a rule's counts are of every issue found."
      },
      "Models.PublicCheckedDrawing": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "checked": {
            "type": "integer",
            "description": "Rules evaluated on the drawing.",
            "format": "int32"
          },
          "issues": {
            "type": "integer",
            "description": "Issues left (not fixed).",
            "format": "int32"
          },
          "fixed": {
            "type": "integer",
            "format": "int32"
          },
          "fixedFileId": {
            "type": "integer",
            "description": "The fixed drawing, when the run fixed anything: download it from /v1/files/{id}/content.",
            "format": "int32",
            "nullable": true
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicRuleOutcome"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicConfiguration": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "setupGroupId": {
            "type": "string",
            "description": "Stays the same across versions; runs carry it (filter GET /v1/product-configurator/runs?configurationId= or /v1/runs?setupGroupId=).",
            "format": "uuid",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Draft (being set up; nobody fills it in yet), Active (published) or Archived.",
            "nullable": true
          },
          "version": {
            "type": "integer",
            "description": "The current document's version; each save that changes the document makes a new one.",
            "format": "int32",
            "nullable": true
          },
          "setupStep": {
            "type": "integer",
            "description": "The setup step the portal reopens: 1 Template … 5 Publish.",
            "format": "int32"
          },
          "template": {
            "$ref": "#/components/schemas/Models.PublicTemplateFile"
          },
          "fieldCount": {
            "type": "integer",
            "description": "Form fields placed in the drawing.",
            "format": "int32"
          },
          "printing": {
            "$ref": "#/components/schemas/Models.PublicConfigurationPrinting"
          },
          "owner": {
            "$ref": "#/components/schemas/Models.PublicPerson"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastRunAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "document": {
            "description": "The configuration document (see GET /v1/product-configurator/reference); only when one configuration is read.",
            "nullable": true
          },
          "printProfile": {
            "description": "The linked Plotter profile's current settings, when printing links one; only when one configuration is read.",
            "nullable": true
          },
          "printProfileUsedBy": {
            "type": "integer",
            "description": "How many configurations print with the linked profile; only when one configuration is read.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A Product Configurator configuration: a template drawing turned into a form. Owners and admins\r\nset it up (template, scan, form fields, printing, publish); members and salespeople fill in the\r\npublished ones, and each filled-in form prints to a PDF."
      },
      "Models.PublicConfigurationChange": {
        "type": "object",
        "properties": {
          "section": {
            "type": "string",
            "description": "Form fields, Printing or File name.",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "before": {
            "type": "string",
            "nullable": true
          },
          "after": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicConfigurationCheck": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "template, fields or printing.",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "passed": {
            "type": "boolean"
          },
          "message": {
            "type": "string",
            "description": "What to do, when it failed.",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "description": "What was found, when it passed.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicConfigurationPrinting": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "integer",
            "description": "The linked Plotter profile (GET /v1/plotter/profiles), or null when the document keeps its own profile.",
            "format": "int32",
            "nullable": true
          },
          "profileName": {
            "type": "string",
            "nullable": true
          },
          "printTemplate": {
            "$ref": "#/components/schemas/Models.PublicTemplateFile"
          }
        },
        "additionalProperties": false
      },
      "Models.PublicConfigurationReadiness": {
        "type": "object",
        "properties": {
          "canPublish": {
            "type": "boolean"
          },
          "checks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicConfigurationCheck"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "What Publish (and every print) checks, each with what to do about it."
      },
      "Models.PublicConfigurationVersion": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "isCurrent": {
            "type": "boolean"
          },
          "createdBy": {
            "$ref": "#/components/schemas/Models.PublicPerson"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "document": {
            "description": "The document of this version; only when one version is read.",
            "nullable": true
          },
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicConfigurationChange"
            },
            "description": "What changed against the version before; only when one version is read.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicConfiguratorLearning": {
        "type": "object",
        "properties": {
          "learning": {
            "$ref": "#/components/schemas/Models.PublicLearningOfPublicProposedField"
          },
          "samePlaces": {
            "type": "integer",
            "description": "Places that are the same in every drawing: the template's own, not on the form.",
            "format": "int32"
          },
          "fileNamePattern": {
            "type": "string",
            "description": "The PDF name pattern the drawings' file names suggest (\"{size}-{finish}\"), for the document's fileNamePattern.",
            "nullable": true
          },
          "configuration": {
            "$ref": "#/components/schemas/Models.PublicConfiguration"
          }
        },
        "additionalProperties": false,
        "description": "Learning from drawings made from one template: the first becomes the configuration's template,\r\nall are read by a free run, and the fields they vary in are proposed (nothing saved)."
      },
      "Models.PublicConfiguratorReference": {
        "type": "object",
        "properties": {
          "documentSchema": { },
          "schemaVersion": {
            "type": "integer",
            "format": "int32"
          },
          "fieldKinds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "ruleLimits": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "valueTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "defaultDateFormat": {
            "type": "string",
            "nullable": true
          },
          "maxUsualValues": {
            "type": "integer",
            "format": "int32"
          },
          "dateFormats": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "How to write a configuration document: its JSON Schema, the form field kinds and rule limits,\r\nthe value types a data field can have, and the order of the setup."
      },
      "Models.PublicConfiguratorRun": {
        "type": "object",
        "properties": {
          "run": {
            "$ref": "#/components/schemas/Models.PublicRun"
          },
          "configurationId": {
            "type": "integer",
            "description": "The configuration the run filled in; null if it has been deleted since.",
            "format": "int32",
            "nullable": true
          },
          "configurationName": {
            "type": "string",
            "description": "Its name when the run was made.",
            "nullable": true
          },
          "values": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "The values the run filled in, by data field key (null for a field left empty).",
            "nullable": true
          },
          "printProfileName": {
            "type": "string",
            "description": "The printing the run printed with (\"Standard PDF\" when none was set).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A print or preview with what it was filled in with: the run, the configuration it used, and the\r\nvalues by data field key, as the portal's run page shows them under Values used (and Re-fill uses)."
      },
      "Models.PublicConnectionStatus": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "kind": {
            "type": "string",
            "description": "source, source_reconnect, connector_reconnect, integration or integration_reconnect.",
            "nullable": true
          },
          "provider": {
            "type": "string",
            "nullable": true
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "pending (waiting for the sign-in), authorized (signed in: finish it as Next says), completed, failed or expired.",
            "nullable": true
          },
          "connectUrl": {
            "type": "string",
            "description": "The link to open in a browser; null once the sign-in is done.",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "description": "When an unfinished sign-in stops being usable.",
            "format": "date-time"
          },
          "requiresSiteSelection": {
            "type": "boolean",
            "description": "SharePoint: pick a site and document library (GET /v1/connections/{id}/sites) before finishing."
          },
          "sessionId": {
            "type": "string",
            "description": "A new source: the signed-in account to browse (GET /v1/sources/sessions/{sessionId}/folders) and save (POST /v1/sources).",
            "nullable": true
          },
          "sourceId": {
            "type": "integer",
            "description": "The source it made or reconnected, once completed.",
            "format": "int32",
            "nullable": true
          },
          "integrationId": {
            "type": "integer",
            "description": "The integration it made or reconnected, once completed.",
            "format": "int32",
            "nullable": true
          },
          "connectorId": {
            "type": "integer",
            "description": "The connector it reconnected.",
            "format": "int32",
            "nullable": true
          },
          "error": {
            "type": "string",
            "description": "Why it failed.",
            "nullable": true
          },
          "next": {
            "type": "string",
            "description": "What to do now, in a sentence.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A sign-in started over the API. Give ByLayer.API.PublicApi.Models.PublicConnectionStatus.ConnectUrl to the person who owns the account;\r\nthey open it and sign in. Poll GET /v1/connections/{id} until ByLayer.API.PublicApi.Models.PublicConnectionStatus.Status is completed,\r\nfailed or expired; ByLayer.API.PublicApi.Models.PublicConnectionStatus.Next says what to do at each step."
      },
      "Models.PublicConnector": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "provider": {
            "type": "string",
            "nullable": true
          },
          "folderPath": {
            "type": "string",
            "nullable": true
          },
          "resultFolderPath": {
            "type": "string",
            "nullable": true
          },
          "searchPattern": {
            "type": "string",
            "nullable": true
          },
          "active": {
            "type": "boolean",
            "description": "False while paused."
          },
          "needsReauthentication": {
            "type": "boolean"
          },
          "pausedForBilling": {
            "type": "boolean",
            "description": "Paused because the account could not pay for runs."
          },
          "billingPauseReason": {
            "type": "string",
            "nullable": true
          },
          "lastPolledAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastErrorAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastError": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A watched folder: files dropped in it start runs of a tool's setup."
      },
      "Models.PublicCreditAccount": {
        "type": "object",
        "properties": {
          "creditAccountId": {
            "type": "integer",
            "format": "int32"
          },
          "ownerType": {
            "type": "string",
            "nullable": true
          },
          "ownerId": {
            "type": "integer",
            "format": "int32"
          },
          "balance": {
            "type": "number",
            "format": "double"
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "isLowBalance": {
            "type": "boolean"
          },
          "windowRunCount": {
            "type": "integer",
            "format": "int32"
          },
          "windowDays": {
            "type": "integer",
            "format": "int32"
          },
          "spendThisMonth": {
            "type": "number",
            "format": "double"
          },
          "creditPrice": {
            "type": "number",
            "format": "double"
          },
          "creditsThisMonth": {
            "type": "number",
            "format": "double"
          },
          "includedCredits": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "includedCreditsUsed": {
            "type": "number",
            "format": "double"
          },
          "periodStart": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "periodEnd": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicCrmRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The value a run fetches the record by.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicCrmRecordCheck": {
        "type": "object",
        "properties": {
          "recordNoun": {
            "type": "string",
            "nullable": true
          },
          "keyLabel": {
            "type": "string",
            "nullable": true
          },
          "mappedFields": {
            "type": "integer",
            "description": "How many CRM fields the mapping reads.",
            "format": "int32"
          },
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicCrmRecordFound"
            },
            "nullable": true
          },
          "notFound": {
            "type": "integer",
            "description": "How many ids the CRM does not have.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Record ids checked against the CRM before a run."
      },
      "Models.PublicCrmRecordFound": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "found": {
            "type": "boolean"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "filled": {
            "type": "integer",
            "description": "How many of the mapping's CRM fields the record has a value for.",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Models.PublicCrmRecords": {
        "type": "object",
        "properties": {
          "recordNoun": {
            "type": "string",
            "description": "The table's name (\"Projects\").",
            "nullable": true
          },
          "keyLabel": {
            "type": "string",
            "description": "What the record id is called.",
            "nullable": true
          },
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicCrmRecord"
            },
            "nullable": true
          },
          "canBrowse": {
            "type": "boolean",
            "description": "False when this CRM cannot list records: run by typed ids only."
          },
          "more": {
            "type": "boolean",
            "description": "There are more records than listed; narrow the search."
          }
        },
        "additionalProperties": false,
        "description": "A Crm mapping's table records, filtered by the search."
      },
      "Models.PublicCrmTrigger": {
        "type": "object",
        "properties": {
          "fieldId": {
            "type": "string",
            "description": "The yes/no field, by the id the CRM data lists it under.",
            "nullable": true
          },
          "fieldLabel": {
            "type": "string",
            "description": "The field as the CRM names it (\"Ready for CAD\").",
            "nullable": true
          },
          "runAutomatically": {
            "type": "boolean",
            "description": "Whether ticked records start runs. The CRM is only asked while the mapping is Active."
          },
          "lastError": {
            "type": "string",
            "description": "Why the last check could not read the CRM or start a run, if it could not.",
            "nullable": true
          },
          "lastCheckedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A CRM mapping's automatic start: a run begins when a record's yes/no field is on. Read-only: ByLayer never changes the CRM."
      },
      "Models.PublicCrmTriggerField": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicCrmTriggerOptions": {
        "type": "object",
        "properties": {
          "supported": {
            "type": "boolean",
            "description": "False when this CRM cannot list its ticked records: such a mapping is run by hand."
          },
          "crmName": {
            "type": "string",
            "nullable": true
          },
          "objectName": {
            "type": "string",
            "nullable": true
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicCrmTriggerField"
            },
            "description": "The yes/no fields ByLayer may read on the mapping's CRM data.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "What a CRM mapping can start from."
      },
      "Models.PublicDataAccess": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "integrationId": {
            "type": "integer",
            "format": "int32"
          },
          "appId": {
            "type": "string",
            "nullable": true
          },
          "appName": {
            "type": "string",
            "nullable": true
          },
          "tableId": {
            "type": "string",
            "nullable": true
          },
          "tableName": {
            "type": "string",
            "nullable": true
          },
          "keyFieldId": {
            "type": "string",
            "description": "The field records are looked up by.",
            "nullable": true
          },
          "keyFieldLabel": {
            "type": "string",
            "nullable": true
          },
          "fieldScope": {
            "type": "string",
            "description": "All (every field, including ones added later) or Selected.",
            "nullable": true
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicField"
            },
            "nullable": true
          },
          "selectedFieldIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "allowedFieldIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The fields ByLayer may read now.",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "A table ByLayer may read, and which fields."
      },
      "Models.PublicDwgVersion": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicEntry": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "path": {
            "type": "string",
            "nullable": true
          },
          "lastModified": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A folder or file in an account, as the provider lists it."
      },
      "Models.PublicField": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "description": "Text, Number, Yes/No, Date, Choice, Link…",
            "nullable": true
          },
          "rawType": {
            "type": "string",
            "description": "What the CRM itself calls the type.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicFieldChange": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "nullable": true
          },
          "before": {
            "type": "string",
            "nullable": true
          },
          "after": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicFile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          },
          "downloadPath": {
            "type": "string",
            "description": "GET it with the same API key to download the file.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicFileIds": {
        "type": "object",
        "properties": {
          "fileIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Files a run takes that were uploaded before (POST /v1/files or an upload link), by id."
      },
      "Models.PublicFilledDrawing": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The drawing's file name (\"PN-100_RevB.dwg\").",
            "nullable": true
          },
          "record": {
            "type": "string",
            "description": "The record it was filled from: a workbook's file name, a CRM record id, \"manual\".",
            "nullable": true
          },
          "fileId": {
            "type": "integer",
            "description": "The drawing: download it from /v1/files/{id}/content.",
            "format": "int32",
            "nullable": true
          },
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicWrittenValue"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicFolder": {
        "type": "object",
        "properties": {
          "sourceId": {
            "type": "integer",
            "format": "int32"
          },
          "provider": {
            "type": "string",
            "nullable": true
          },
          "sourceName": {
            "type": "string",
            "nullable": true
          },
          "path": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "lastModified": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "accessible": {
            "type": "boolean",
            "description": "False when it was chosen before but the account no longer lists it."
          },
          "webUrl": {
            "type": "string",
            "description": "The folder in the provider's web app, when the provider has links.",
            "nullable": true
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicFolderLink"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A folder ByLayer may use, with the watched-folder runs that read from or deliver to it."
      },
      "Models.PublicFolderLink": {
        "type": "object",
        "properties": {
          "connectorId": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "string",
            "description": "Input (it watches the folder) or Output (it delivers there).",
            "nullable": true
          },
          "tool": {
            "type": "string",
            "description": "standardizer, auto-fill, plotter, product-configurator or report-generator.",
            "nullable": true
          },
          "applicationId": {
            "type": "integer",
            "format": "int32"
          },
          "applicationName": {
            "type": "string",
            "nullable": true
          },
          "setupGroupId": {
            "type": "string",
            "description": "The setup the auto run runs (its setupGroupId): match it to a tool's ruleset, mapping, profile, configuration or report, or filter /v1/runs by it.",
            "format": "uuid",
            "nullable": true
          },
          "setupName": {
            "type": "string",
            "description": "The ruleset, mapping, profile, configuration or report it runs.",
            "nullable": true
          },
          "active": {
            "type": "boolean"
          },
          "organizationId": {
            "type": "integer",
            "description": "The organization the auto run belongs to; null for one of the person's own. Pausing or removing it acts in that scope.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicFolderLinkUrl": {
        "type": "object",
        "properties": {
          "webUrl": {
            "type": "string",
            "description": "The folder in the provider's web app; null when the provider has no links.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicFolderSelection": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "The folder's path in the account, as it is listed (\"Projects/Tower A\").",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "A name to show for it; left out uses the folder's own.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicIngestion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "fileName": {
            "type": "string",
            "nullable": true
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          },
          "status": {
            "type": "string",
            "description": "How far it got: picked up, run started, failed…",
            "nullable": true
          },
          "attempts": {
            "type": "integer",
            "format": "int32"
          },
          "runId": {
            "type": "integer",
            "description": "The run it started; GET /v1/runs/{id}.",
            "format": "int32",
            "nullable": true
          },
          "error": {
            "type": "string",
            "nullable": true
          },
          "deliveryStatus": {
            "type": "string",
            "description": "Whether the results were delivered to the result folder.",
            "nullable": true
          },
          "deliveryError": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A file a watched folder picked up, and the run it started."
      },
      "Models.PublicInputFolder": {
        "type": "object",
        "properties": {
          "sourceId": {
            "type": "integer",
            "format": "int32"
          },
          "sourceName": {
            "type": "string",
            "nullable": true
          },
          "provider": {
            "type": "string",
            "nullable": true
          },
          "folderPath": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "runAutomatically": {
            "type": "boolean",
            "description": "Whether dropped files start runs now. Off while the setup is a Draft."
          },
          "lastError": {
            "type": "string",
            "description": "Why the last attempt to read the folder failed, if it did.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The folder a setup watches: a drawing (or data file) dropped in it starts a run on its own."
      },
      "Models.PublicIntegration": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "provider": {
            "type": "string",
            "nullable": true
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "hasApps": {
            "type": "boolean"
          },
          "accountLabelName": {
            "type": "string",
            "nullable": true
          },
          "account": {
            "type": "string",
            "description": "The account it signed in to (a realm, an instance), when the CRM has one.",
            "nullable": true
          },
          "authentication": {
            "type": "string",
            "nullable": true
          },
          "owner": {
            "$ref": "#/components/schemas/Models.PublicPerson"
          },
          "active": {
            "type": "boolean",
            "description": "False while paused: no tool reads it."
          },
          "needsReauthentication": {
            "type": "boolean",
            "description": "The CRM no longer accepts the sign-in: reconnect it."
          },
          "lastErrorAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastError": {
            "type": "string",
            "nullable": true
          },
          "connectedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "dataAccess": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicDataAccess"
            },
            "description": "The tables ByLayer may read, and which of their fields.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A connected CRM account and the tables ByLayer may read in it."
      },
      "Models.PublicIntegrationCard": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "nullable": true
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "tagline": {
            "type": "string",
            "nullable": true
          },
          "logoUrl": {
            "type": "string",
            "nullable": true
          },
          "hasApps": {
            "type": "boolean",
            "description": "The CRM groups tables in apps (bases, boards): list them with GET .../apps first."
          },
          "integration": {
            "$ref": "#/components/schemas/Models.PublicIntegration"
          }
        },
        "additionalProperties": false,
        "description": "A CRM or data app ByLayer can connect (only those set up are listed), with the key's person's integration to it, if any."
      },
      "Models.PublicIssue": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "description": "The issue's number in the run: what the status and fix calls take.",
            "format": "int32"
          },
          "drawing": {
            "type": "string",
            "nullable": true
          },
          "ruleId": {
            "type": "string",
            "nullable": true
          },
          "rule": {
            "type": "string",
            "nullable": true
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "severity": {
            "type": "string",
            "nullable": true
          },
          "object": {
            "type": "string",
            "description": "What the object is, in words (\"Block DOOR-36 on A-101\").",
            "nullable": true
          },
          "handle": {
            "type": "string",
            "description": "The object's handle in the drawing; null for a count, a setting or the whole drawing.",
            "nullable": true
          },
          "handles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "For an issue about a layer or style: the objects it is about (texts asking for a missing style, objects on a wrong layer), at most 200; null otherwise.",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "why": {
            "type": "string",
            "nullable": true
          },
          "fixed": {
            "type": "boolean",
            "description": "The run fixed it."
          },
          "fixText": {
            "type": "string",
            "description": "What Apply fix would do (\"Set Layer to A-DOOR.\"); null when only a person can resolve it.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Open or Done (someone marked it resolved).",
            "nullable": true
          },
          "fixRunId": {
            "type": "integer",
            "description": "The run Apply fix started for it, if any.",
            "format": "int32",
            "nullable": true
          },
          "fixRunStatus": {
            "type": "string",
            "nullable": true
          },
          "updatedBy": {
            "$ref": "#/components/schemas/Models.PublicIssueAuthor"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One thing a rule found wrong in a drawing."
      },
      "Models.PublicIssueAuthor": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "The person's name as the portal shows it; null when unknown.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicLearningOfPublicProposedField": {
        "type": "object",
        "properties": {
          "runId": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "progressPercent": {
            "type": "integer",
            "format": "int32"
          },
          "progressMessage": {
            "type": "string",
            "nullable": true
          },
          "errorMessage": {
            "type": "string",
            "nullable": true
          },
          "drawings": {
            "type": "integer",
            "format": "int32"
          },
          "unreadable": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicProposedField"
            },
            "nullable": true
          },
          "dropped": {
            "type": "integer",
            "format": "int32"
          },
          "nextPollAfterSeconds": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Learning from drawings: a free run reads the drawings; once it has succeeded, ByLayer.API.PublicApi.Models.PublicLearning`1.Items\r\nis what they share, proposed (nothing saved). Poll until Status is Succeeded or Failed."
      },
      "Models.PublicLearningOfStandardizerRule": {
        "type": "object",
        "properties": {
          "runId": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "progressPercent": {
            "type": "integer",
            "format": "int32"
          },
          "progressMessage": {
            "type": "string",
            "nullable": true
          },
          "errorMessage": {
            "type": "string",
            "nullable": true
          },
          "drawings": {
            "type": "integer",
            "format": "int32"
          },
          "unreadable": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.StandardizerRule"
            },
            "nullable": true
          },
          "dropped": {
            "type": "integer",
            "format": "int32"
          },
          "nextPollAfterSeconds": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Learning from drawings: a free run reads the drawings; once it has succeeded, ByLayer.API.PublicApi.Models.PublicLearning`1.Items\r\nis what they share, proposed (nothing saved). Poll until Status is Succeeded or Failed."
      },
      "Models.PublicMapping": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Draft (being set up; cannot run yet), Active (published) or Archived.",
            "nullable": true
          },
          "setupGroupId": {
            "type": "string",
            "description": "The mapping across its versions: its runs carry the same setupGroupId (GET /v1/runs?setupGroupId=).",
            "format": "uuid",
            "nullable": true
          },
          "version": {
            "type": "integer",
            "description": "The current mapping document's version; each save that changes it makes a new one.",
            "format": "int32",
            "nullable": true
          },
          "owner": {
            "$ref": "#/components/schemas/Models.PublicPerson"
          },
          "sourceKind": {
            "type": "string",
            "description": "Where a run's values come from: Manual (the data fields' default values), Excel (a workbook per run, read by cell) or Crm (records of a connected CRM table).",
            "nullable": true
          },
          "crmIntegrationId": {
            "type": "integer",
            "description": "A Crm mapping's integration (GET /v1/integrations).",
            "format": "int32",
            "nullable": true
          },
          "crmDataAccessId": {
            "type": "integer",
            "description": "A Crm mapping's table access in that integration.",
            "format": "int32",
            "nullable": true
          },
          "template": {
            "$ref": "#/components/schemas/Models.PublicMappingTemplate"
          },
          "sampleWorkbook": {
            "$ref": "#/components/schemas/Models.PublicMappingFile"
          },
          "outputMode": {
            "type": "string",
            "description": "Download (runs offer the drawings to download) or Folder (runs also save them to the output folder).",
            "nullable": true
          },
          "fileNamePattern": {
            "type": "string",
            "description": "The filled drawings' file names, with {field_key} placeholders (\"{drawing_no}-{revision}\"); null uses the template's name.",
            "nullable": true
          },
          "outputDwgVersion": {
            "type": "string",
            "description": "The DWG version drawings are saved in (\"AC1027\"); null keeps the template's own.",
            "nullable": true
          },
          "fillDrawingsYouProvide": {
            "type": "boolean",
            "description": "True: every run brings its own drawing (drawingFileId) and the template only set the mapping up. False: runs fill copies of the template."
          },
          "dataFieldCount": {
            "type": "integer",
            "description": "The named values the mapping defines.",
            "format": "int32"
          },
          "mappedFieldCount": {
            "type": "integer",
            "description": "How many of them land somewhere on the drawing.",
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastRunAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "mapping": {
            "description": "The mapping document (GET /v1/auto-fill/reference describes it); only when one mapping is read.",
            "nullable": true
          },
          "inputFolder": {
            "$ref": "#/components/schemas/Models.PublicInputFolder"
          },
          "outputFolder": {
            "$ref": "#/components/schemas/Models.PublicOutputFolder"
          },
          "crmTrigger": {
            "$ref": "#/components/schemas/Models.PublicCrmTrigger"
          }
        },
        "additionalProperties": false,
        "description": "An Auto Fill mapping: how values from a record (typed in, an Excel workbook, or a CRM record)\r\nland on a template drawing's title block, attributes, texts and properties. A run fills one\r\ndrawing per record."
      },
      "Models.PublicMappingChange": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "nullable": true
          },
          "target": {
            "type": "string",
            "nullable": true
          },
          "before": {
            "type": "string",
            "nullable": true
          },
          "after": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicMappingChanges": {
        "type": "object",
        "properties": {
          "added": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicMappingChange"
            },
            "nullable": true
          },
          "modified": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicMappingChange"
            },
            "nullable": true
          },
          "removed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicMappingChange"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicMappingCheck": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Pass, Warning or Error.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicMappingFile": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "integer",
            "description": "Download it from /v1/files/{id}/content.",
            "format": "int32"
          },
          "fileName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicMappingLearning": {
        "type": "object",
        "properties": {
          "runId": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "progressPercent": {
            "type": "integer",
            "format": "int32"
          },
          "progressMessage": {
            "type": "string",
            "nullable": true
          },
          "errorMessage": {
            "type": "string",
            "nullable": true
          },
          "drawings": {
            "type": "integer",
            "format": "int32"
          },
          "unreadable": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicProposedFill"
            },
            "nullable": true
          },
          "samePlaces": {
            "type": "integer",
            "description": "Places the same in every drawing: the template's own, not filled.",
            "format": "int32"
          },
          "fileNamePattern": {
            "type": "string",
            "description": "How the drawings' file names are made of the learnt fields, if they are.",
            "nullable": true
          },
          "mapping": {
            "$ref": "#/components/schemas/Models.PublicMapping"
          },
          "nextPollAfterSeconds": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Learning from filled-in drawings (5 to 20 copies of one template): the first becomes the\r\nmapping's template; once read, Items are the places the drawings differ in, proposed as fills.\r\nNothing but the template is saved. Poll until Status is Succeeded or Failed."
      },
      "Models.PublicMappingTemplate": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "integer",
            "description": "Download it from /v1/files/{id}/content.",
            "format": "int32"
          },
          "fileName": {
            "type": "string",
            "nullable": true
          },
          "fingerprint": {
            "type": "string",
            "description": "The scan's fingerprint of the template; a mapping document carries it as templateFingerprint.",
            "nullable": true
          },
          "scanRunId": {
            "type": "integer",
            "description": "The template's latest scan (GET /v1/auto-fill/mappings/{id}/scan).",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicMappingValidation": {
        "type": "object",
        "properties": {
          "canPublish": {
            "type": "boolean",
            "description": "No check is an Error: the setup could be saved with publish true."
          },
          "issueCount": {
            "type": "integer",
            "format": "int32"
          },
          "checks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicMappingCheck"
            },
            "nullable": true
          },
          "preview": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicPreviewValue"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A dry run of a mapping setup: each check, a preview of the values, and whether it could be published. Nothing is saved."
      },
      "Models.PublicMappingVersion": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "description": "The version number.",
            "format": "int32"
          },
          "isCurrent": {
            "type": "boolean"
          },
          "dataFieldCount": {
            "type": "integer",
            "format": "int32"
          },
          "mappedFieldCount": {
            "type": "integer",
            "format": "int32"
          },
          "createdBy": {
            "$ref": "#/components/schemas/Models.PublicPerson"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "mapping": {
            "description": "The mapping document of this version; only when one version is read.",
            "nullable": true
          },
          "changes": {
            "$ref": "#/components/schemas/Models.PublicMappingChanges"
          }
        },
        "additionalProperties": false
      },
      "Models.PublicMemberUsage": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "runs": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Models.PublicNamingVocabulary": {
        "type": "object",
        "properties": {
          "fieldTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "namingStandard.fields[].type.",
            "nullable": true
          },
          "aliasModes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "namingStandard.alias.mode.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicOutputFolder": {
        "type": "object",
        "properties": {
          "sourceId": {
            "type": "integer",
            "format": "int32"
          },
          "sourceName": {
            "type": "string",
            "nullable": true
          },
          "path": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "canDeliver": {
            "type": "boolean",
            "description": "Whether a run can deliver there now; when not, Reason is the error a run would get."
          },
          "reason": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Where runs that save to a folder deliver their results."
      },
      "Models.PublicPageOfPublicRun": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicRun"
            },
            "nullable": true
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A page of a list. Pass ByLayer.API.PublicApi.Models.PublicPage`1.NextCursor as `cursor` for the next page; null on the last."
      },
      "Models.PublicPerson": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "email": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicPlotterReference": {
        "type": "object",
        "properties": {
          "profileSchema": {
            "description": "JSON Schema of the profile document (PUT .../profile takes it as \"profile\")."
          },
          "defaultProfile": {
            "description": "The document with every setting at its default; a profile not yet saved prints with it."
          },
          "layouts": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "orders": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "pageSetupModes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "papers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicPrintPaper"
            },
            "description": "Named paper sizes; \"Custom\" takes widthMm and heightMm.",
            "nullable": true
          },
          "orientations": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "areas": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "colors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "builtInStyleTables": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Plot style tables every company has; uploaded ones (Company Resources) are named by file name too.",
            "nullable": true
          },
          "outputShapes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "textModes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "namingTokens": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tokens output.naming may use.",
            "nullable": true
          },
          "limits": {
            "$ref": "#/components/schemas/Models.PublicPrintLimits"
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Everything needed to write a profile document: its JSON Schema, the allowed values of each\r\nchoice, the default document, and the steps to follow."
      },
      "Models.PublicPlotterTemplate": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "integer",
            "description": "The uploaded drawing; download it from /v1/files/{id}/content.",
            "format": "int32"
          },
          "fileName": {
            "type": "string",
            "nullable": true
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          },
          "pageSetups": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Its named page setups, read by the CAD worker after the upload: pick one as\r\npageSetup.templateSetup. Null until they have been read (poll the profile), or when they could not be.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The template drawing a Template page setup is copied from."
      },
      "Models.PublicPreviewValue": {
        "type": "object",
        "properties": {
          "target": {
            "type": "string",
            "description": "The scan's target key the value lands on.",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicPrintLimits": {
        "type": "object",
        "properties": {
          "scale": {
            "type": "string",
            "description": "pageSetup.override.scale: \"Fit\", or a ratio paper:drawing with both numbers above 0 (\"1:1\", \"1:50\", \"2.5:1\").",
            "nullable": true
          },
          "customPaperMinMm": {
            "type": "number",
            "description": "A Custom paper's widthMm and heightMm are at least this…",
            "format": "double"
          },
          "customPaperMaxMm": {
            "type": "number",
            "description": "…and at most this.",
            "format": "double"
          },
          "maxOffsetMm": {
            "type": "number",
            "description": "offsetXMm and offsetYMm are within plus or minus this.",
            "format": "double"
          },
          "vectorDpiMin": {
            "type": "integer",
            "description": "pdf.vectorDpi range.",
            "format": "int32"
          },
          "vectorDpiMax": {
            "type": "integer",
            "format": "int32"
          },
          "rasterDpiMin": {
            "type": "integer",
            "description": "pdf.rasterDpi range.",
            "format": "int32"
          },
          "rasterDpiMax": {
            "type": "integer",
            "format": "int32"
          },
          "maxNamingLength": {
            "type": "integer",
            "format": "int32"
          },
          "naming": {
            "type": "string",
            "description": "output.naming: a file name without extension from text and tokens: {drawing}, {layout}, {date}\r\n(yyyy-MM-dd) and {attr:TAG} (the first block attribute with that tag on the sheet, e.g.\r\n{attr:DRAWING_NO} from a title block). At most MaxNamingLength characters; with outputShape\r\nPerSheet it must contain {layout} or an {attr:TAG}. Names that clash get \"-2\", \"-3\".",
            "nullable": true
          },
          "styleTable": {
            "type": "string",
            "description": "look.styleTable: a .ctb or .stb file name, built in or uploaded with POST /v1/cad-resources.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "What the profile validator accepts (the same checks the portal's editor saves through)."
      },
      "Models.PublicPrintMissingFont": {
        "type": "object",
        "properties": {
          "font": {
            "type": "string",
            "nullable": true
          },
          "substitute": {
            "type": "string",
            "description": "The font printed instead, if any.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicPrintPaper": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "widthMm": {
            "type": "number",
            "format": "double"
          },
          "heightMm": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "A paper size offered by name, in millimetres as printed landscape."
      },
      "Models.PublicPrintProfile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "setupGroupId": {
            "type": "string",
            "description": "The profile's runs carry it: filter GET /v1/runs?setupGroupId= by it.",
            "format": "uuid",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Draft (being set up; cannot print yet), Active (published) or Archived.",
            "nullable": true
          },
          "version": {
            "type": "integer",
            "description": "The current profile document's version; each save that changes it makes a new one.",
            "format": "int32",
            "nullable": true
          },
          "pageSetupMode": {
            "type": "string",
            "description": "Summary of the saved profile: Drawing, Override or Template; null before the first save.",
            "nullable": true
          },
          "outputShape": {
            "type": "string",
            "description": "PerDrawing, PerSheet or Combined; null before the first save.",
            "nullable": true
          },
          "styleTable": {
            "type": "string",
            "description": "The plot style table the profile applies, when it uses a different plot style.",
            "nullable": true
          },
          "paper": {
            "type": "string",
            "description": "The paper of an Override page setup, short (\"A3\", \"ANSI B\", \"420 × 297 mm\").",
            "nullable": true
          },
          "template": {
            "$ref": "#/components/schemas/Models.PublicPlotterTemplate"
          },
          "owner": {
            "$ref": "#/components/schemas/Models.PublicPerson"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastRunAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "profile": {
            "description": "The profile document (GET /v1/plotter/reference describes it); only when one profile is read.",
            "nullable": true
          },
          "inputFolder": {
            "$ref": "#/components/schemas/Models.PublicInputFolder"
          },
          "outputFolder": {
            "$ref": "#/components/schemas/Models.PublicOutputFolder"
          }
        },
        "additionalProperties": false,
        "description": "A Plotter print profile: which sheets of each drawing print, on what paper and how, and the\r\nPDFs that come out. Runs print drawings to PDF with it."
      },
      "Models.PublicPrintProfileVersion": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "description": "The version number.",
            "format": "int32"
          },
          "isCurrent": {
            "type": "boolean"
          },
          "changeCount": {
            "type": "integer",
            "description": "How many settings differ from the version before (0 for the first).",
            "format": "int32",
            "nullable": true
          },
          "createdBy": {
            "$ref": "#/components/schemas/Models.PublicPerson"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "profile": {
            "description": "The profile document of this version; only when one version is read.",
            "nullable": true
          },
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicPrintSettingChange"
            },
            "description": "Each setting that changed against the version before; only when one version is read.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicPrintResult": {
        "type": "object",
        "properties": {
          "run": {
            "$ref": "#/components/schemas/Models.PublicRun"
          },
          "sheets": {
            "type": "integer",
            "description": "Sheets printed in all.",
            "format": "int32"
          },
          "pages": {
            "type": "integer",
            "description": "PDF pages written in all.",
            "format": "int32"
          },
          "combinedFileId": {
            "type": "integer",
            "description": "The one PDF of a Combined profile; download it from /v1/files/{id}/content.",
            "format": "int32",
            "nullable": true
          },
          "drawings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicPrintedDrawing"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A print's results: the run, and per drawing the sheets it printed and what is worth a warning\r\n(missing fonts and references). Drawings fill in once the run has succeeded."
      },
      "Models.PublicPrintSampleDrawing": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false,
        "description": "Sample drawings the server ships, to try a profile without drawings of your own."
      },
      "Models.PublicPrintSettingChange": {
        "type": "object",
        "properties": {
          "section": {
            "type": "string",
            "description": "The setup step: Layouts, Page setup or PDF output.",
            "nullable": true
          },
          "field": {
            "type": "string",
            "description": "The document path (\"pageSetup.override.paper\").",
            "nullable": true
          },
          "label": {
            "type": "string",
            "description": "The setting's name (\"Paper size\").",
            "nullable": true
          },
          "before": {
            "type": "string",
            "nullable": true
          },
          "after": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicPrintedDrawing": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "savedBy": {
            "type": "string",
            "description": "The program that last saved the drawing (\"BricsCAD 24.9\", \"AutoCAD\").",
            "nullable": true
          },
          "fileId": {
            "type": "integer",
            "description": "The drawing's PDF (PerDrawing), else null.",
            "format": "int32",
            "nullable": true
          },
          "error": {
            "type": "string",
            "description": "Why the drawing printed nothing (could not be opened, no sheet matched), else null.",
            "nullable": true
          },
          "sheets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicPrintedSheet"
            },
            "nullable": true
          },
          "missingFonts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicPrintMissingFont"
            },
            "nullable": true
          },
          "missingReferences": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Images and external references that were not found (printed without them).",
            "nullable": true
          },
          "proxiesWithoutGraphics": {
            "type": "integer",
            "description": "Objects from another CAD program that print blank.",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Models.PublicPrintedSheet": {
        "type": "object",
        "properties": {
          "layout": {
            "type": "string",
            "nullable": true
          },
          "paperName": {
            "type": "string",
            "description": "The paper as the page setup calls it.",
            "nullable": true
          },
          "widthMm": {
            "type": "number",
            "format": "double"
          },
          "heightMm": {
            "type": "number",
            "format": "double"
          },
          "scale": {
            "type": "string",
            "description": "\"Fit\" or a ratio (\"1:50\").",
            "nullable": true
          },
          "styleTable": {
            "type": "string",
            "nullable": true
          },
          "fileId": {
            "type": "integer",
            "description": "The sheet's own PDF (PerSheet), else null.",
            "format": "int32",
            "nullable": true
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicProposalOfPublicProposedField": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "description": "proposal (items to add), question (one thing it needs to know) or out_of_scope.",
            "nullable": true
          },
          "question": {
            "type": "string",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicProposedField"
            },
            "nullable": true
          },
          "dropped": {
            "type": "integer",
            "description": "Items it proposed that did not pass the setup's checks and were left out.",
            "format": "int32"
          },
          "remaining": {
            "type": "integer",
            "description": "1 while another request can be made this month, 0 once this one reached the month's spending cap. It is not a count of requests.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "What the assistant made of a description. Nothing is saved: add the items you want with the\r\nsetup's save call."
      },
      "Models.PublicProposalOfPublicProposedFill": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "description": "proposal (items to add), question (one thing it needs to know) or out_of_scope.",
            "nullable": true
          },
          "question": {
            "type": "string",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicProposedFill"
            },
            "nullable": true
          },
          "dropped": {
            "type": "integer",
            "description": "Items it proposed that did not pass the setup's checks and were left out.",
            "format": "int32"
          },
          "remaining": {
            "type": "integer",
            "description": "1 while another request can be made this month, 0 once this one reached the month's spending cap. It is not a count of requests.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "What the assistant made of a description. Nothing is saved: add the items you want with the\r\nsetup's save call."
      },
      "Models.PublicProposalOfPublicReportOperation": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "description": "proposal (items to add), question (one thing it needs to know) or out_of_scope.",
            "nullable": true
          },
          "question": {
            "type": "string",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicReportOperation"
            },
            "nullable": true
          },
          "dropped": {
            "type": "integer",
            "description": "Items it proposed that did not pass the setup's checks and were left out.",
            "format": "int32"
          },
          "remaining": {
            "type": "integer",
            "description": "1 while another request can be made this month, 0 once this one reached the month's spending cap. It is not a count of requests.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "What the assistant made of a description. Nothing is saved: add the items you want with the\r\nsetup's save call."
      },
      "Models.PublicProposalOfStandardizerRule": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "description": "proposal (items to add), question (one thing it needs to know) or out_of_scope.",
            "nullable": true
          },
          "question": {
            "type": "string",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.StandardizerRule"
            },
            "nullable": true
          },
          "dropped": {
            "type": "integer",
            "description": "Items it proposed that did not pass the setup's checks and were left out.",
            "format": "int32"
          },
          "remaining": {
            "type": "integer",
            "description": "1 while another request can be made this month, 0 once this one reached the month's spending cap. It is not a count of requests.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "What the assistant made of a description. Nothing is saved: add the items you want with the\r\nsetup's save call."
      },
      "Models.PublicProposedField": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/Modules.Cad.Application.Mapping.MappingDataField"
          },
          "newField": {
            "type": "boolean"
          },
          "binding": {
            "$ref": "#/components/schemas/Modules.Cad.Application.Mapping.MappingBinding"
          },
          "rule": {
            "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.ConfiguratorField"
          },
          "op": {
            "type": "string",
            "description": "What the item does: \"add\" (the default: the binding joins the form, with the field and rule when\r\nnewField), \"update\" (the field and rule replace the document's own of that key), \"remove\" (the\r\nfield, its rule and its bindings go), \"pdf_name\" (fileNamePattern is the document's) or \"rule\"\r\n(formRule selects entities the template scan does not list, such as lines or everything on a\r\nlayer; only the setup page can expand it into one field per match, against the open drawing).",
            "nullable": true
          },
          "formRule": {
            "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.ConfiguratorRule"
          },
          "fileNamePattern": {
            "type": "string",
            "description": "With \"pdf_name\": the document's fileNamePattern.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One proposed form field (from the assistant or from learning): the data field (new, or one the\r\nconfiguration has), the binding that places it in the template, and its form rule. Add the ones\r\nyou want to the document's mapping.dataFields, mapping.bindings and fields, then save it."
      },
      "Models.PublicProposedFill": {
        "type": "object",
        "properties": {
          "field": {
            "description": "A dataFields item of the mapping document (mappingSchema), written as the document writes it."
          },
          "newField": {
            "type": "boolean",
            "description": "The mapping does not have this data field yet."
          },
          "binding": {
            "description": "A bindings item of the mapping document (mappingSchema)."
          }
        },
        "additionalProperties": false,
        "description": "One fill the assistant or learning proposes: a data field (new, or one the mapping has) and the binding that puts it on a location."
      },
      "Models.PublicQuickFillTemplate": {
        "type": "object",
        "properties": {
          "templateFileId": {
            "type": "integer",
            "description": "Pass it to POST /v1/auto-fill/quick-fill.",
            "format": "int32"
          },
          "fileName": {
            "type": "string",
            "nullable": true
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          },
          "scan": {
            "$ref": "#/components/schemas/Models.PublicTemplateScan"
          }
        },
        "additionalProperties": false,
        "description": "Fill Manually: a template uploaded and scanned for one fill, with nothing saved but the run."
      },
      "Models.PublicQuickSelectTargets": {
        "type": "object",
        "properties": {
          "prefix": {
            "type": "string",
            "description": "The target key prefix: \"qsel:\".",
            "nullable": true
          },
          "querySchema": {
            "description": "JSON Schema of the QuickSelectQuery after the prefix."
          },
          "applyTo": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A step's applyTo.",
            "nullable": true
          },
          "layouts": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Special values of a step's layout (besides a sheet's own name).",
            "nullable": true
          },
          "objectTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A step's objectType (\"Any\" is AutoCAD's \"Multiple\").",
            "nullable": true
          },
          "operators": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A step's operator (\"all\" selects every object of the type).",
            "nullable": true
          },
          "properties": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Common properties a query writes: Contents (a text's text), \"Attribute:TAG\" (an attribute by its exact tag), \"Parameter:NAME\" (a settable block parameter), Layer, Color.",
            "nullable": true
          },
          "example": {
            "type": "string",
            "description": "A complete target: the TITLE attribute of every TITLE_BLOCK insert.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A quick select target, as AutoCAD's QSELECT builds a selection: a binding target \"qsel:\" followed\r\nby a QuickSelectQuery as JSON. Each step is one run of the dialog (applyTo Drawing or Selection;\r\nlayout a sheet name, \"*Sheets\" for every paper space tab, or null for all; objectType; property;\r\noperator; value; exclude; append); the query's property is written on everything the last step\r\nleaves selected. The fill selects again in each drawing it fills."
      },
      "Models.PublicQuickSelectVocabulary": {
        "type": "object",
        "properties": {
          "applyTo": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "step.applyTo: the whole drawing, or what the steps before selected.",
            "nullable": true
          },
          "layouts": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "step.layout values besides a sheet's own name; null or left out is every sheet.",
            "nullable": true
          },
          "objectTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "step.objectType.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicRateBand": {
        "type": "object",
        "properties": {
          "fromQuantity": {
            "type": "integer",
            "format": "int32"
          },
          "toQuantity": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "pricePerDrawing": {
            "type": "number",
            "format": "double"
          },
          "isCurrent": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Models.PublicRateQuote": {
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "integer",
            "format": "int32"
          },
          "applicationName": {
            "type": "string",
            "nullable": true
          },
          "applicationIsActive": {
            "type": "boolean"
          },
          "unitPrice": {
            "type": "number",
            "format": "double"
          },
          "appliedUsageRateId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "windowRunCount": {
            "type": "integer",
            "format": "int32"
          },
          "windowDays": {
            "type": "integer",
            "format": "int32"
          },
          "runsUntilNextBand": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "nextBandUnitPrice": {
            "type": "number",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicReconnect": {
        "type": "object",
        "properties": {
          "source": {
            "$ref": "#/components/schemas/Models.PublicSource"
          },
          "connector": {
            "$ref": "#/components/schemas/Models.PublicConnector"
          },
          "connection": {
            "$ref": "#/components/schemas/Models.PublicConnectionStatus"
          }
        },
        "additionalProperties": false,
        "description": "A reconnect: done at once (credentials), or a sign-in for a person to finish (OAuth)."
      },
      "Models.PublicRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The value of the table's key field: what runs look the record up by.",
            "nullable": true
          },
          "values": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicRecordPage": {
        "type": "object",
        "properties": {
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicRecord"
            },
            "nullable": true
          },
          "more": {
            "type": "boolean",
            "description": "The table has more records than this page."
          },
          "supported": {
            "type": "boolean",
            "description": "False when this CRM cannot list records: look them up by id instead."
          }
        },
        "additionalProperties": false,
        "description": "A page of a table's records, as text keyed by field id."
      },
      "Models.PublicRelationVocabulary": {
        "type": "object",
        "properties": {
          "kinds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "relation.kind.",
            "nullable": true
          },
          "points": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "relation.point: which part of an object Inside, Outside and Contains test.",
            "nullable": true
          },
          "whenNone": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "relation.whenNone, for a named relation (with an id) that finds nothing.",
            "nullable": true
          },
          "whenMany": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "relation.whenMany, for a named relation that finds several.",
            "nullable": true
          },
          "finding": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The kinds that find another object, so may be named and used by valueFrom \"Related:{id}:{property}\".",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicReport": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "setupGroupId": {
            "type": "string",
            "description": "The report's runs carry this id: GET .../reports/{id}/runs lists them, as does /v1/runs?setupGroupId=.",
            "format": "uuid",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Draft (being set up; cannot run yet), Active (published) or Archived.",
            "nullable": true
          },
          "version": {
            "type": "integer",
            "description": "The current document's version; each save that changes it makes a new one.",
            "format": "int32",
            "nullable": true
          },
          "problem": {
            "type": "string",
            "description": "What the saved document still lacks before the report can run; null when ready.",
            "nullable": true
          },
          "cellCount": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "tableCount": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "xlsx": {
            "type": "boolean",
            "nullable": true
          },
          "pdf": {
            "type": "boolean",
            "nullable": true
          },
          "split": {
            "type": "string",
            "description": "run (one workbook per run) or drawing (one per drawing); null before the first save.",
            "nullable": true
          },
          "template": {
            "$ref": "#/components/schemas/Models.PublicReportFile"
          },
          "templateSheetCount": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "sample": {
            "$ref": "#/components/schemas/Models.PublicReportFile"
          },
          "sampleScanRunId": {
            "type": "integer",
            "description": "The sample's scan run; GET .../sample/scan follows it.",
            "format": "int32",
            "nullable": true
          },
          "owner": {
            "$ref": "#/components/schemas/Models.PublicPerson"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastRunAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "runCount": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "document": {
            "description": "The report document (see GET /v1/report-generator/reference); only when one report is read.",
            "nullable": true
          },
          "inputFolder": {
            "$ref": "#/components/schemas/Models.PublicInputFolder"
          },
          "outputFolder": {
            "$ref": "#/components/schemas/Models.PublicOutputFolder"
          },
          "inputGrouping": {
            "type": "string",
            "description": "What the watched folder makes of what arrives: PerDrawing (a report per drawing) or PerSubfolder (one per quiet subfolder).",
            "nullable": true
          },
          "inputQuietMinutes": {
            "type": "integer",
            "description": "With PerSubfolder: how long a subfolder stays unchanged before its report runs.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "A Report Generator report: CAD data (drawing properties, layouts, counted and listed objects)\r\nwritten into the customer's own Excel template, as a workbook and/or PDF per run or per drawing."
      },
      "Models.PublicReportChange": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "description": "Added, Changed or Removed.",
            "nullable": true
          },
          "part": {
            "type": "string",
            "description": "Cell, Table, Clear or Output.",
            "nullable": true
          },
          "label": {
            "type": "string",
            "description": "\"Report!C3\", \"Table Report!A8:C8\", or the output setting.",
            "nullable": true
          },
          "before": {
            "type": "string",
            "nullable": true
          },
          "after": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicReportDrawing": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "objects": {
            "type": "integer",
            "description": "How many objects the report's cells and tables picked in it.",
            "format": "int32"
          },
          "error": {
            "type": "string",
            "description": "Why the drawing was left out, else null.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicReportFile": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A file a report keeps (its template or sample drawing)."
      },
      "Models.PublicReportOperation": {
        "type": "object",
        "properties": {
          "op": {
            "type": "string",
            "description": "add, update or remove.",
            "nullable": true
          },
          "id": {
            "type": "string",
            "nullable": true
          },
          "cell": {
            "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.ReportCell"
          },
          "band": {
            "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.ReportBand"
          },
          "note": {
            "type": "string",
            "description": "What to check about it (\"There is no label for it. I used B3.\"); null when nothing.",
            "nullable": true
          },
          "clear": {
            "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.ReportCellRef"
          },
          "output": {
            "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.ReportOutput"
          }
        },
        "additionalProperties": false,
        "description": "One proposed change to the report document: add a cell or table (its id given), update one by\r\nid (the whole cell or table, replaced), or remove one by id; add or remove cells emptied on\r\nevery report (clear); or update the output settings (output, replaced whole). Apply the ones\r\nyou want to the document in order, then save it."
      },
      "Models.PublicReportReference": {
        "type": "object",
        "properties": {
          "documentSchema": {
            "description": "The JSON Schema of the report document."
          },
          "valueKinds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "runFields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The fields a cell or column reads: drawing fields, plus \"Property:NAME\" for a drawing property and the selected objects' own properties (see the catalog).",
            "nullable": true
          },
          "recordKinds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "directions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "fillModes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "aggregates": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "splits": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "sheetPer": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "inputGroupings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "selectOperators": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "selectApplyTo": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A Quick Select step's applyTo: Drawing (pick from the whole drawing, or the sheet in layout) or Selection (narrow what the steps before it selected).",
            "nullable": true
          },
          "selectLayouts": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A step's layout with applyTo Drawing: \"Model\", a sheet's tab name, \"*Sheets\" for every paper space tab, or null/left out for all sheets.",
            "nullable": true
          },
          "selectObjectTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A step's objectType; \"Any\" matches every type (AutoCAD's \"Multiple\").",
            "nullable": true
          },
          "propertyPrefixes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Property names that carry a name after a prefix: \"Attribute:TAG\" (a block attribute, tag exactly as in the block), \"Parameter:NAME\" (a settable block parameter), and for record fields \"Property:NAME\" (a drawing property, custom ones included).",
            "nullable": true
          },
          "catalog": { },
          "steps": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Everything needed to write a report document."
      },
      "Models.PublicReportRunResult": {
        "type": "object",
        "properties": {
          "run": {
            "$ref": "#/components/schemas/Models.PublicRun"
          },
          "drawings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicReportDrawing"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A report run: the run (its files are the workbooks and PDFs it wrote, download them from\r\n/v1/files/{id}/content) and what it read from each drawing. Drawings fill in once it succeeds."
      },
      "Models.PublicReportVersion": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "description": "The version number.",
            "format": "int32"
          },
          "isCurrent": {
            "type": "boolean"
          },
          "createdBy": {
            "$ref": "#/components/schemas/Models.PublicPerson"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "document": {
            "description": "The document of this version; only when one version is read.",
            "nullable": true
          },
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicReportChange"
            },
            "description": "What changed against the version before, cell by cell and table by table; only when one version is read.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicRequirementVocabulary": {
        "type": "object",
        "properties": {
          "whenMissing": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "requirement.whenMissing: Report the missing record, Create it, or Use the requirement's fallback.",
            "nullable": true
          },
          "recordKinds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The drawing records a property can name (an entity's Layer, Linetype, text or dimension Style, a layer's Linetype, a dimension style's TextStyle); only requirements on such properties take whenMissing.",
            "nullable": true
          },
          "creatableRecords": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The record kinds a run can create when missing.",
            "nullable": true
          },
          "valueFrom": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "requirement.valueFrom: exact values, or prefixes followed by a name (\"Drawing:Title\", \"Property:Attribute:SHEET\", \"Related:room:Area\").",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicRuleChange": {
        "type": "object",
        "properties": {
          "ruleId": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "severity": {
            "type": "string",
            "nullable": true
          },
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicFieldChange"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicRuleChanges": {
        "type": "object",
        "properties": {
          "added": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicRuleChange"
            },
            "nullable": true
          },
          "modified": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicRuleChange"
            },
            "nullable": true
          },
          "removed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicRuleChange"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicRuleOutcome": {
        "type": "object",
        "properties": {
          "ruleId": {
            "type": "string",
            "nullable": true
          },
          "rule": {
            "type": "string",
            "nullable": true
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "severity": {
            "type": "string",
            "nullable": true
          },
          "selected": {
            "type": "integer",
            "description": "Objects the rule selected (for a count rule, the count found).",
            "format": "int32"
          },
          "issues": {
            "type": "integer",
            "description": "Issues left; 0 means the rule passed.",
            "format": "int32"
          },
          "fixed": {
            "type": "integer",
            "format": "int32"
          },
          "passed": {
            "type": "boolean",
            "description": "Nothing is left to fix for the rule on this drawing."
          }
        },
        "additionalProperties": false
      },
      "Models.PublicRuleset": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Draft (being set up; cannot run yet), Active (published) or Archived.",
            "nullable": true
          },
          "setupGroupId": {
            "type": "string",
            "description": "Stays the same across versions; runs of this ruleset carry it, so GET /v1/runs?setupGroupId= lists them.",
            "format": "uuid",
            "nullable": true
          },
          "version": {
            "type": "integer",
            "description": "The current rules' version; each save of the rules makes a new one.",
            "format": "int32",
            "nullable": true
          },
          "ruleCount": {
            "type": "integer",
            "format": "int32"
          },
          "rulesByCategory": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Models.PublicCategoryCount"
            },
            "description": "Per category (Layers, Blocks, TextAnnotation, Dimensions, DrawingProperties): how many rules, and how many are errors, warnings and infos.",
            "nullable": true
          },
          "owner": {
            "$ref": "#/components/schemas/Models.PublicPerson"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastRunAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "rules": {
            "description": "The rules document ({ schemaVersion, rules, namingStandards, units }); only when one ruleset is read.",
            "nullable": true
          },
          "inputFolder": {
            "$ref": "#/components/schemas/Models.PublicInputFolder"
          },
          "outputFolder": {
            "$ref": "#/components/schemas/Models.PublicOutputFolder"
          }
        },
        "additionalProperties": false,
        "description": "A Standardizer ruleset: the rules drawings are checked (and fixed) against."
      },
      "Models.PublicRulesetVersion": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "description": "The version number.",
            "format": "int32"
          },
          "isCurrent": {
            "type": "boolean"
          },
          "ruleCount": {
            "type": "integer",
            "format": "int32"
          },
          "createdBy": {
            "$ref": "#/components/schemas/Models.PublicPerson"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "rules": {
            "description": "The rules of this version; only when one version is read.",
            "nullable": true
          },
          "changes": {
            "$ref": "#/components/schemas/Models.PublicRuleChanges"
          }
        },
        "additionalProperties": false
      },
      "Models.PublicRun": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "tool": {
            "type": "string",
            "description": "standardizer, auto-fill, plotter, product-configurator or report-generator.",
            "nullable": true
          },
          "setupGroupId": {
            "type": "string",
            "description": "The setup the run used (a ruleset, mapping, profile, configuration or report: its setupGroupId); filter /v1/runs by it.",
            "format": "uuid",
            "nullable": true
          },
          "workflowName": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Queued, Running, Succeeded, Failed or Cancelled.",
            "nullable": true
          },
          "progressPercent": {
            "type": "integer",
            "format": "int32"
          },
          "progressMessage": {
            "type": "string",
            "nullable": true
          },
          "billableUnits": {
            "type": "integer",
            "description": "What the run is charged for: drawings, records or PDFs, depending on the tool.",
            "format": "int32"
          },
          "startedBy": {
            "$ref": "#/components/schemas/Models.PublicPerson"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "errorMessage": {
            "type": "string",
            "nullable": true
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicFile"
            },
            "description": "The files the run made, once it has finished; null on lists.",
            "nullable": true
          },
          "nextPollAfterSeconds": {
            "type": "integer",
            "description": "While the run is not finished: how long to wait before asking again. Null once it is.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A run: one job on the CAD worker (a Standardizer check, an Auto Fill, a print…). Poll it until\r\nByLayer.API.PublicApi.Models.PublicRun.Status is Succeeded, Failed or Cancelled; while it is not, wait\r\nByLayer.API.PublicApi.Models.PublicRun.NextPollAfterSeconds before asking again."
      },
      "Models.PublicRunCheck": {
        "type": "object",
        "properties": {
          "allowed": {
            "type": "boolean"
          },
          "reason": {
            "type": "string",
            "nullable": true
          },
          "balance": {
            "type": "number",
            "format": "double"
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "pricePerDrawing": {
            "type": "number",
            "format": "double"
          },
          "creditPrice": {
            "type": "number",
            "format": "double"
          },
          "windowRunCount": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Models.PublicRunSource": {
        "type": "object",
        "properties": {
          "sourceId": {
            "type": "integer",
            "description": "The connected source (GET /v1/sources).",
            "format": "int32"
          },
          "folderPath": {
            "type": "string",
            "description": "The folder in it, as the source lists it (\"Projects/Tower A\").",
            "nullable": true
          },
          "filePaths": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The files to check, by their paths in the source; left out checks every .dwg in the folder.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicSampleScan": {
        "type": "object",
        "properties": {
          "runId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "None (no scan started), or the scan run's status: Queued, Running, Succeeded, Failed, Cancelled.",
            "nullable": true
          },
          "progressPercent": {
            "type": "integer",
            "format": "int32"
          },
          "progressMessage": {
            "type": "string",
            "nullable": true
          },
          "errorMessage": {
            "type": "string",
            "nullable": true
          },
          "schema": {
            "description": "What the drawing holds, once the scan succeeded (only when includeSchema is true).",
            "nullable": true
          },
          "nextPollAfterSeconds": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A sample drawing's scan: what the setup reads for block names, attribute tags, layers and properties."
      },
      "Models.PublicSheet": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "rowCount": {
            "type": "integer",
            "format": "int32"
          },
          "columnCount": {
            "type": "integer",
            "format": "int32"
          },
          "truncated": {
            "type": "boolean",
            "description": "The sheet is larger than the cells listed."
          },
          "hidden": {
            "type": "boolean",
            "description": "Hidden in Excel; still counts as a sheet position (sheetIndex)."
          },
          "cells": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicCell"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicSite": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "webUrl": {
            "type": "string",
            "description": "The site in SharePoint.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicSiteDrive": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicSource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "provider": {
            "type": "string",
            "nullable": true
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "active": {
            "type": "boolean",
            "description": "False while paused: its watched folders are not read."
          },
          "needsReauthentication": {
            "type": "boolean",
            "description": "The provider no longer accepts the sign-in: reconnect it (POST /v1/sources/{id}/reconnect)."
          },
          "connectedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastErrorAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastError": {
            "type": "string",
            "nullable": true
          },
          "folderCount": {
            "type": "integer",
            "description": "Folders ByLayer may use in it.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "A connected cloud storage account."
      },
      "Models.PublicSourceCard": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "nullable": true
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "requiresSiteSelection": {
            "type": "boolean"
          },
          "source": {
            "$ref": "#/components/schemas/Models.PublicSource"
          }
        },
        "additionalProperties": false,
        "description": "A provider with the key's person's source on it, if they connected one."
      },
      "Models.PublicSourceProvider": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "nullable": true
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "authType": {
            "type": "string",
            "description": "oauth (a person signs in: POST /v1/sources/connect) or credentials (send them: POST /v1/sources/sessions).",
            "nullable": true
          },
          "credentialFields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "For credentials providers: the fields to send.",
            "nullable": true
          },
          "requiresSiteSelection": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "description": "A cloud storage provider ByLayer can connect."
      },
      "Models.PublicSourceSession": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string",
            "nullable": true
          },
          "provider": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A signed-in account, open to browse before it is saved as a source. It lasts a short while."
      },
      "Models.PublicStandardizerReference": {
        "type": "object",
        "properties": {
          "rulesDocumentSchema": {
            "description": "JSON Schema of the whole rules document PUT .../rules takes: schemaVersion, rules, namingStandards, units."
          },
          "ruleSchema": {
            "description": "JSON Schema of one rule."
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "severities": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "subjects": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "operators": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "countOperators": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "checks": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "units": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "relations": {
            "$ref": "#/components/schemas/Models.PublicRelationVocabulary"
          },
          "requirements": {
            "$ref": "#/components/schemas/Models.PublicRequirementVocabulary"
          },
          "namingStandards": {
            "$ref": "#/components/schemas/Models.PublicNamingVocabulary"
          },
          "quickSelect": {
            "$ref": "#/components/schemas/Models.PublicQuickSelectVocabulary"
          },
          "propertyPrefixes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Prefixes that name a block attribute or block parameter as a property (\"Attribute:TITLE\", \"Parameter:Visibility1\").",
            "nullable": true
          },
          "catalog": { },
          "steps": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "howRulesWork": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What each part of a rule does and what is taken when it is left out, in words: the schema says what a rule may hold, this what it means.",
            "nullable": true
          },
          "recipes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StandardizerRecipe"
            },
            "description": "What offices commonly ask for, each with the rule that says it.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Everything needed to write rules: the JSON Schema of a rule, the words the rules use, and the\r\nobject types and properties a rule may select and require."
      },
      "Models.PublicTable": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicTableSchema": {
        "type": "object",
        "properties": {
          "tableId": {
            "type": "string",
            "nullable": true
          },
          "tableName": {
            "type": "string",
            "nullable": true
          },
          "keyFieldId": {
            "type": "string",
            "nullable": true
          },
          "keyFieldLabel": {
            "type": "string",
            "nullable": true
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicField"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicTemplateCells": {
        "type": "object",
        "properties": {
          "sheets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modules.Tools.Application.ReportGenerator.ReportTemplateSheet"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The template as the setup reads it: per sheet its used range, the texts and formulas of its\r\ncells (capped at 200 rows by 40 columns), merged ranges and Excel tables. Use it to choose the\r\ncells and ranges the document fills."
      },
      "Models.PublicTemplateFile": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "integer",
            "description": "Download it from /v1/files/{fileId}/content.",
            "format": "int32"
          },
          "fileName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicTemplateScan": {
        "type": "object",
        "properties": {
          "runId": {
            "type": "integer",
            "description": "The scan's run; null when no scan was started.",
            "format": "int32",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "None, Queued, Running, Succeeded, Failed or Cancelled.",
            "nullable": true
          },
          "progressPercent": {
            "type": "integer",
            "format": "int32"
          },
          "progressMessage": {
            "type": "string",
            "nullable": true
          },
          "errorMessage": {
            "type": "string",
            "nullable": true
          },
          "fingerprint": {
            "type": "string",
            "description": "The template's fingerprint; mapping documents carry it as templateFingerprint.",
            "nullable": true
          },
          "schemaFileId": {
            "type": "integer",
            "description": "The scan result as a file.",
            "format": "int32",
            "nullable": true
          },
          "schema": {
            "description": "The scan result: targets (key, kind, label, current value…), slot families, layouts. Only with includeSchema=true.",
            "nullable": true
          },
          "nextPollAfterSeconds": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A scan of a template drawing: every place a value can land (targets), found by a free run.\r\nPoll until Status is Succeeded; Schema is the scan's result (TemplateFieldSchema) when asked for."
      },
      "Models.PublicToolRates": {
        "type": "object",
        "properties": {
          "quote": {
            "$ref": "#/components/schemas/Models.PublicRateQuote"
          },
          "bands": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicRateBand"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicToolUsage": {
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "integer",
            "format": "int32"
          },
          "applicationName": {
            "type": "string",
            "nullable": true
          },
          "credits": {
            "type": "number",
            "format": "double"
          },
          "spend": {
            "type": "number",
            "format": "double"
          },
          "sharePercent": {
            "type": "integer",
            "format": "int32"
          },
          "creditsPerDrawing": {
            "type": "number",
            "format": "double"
          },
          "runs": {
            "type": "integer",
            "format": "int32"
          },
          "completed": {
            "type": "integer",
            "format": "int32"
          },
          "failed": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Models.PublicTransaction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "credits": {
            "type": "number",
            "format": "double"
          },
          "balanceAfter": {
            "type": "number",
            "format": "double"
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "jobId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "applicationId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "billableUnits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "unitPrice": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "reason": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "Models.PublicTransactionPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicTransaction"
            },
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "format": "int32"
          },
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "hasNextPage": {
            "type": "boolean"
          },
          "hasPreviousPage": {
            "type": "boolean"
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A page of credit transactions. Pass ByLayer.API.PublicApi.Models.PublicTransactionPage.NextCursor as `cursor` for the next page\r\n(null on the last), as on the other lists; the page numbers are kept for callers that use them."
      },
      "Models.PublicUsageMonth": {
        "type": "object",
        "properties": {
          "periodStart": {
            "type": "string",
            "format": "date-time"
          },
          "periodEnd": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "totalCredits": {
            "type": "number",
            "format": "double"
          },
          "totalSpend": {
            "type": "number",
            "format": "double"
          },
          "totalRuns": {
            "type": "integer",
            "format": "int32"
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicToolUsage"
            },
            "nullable": true
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicMemberUsage"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.PublicValidation": {
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean"
          },
          "problems": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What is wrong, in sentences.",
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicApiFieldError"
            },
            "description": "The same problems placed: each with its path into the request body, a code, the value found\r\nand the values allowed. Given by the tools whose validator places its problems (the Standardizer);\r\nnull where only the sentences are known.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A dry run of a setup: whether it would save, and if not, what to correct. Nothing is saved."
      },
      "Models.PublicValueField": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "The data field's key: the name the value is sent under.",
            "nullable": true
          },
          "label": {
            "type": "string",
            "description": "What the field is called.",
            "nullable": true
          },
          "type": {
            "type": "string",
            "description": "text, number, yesno, choice, date, state, color or layer.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "defaultValue": {
            "type": "string",
            "nullable": true
          },
          "allowedValues": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The values it takes, when it takes only some.",
            "nullable": true
          },
          "required": {
            "type": "boolean",
            "description": "A run must give it."
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicValueOption"
            },
            "description": "The allowed values again, each as a label and a value, for clients whose dropdowns are\r\nbuilt from that shape (Make, docs/make-plan.md); null when any value is taken.",
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false,
        "description": "One value a run from values takes."
      },
      "Models.PublicValueOption": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One of a field's allowed values: what to show and what to send."
      },
      "Models.PublicValuesSchema": {
        "type": "object",
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicValueField"
            },
            "nullable": true
          },
          "schema": { }
        },
        "additionalProperties": false,
        "description": "The values a run from values takes: as a list, and as a JSON Schema of the run's \"values\" object\r\n(one property per field, titled with its label), for clients that build a form from a schema."
      },
      "Models.PublicWebhook": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "url": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "secretPrefix": {
            "type": "string",
            "description": "The start of the signing secret, to tell secrets apart; the secret itself is shown only when made.",
            "nullable": true
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether events are sent. Turned off after a day in which no delivery reached it (see DisabledReason)."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "disabledAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "disabledReason": {
            "type": "string",
            "nullable": true
          },
          "tool": {
            "type": "string",
            "description": "Run events only: the tool whose runs it hears of; null hears every tool's.",
            "nullable": true
          },
          "setupGroupId": {
            "type": "string",
            "description": "Run events only: the setup (a ruleset, mapping, profile, configuration or report: its setupGroupId) whose runs it hears of; null hears every setup's.",
            "format": "uuid",
            "nullable": true
          },
          "origin": {
            "type": "string",
            "description": "Who made it: null for one made with POST /v1/webhooks, \"flow\" for a Power Automate flow's trigger (removed with the flow), \"make\" for a Make scenario's (removed with its webhook in Make).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A webhook: a URL ByLayer posts events to. Each request carries ByLayer-Event (the event type),\r\nByLayer-Delivery (unique per delivery) and ByLayer-Signature: t=<unix seconds>,v1=<hex\r\nHMAC-SHA256 of \"t.body\" keyed with the webhook's secret>. The body is\r\n{ id, type, createdAt, data }; id is the event's, the same in every webhook it reaches.\r\nAnswer 2xx within 10 seconds; anything else is retried for up to a day, then, when nothing\r\nreached the webhook that day, it is turned off and its person emailed."
      },
      "Models.PublicWebhookDelivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The delivery id, as the ByLayer-Delivery header gave it.",
            "nullable": true
          },
          "eventId": {
            "type": "string",
            "nullable": true
          },
          "eventType": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Pending (being tried), Succeeded, Failed (given up after a day; a test after its one try) or Skipped (the webhook was off).",
            "nullable": true
          },
          "attempts": {
            "type": "integer",
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastAttemptAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "nextAttemptAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deliveredAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastStatusCode": {
            "type": "integer",
            "description": "The HTTP status the endpoint last answered; null when it could not be reached.",
            "format": "int32",
            "nullable": true
          },
          "lastError": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One event sent (or being sent) to a webhook."
      },
      "Models.PublicWebhookEventType": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An event type a webhook can subscribe to, and what its data holds."
      },
      "Models.PublicWebhookWithSecret": {
        "type": "object",
        "properties": {
          "webhook": {
            "$ref": "#/components/schemas/Models.PublicWebhook"
          },
          "secret": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A new webhook or a new secret: ByLayer.API.PublicApi.Models.PublicWebhookWithSecret.Secret (\"whsec_…\") is shown this once."
      },
      "Models.PublicWorkbook": {
        "type": "object",
        "properties": {
          "fileName": {
            "type": "string",
            "nullable": true
          },
          "sheets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicSheet"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An Excel mapping's sample workbook, as cells: each sheet's non-empty cells (capped)."
      },
      "Models.PublicWrittenValue": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "description": "The data field's key; empty for a location bound to no field.",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "description": "Text, Number, Choice, YesNo, Color or Layer.",
            "nullable": true
          },
          "location": {
            "type": "string",
            "description": "Where it went, as the mapping names the location (\"TITLE_BLOCK · DRAWING_NO\").",
            "nullable": true
          },
          "value": {
            "type": "string",
            "description": "What was written; empty for a text the record left blank.",
            "nullable": true
          },
          "handle": {
            "type": "string",
            "description": "The entity it went into; null for a drawing property or a layer.",
            "nullable": true
          },
          "layout": {
            "type": "string",
            "description": "The entity's sheet.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.QuickFillBody": {
        "type": "object",
        "properties": {
          "templateFileId": {
            "type": "integer",
            "description": "The template uploaded with POST /v1/auto-fill/quick-fill/template.",
            "format": "int32"
          },
          "templateFingerprint": {
            "type": "string",
            "description": "The scan's fingerprint the values were chosen against; optional and not compared.",
            "nullable": true
          },
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.QuickFillValueBody"
            },
            "description": "The values, each on a target key from the scan.",
            "nullable": true
          },
          "fileName": {
            "type": "string",
            "description": "The output file's name without extension; empty uses the template's.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One fill of a scanned template with typed values; answers with the run."
      },
      "Models.QuickFillValueBody": {
        "type": "object",
        "properties": {
          "target": {
            "type": "string",
            "description": "A target key from the scan, e.g. \"attr:TITLE#1F3/DRAWING_NO\".",
            "nullable": true
          },
          "label": {
            "type": "string",
            "description": "What the location is called, for error messages.",
            "nullable": true
          },
          "value": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.ReconnectBody": {
        "type": "object",
        "properties": {
          "credentials": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "A credentials provider: new credentials. Left out for an OAuth provider: a sign-in link is returned.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.ReportFileBody": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "A file uploaded before (POST /v1/files or an upload link), by id, to use as a report's template or sample drawing."
      },
      "Models.SaveConfigurationDocumentBody": {
        "type": "object",
        "properties": {
          "document": {
            "description": "The whole document, as GET /v1/product-configurator/reference describes it (documentSchema).",
            "nullable": true
          },
          "setupStep": {
            "type": "integer",
            "description": "The setup step the portal reopens (1 Template … 5 Publish); left out keeps it.",
            "format": "int32",
            "nullable": true
          },
          "baseVersion": {
            "type": "integer",
            "description": "The setup's version this document was written from (version, as the setup was read; 0 when it\r\nhas none yet). A setup that has another version by now refuses the save with 409 conflict and\r\nkeeps what it has: read it again and make the change on that version. Left out, the save is not checked.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The configuration document. Saving it makes a new version when anything changed."
      },
      "Models.SaveDataAccessBody": {
        "type": "object",
        "properties": {
          "appId": {
            "type": "string",
            "description": "The app the table is in, for CRMs with apps.",
            "nullable": true
          },
          "appName": {
            "type": "string",
            "nullable": true
          },
          "tableId": {
            "type": "string",
            "nullable": true
          },
          "fieldScope": {
            "type": "string",
            "description": "All (every field) or Selected (only selectedFieldIds).",
            "nullable": true
          },
          "selectedFieldIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Which table ByLayer may read and which of its fields."
      },
      "Models.SaveMappingSetupBody": {
        "type": "object",
        "properties": {
          "mapping": {
            "description": "The mapping document: dataFields, bindings and repeats (GET /v1/auto-fill/reference, mappingSchema).",
            "nullable": true
          },
          "sourceKind": {
            "type": "string",
            "description": "Manual, Excel or Crm.",
            "nullable": true
          },
          "crmIntegrationId": {
            "type": "integer",
            "description": "A Crm mapping's integration.",
            "format": "int32",
            "nullable": true
          },
          "crmDataAccessId": {
            "type": "integer",
            "description": "A Crm mapping's table access.",
            "format": "int32",
            "nullable": true
          },
          "sampleWorkbookFileId": {
            "type": "integer",
            "description": "An Excel mapping's sample workbook, uploaded before (file id).",
            "format": "int32",
            "nullable": true
          },
          "outputMode": {
            "type": "string",
            "description": "Download or Folder.",
            "nullable": true
          },
          "outputSourceId": {
            "type": "integer",
            "description": "The output folder's connected source.",
            "format": "int32",
            "nullable": true
          },
          "outputFolderPath": {
            "type": "string",
            "description": "The output folder in that source.",
            "nullable": true
          },
          "outputFolderName": {
            "type": "string",
            "description": "A display name for the output folder.",
            "nullable": true
          },
          "fileNamePattern": {
            "type": "string",
            "description": "The filled drawings' names, with {field_key} placeholders.",
            "nullable": true
          },
          "fillDrawingsYouProvide": {
            "type": "boolean",
            "description": "True: runs bring their own drawing. False: runs fill the template.",
            "nullable": true
          },
          "outputDwgVersion": {
            "type": "string",
            "description": "A DWG version code from the reference (\"AC1027\"); an empty string saves in the template's own version.",
            "nullable": true
          },
          "publish": {
            "type": "boolean",
            "description": "Also publish the mapping (Draft → Active) if its checks pass, as the wizard's Finish does."
          },
          "baseVersion": {
            "type": "integer",
            "description": "The setup's version this document was written from (version, as the setup was read; 0 when it\r\nhas none yet). A setup that has another version by now refuses the save with 409 conflict and\r\nkeeps what it has: read it again and make the change on that version. Left out, the save is not checked.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The mapping's setup, as the portal's configure wizard saves it. Every field left out keeps the\r\nmapping's current value, so a call can change just the mapping document, or just the output."
      },
      "Models.SavePrintProfileBody": {
        "type": "object",
        "properties": {
          "profile": {
            "description": "The profile document: { schemaVersion, sheets, pageSetup, look, output, pdf }, as\r\nGET /v1/plotter/reference describes it (profileSchema). Left-out settings take their defaults.",
            "nullable": true
          },
          "baseVersion": {
            "type": "integer",
            "description": "The setup's version this document was written from (version, as the setup was read; 0 when it\r\nhas none yet). A setup that has another version by now refuses the save with 409 conflict and\r\nkeeps what it has: read it again and make the change on that version. Left out, the save is not checked.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The whole profile document. Saving it makes a new version when anything changed."
      },
      "Models.SaveReportDocumentBody": {
        "type": "object",
        "properties": {
          "document": {
            "description": "{ schemaVersion, cells, bands, clear, output }, as GET /v1/report-generator/reference\r\ndescribes it. A Draft keeps a half-made document; an Active report must stay runnable.",
            "nullable": true
          },
          "baseVersion": {
            "type": "integer",
            "description": "The setup's version this document was written from (version, as the setup was read; 0 when it\r\nhas none yet). A setup that has another version by now refuses the save with 409 conflict and\r\nkeeps what it has: read it again and make the change on that version. Left out, the save is not checked.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The whole report document (ReportDocument). Saving it makes a new version when anything changed."
      },
      "Models.SaveRulesBody": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "integer",
            "format": "int32"
          },
          "rules": {
            "description": "The rules, as GET /v1/standardizer/reference describes them (rulesSchema).",
            "nullable": true
          },
          "namingStandards": {
            "description": "Naming standards that \"follows\" requirements name by id; left out keeps none.",
            "nullable": true
          },
          "units": {
            "type": "string",
            "description": "The unit of every length the rules give: DrawingUnits (each drawing's own, the default), Millimetres or Inches.",
            "nullable": true
          },
          "baseVersion": {
            "type": "integer",
            "description": "The setup's version this document was written from (version, as the setup was read; 0 when it\r\nhas none yet). A setup that has another version by now refuses the save with 409 conflict and\r\nkeeps what it has: read it again and make the change on that version. Left out, the save is not checked.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The whole rules document. Saving it makes a new version when anything changed."
      },
      "Models.SetInputFolderBody": {
        "type": "object",
        "properties": {
          "sourceId": {
            "type": "integer",
            "description": "The connected source (GET /v1/sources).",
            "format": "int32"
          },
          "folderPath": {
            "type": "string",
            "description": "The folder in it, as the source lists it.",
            "nullable": true
          },
          "runAutomatically": {
            "type": "boolean",
            "description": "Start runs for dropped files; left out keeps the folder's current state (a Draft starts it when published).",
            "nullable": true
          },
          "skipPaths": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Files already in the folder that must never run (by their paths in the source, as GET\r\n/v1/sources/{id}/files lists them). Left out, every drawing already there runs, and is charged, once.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.SetInputGroupingBody": {
        "type": "object",
        "properties": {
          "grouping": {
            "type": "string",
            "description": "PerDrawing or PerSubfolder.",
            "nullable": true
          },
          "quietMinutes": {
            "type": "integer",
            "description": "With PerSubfolder: minutes a subfolder must stay unchanged before its report runs.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "A report per drawing, or one per subfolder of the watched folder."
      },
      "Models.SetIssueStatusBody": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Open or Done.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.SetMappingCrmTriggerBody": {
        "type": "object",
        "properties": {
          "fieldId": {
            "type": "string",
            "description": "A yes/no field of the mapping's CRM data (GET .../crm-trigger/options lists them).",
            "nullable": true
          },
          "runAutomatically": {
            "type": "boolean",
            "description": "Start runs for ticked records; left out keeps the current state (on, for a new trigger).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A CRM mapping's automatic start."
      },
      "Models.SetMappingInputFolderBody": {
        "type": "object",
        "properties": {
          "sourceId": {
            "type": "integer",
            "description": "The connected source (GET /v1/sources).",
            "format": "int32"
          },
          "folderPath": {
            "type": "string",
            "description": "The folder in it.",
            "nullable": true
          },
          "runAutomatically": {
            "type": "boolean",
            "description": "Start runs for dropped files; left out keeps the folder's current state (a Draft starts it when published).",
            "nullable": true
          },
          "fillDroppedDrawings": {
            "type": "boolean",
            "description": "Each data file fills the same-named drawing dropped beside it rather than the template; left out keeps the setting.",
            "nullable": true
          },
          "skipPaths": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Files already in the folder that must never run (by path).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Auto Fill's watched folder: each data file dropped in it fills a drawing on its own."
      },
      "Models.SetMappingOutputFolderBody": {
        "type": "object",
        "properties": {
          "sourceId": {
            "type": "integer",
            "description": "A CRM mapping only: the connected source (GET /v1/sources) the folder is on. Other mappings save on their input folder's source.",
            "format": "int32",
            "nullable": true
          },
          "folderPath": {
            "type": "string",
            "description": "A folder on the input folder's source; empty clears it.",
            "nullable": true
          },
          "outputMode": {
            "type": "string",
            "description": "Folder (runs save to it) or Download. Left out: setting a folder saves to it, clearing it downloads.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.SetOutputFolderBody": {
        "type": "object",
        "properties": {
          "folderPath": {
            "type": "string",
            "description": "A folder on the input folder's source; empty clears it.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.SetResultFolderBody": {
        "type": "object",
        "properties": {
          "resultFolderPath": {
            "type": "string",
            "description": "A folder of the same account the results go to.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.SetRunAutomaticallyBody": {
        "type": "object",
        "properties": {
          "runAutomatically": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Models.StartConfigurationScanBody": {
        "type": "object",
        "properties": {
          "includeHandles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Handles of objects in the template to include (blocks, texts); empty reads what the scan finds.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Which objects the scan reads beyond what it finds on its own."
      },
      "Models.StartCrmRunBody": {
        "type": "object",
        "properties": {
          "recordIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The records' ids (the data access's key field); \"PRJ-1, PRJ-2\" in one entry counts as two.",
            "nullable": true
          },
          "drawingFileId": {
            "type": "integer",
            "description": "As on the file run.",
            "format": "int32",
            "nullable": true
          },
          "saveToOutputFolder": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "description": "A Crm mapping's run of records by id: one drawing per record."
      },
      "Models.StartMappingRunBody": {
        "type": "object",
        "properties": {
          "source": {
            "$ref": "#/components/schemas/Models.PublicRunSource"
          },
          "fileIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Data files uploaded before, by file id.",
            "nullable": true
          },
          "drawingFileId": {
            "type": "integer",
            "description": "The drawing to fill, uploaded before: required when the mapping fills drawings you provide, refused otherwise.",
            "format": "int32",
            "nullable": true
          },
          "saveToOutputFolder": {
            "type": "boolean",
            "description": "Also deliver the drawings to the mapping's output folder."
          }
        },
        "additionalProperties": false,
        "description": "What a run fills: give exactly one of source (data files in a folder of a connected source) or\r\nfileIds (data files uploaded before). Excel mappings take workbooks; Crm mappings take text files of\r\nrecord ids. For records of a Crm mapping by id, use POST .../runs/crm instead."
      },
      "Models.StartPrintSampleRunBody": {
        "type": "object",
        "properties": {
          "names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The samples to print, by name (GET /v1/plotter/sample-drawings); left out prints all of them.",
            "nullable": true
          },
          "saveToOutputFolder": {
            "type": "boolean",
            "description": "Also deliver the PDFs to the profile's output folder."
          }
        },
        "additionalProperties": false,
        "description": "Print the server's sample drawings with a profile; billed as an upload of them."
      },
      "Models.StartRunBody": {
        "type": "object",
        "properties": {
          "source": {
            "$ref": "#/components/schemas/Models.PublicRunSource"
          },
          "fileIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Drawings uploaded before (POST /v1/files or an upload link), by file id.",
            "nullable": true
          },
          "saveToOutputFolder": {
            "type": "boolean",
            "description": "Also deliver the results to the ruleset's output folder."
          }
        },
        "additionalProperties": false,
        "description": "The drawings to check: a folder of a connected source, or files uploaded before. Give one of the two."
      },
      "Models.StartScanBody": {
        "type": "object",
        "properties": {
          "includeHandles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Handles of entities that should also get property-style targets (layer, colour, visibility…).",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.StartSourceSessionBody": {
        "type": "object",
        "properties": {
          "connectionId": {
            "type": "string",
            "description": "A signed-in OAuth connection (POST /v1/sources/connect), status authorized.",
            "nullable": true
          },
          "provider": {
            "type": "string",
            "description": "A credentials provider: its name.",
            "nullable": true
          },
          "credentials": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "A credentials provider: the fields GET /v1/sources/providers lists for it.",
            "nullable": true
          },
          "driveId": {
            "type": "string",
            "description": "SharePoint: the document library.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.StartValuesRunBody": {
        "type": "object",
        "properties": {
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.ValuesRecordBody"
            },
            "description": "The records, one drawing each. For one drawing, values (and name) can be given without records.",
            "nullable": true
          },
          "values": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "nullable": true
            },
            "description": "One record's values, without \"records\": the short form for filling one drawing, and the one\r\na form built from the values schema fills in (a Power Automate action). Not together with records.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "With values: what the record is called.",
            "nullable": true
          },
          "drawingFileId": {
            "type": "integer",
            "description": "As on the file run.",
            "format": "int32",
            "nullable": true
          },
          "saveToOutputFolder": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "description": "A run from values: one drawing per record. A property the body does not have is refused, not\r\npassed over: values put in the wrong place would otherwise fill nothing, without a word."
      },
      "Models.TemplateFromFileBody": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "A template (or print template) uploaded before, by file id."
      },
      "Models.UpdateSetupBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "A new name; left out keeps the name.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "A new description; left out keeps it, an empty string clears it.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Models.UpdateSourceFoldersBody": {
        "type": "object",
        "properties": {
          "folders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicFolderSelection"
            },
            "description": "All the folders ByLayer may use from now on (GET /v1/sources/{id}/account-folders lists the choice; GET .../folders the current ones).",
            "nullable": true
          },
          "add": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Models.PublicFolderSelection"
            },
            "description": "Folders to add to the current ones.",
            "nullable": true
          },
          "remove": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Paths of current folders to remove.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The folders ByLayer may use: either the whole new list (folders), or changes to the list as it\r\nis (add and remove), not both. Changes are safer: nested folders and the ones auto runs use stay\r\nunless named. A folder an auto run watches or saves to cannot be removed (409 folder_in_use)."
      },
      "Models.UpdateWebhookBody": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "A new URL; left out keeps it.",
            "nullable": true
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A new list of events; left out keeps it.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "A new description; empty clears it, left out keeps it.",
            "nullable": true
          },
          "enabled": {
            "type": "boolean",
            "description": "Turns the webhook on or off; left out keeps it.",
            "nullable": true
          },
          "tool": {
            "type": "string",
            "description": "The tool whose runs it hears of; empty hears every tool's, left out keeps it.",
            "nullable": true
          },
          "setupGroupId": {
            "type": "string",
            "description": "The setup whose runs it hears of; left out keeps it. Send clearSetup to hear every setup's again.",
            "format": "uuid",
            "nullable": true
          },
          "clearSetup": {
            "type": "boolean",
            "description": "True hears every setup's runs again."
          }
        },
        "additionalProperties": false
      },
      "Models.UseFileBody": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "A template or workbook uploaded before, by file id."
      },
      "Models.ValuesRecordBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "What the record is called on the run and in a default file name; \"Record 1\" when left out.",
            "nullable": true
          },
          "values": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "nullable": true
            },
            "description": "Values by data field key (GET .../values-schema lists them): text, or a number or true/false\r\nsent as such. A field left out, or sent as null, keeps what the mapping fills by itself.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Contracts.ConfiguratorField": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "nullable": true
          },
          "kind": {
            "type": "string",
            "nullable": true
          },
          "required": {
            "type": "boolean"
          },
          "maxLength": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "min": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "max": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "step": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "unit": {
            "type": "string",
            "nullable": true
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "dateFormat": {
            "type": "string",
            "nullable": true
          },
          "defaultToday": {
            "type": "boolean"
          },
          "usualValues": {
            "type": "array",
            "items": {
              "type": "number",
              "format": "double"
            },
            "nullable": true
          },
          "rule": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Contracts.ConfiguratorRule": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "target": {
            "type": "string",
            "nullable": true
          },
          "labelPattern": {
            "type": "string",
            "nullable": true
          },
          "required": {
            "type": "boolean"
          },
          "tip": {
            "type": "string",
            "nullable": true
          },
          "limits": {
            "type": "string",
            "nullable": true
          },
          "min": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "max": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "step": {
            "type": "number",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Contracts.QuickSelectStep": {
        "type": "object",
        "properties": {
          "applyTo": {
            "type": "string",
            "nullable": true
          },
          "layout": {
            "type": "string",
            "nullable": true
          },
          "objectType": {
            "type": "string",
            "nullable": true
          },
          "property": {
            "type": "string",
            "nullable": true
          },
          "operator": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "string",
            "nullable": true
          },
          "exclude": {
            "type": "boolean"
          },
          "append": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Contracts.ReportBand": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "sheet": {
            "type": "string",
            "nullable": true
          },
          "range": {
            "type": "string",
            "nullable": true
          },
          "direction": {
            "type": "string",
            "nullable": true
          },
          "fill": {
            "type": "string",
            "nullable": true
          },
          "slotRows": {
            "type": "integer",
            "format": "int32"
          },
          "exampleRows": {
            "type": "integer",
            "format": "int32"
          },
          "record": {
            "type": "string",
            "nullable": true
          },
          "select": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.QuickSelectStep"
            },
            "nullable": true
          },
          "groupBy": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "sort": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.ReportSort"
            },
            "nullable": true
          },
          "columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.ReportColumn"
            },
            "nullable": true
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.ReportSection"
            },
            "nullable": true
          },
          "detailRows": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Contracts.ReportCell": {
        "type": "object",
        "properties": {
          "sheet": {
            "type": "string",
            "nullable": true
          },
          "cell": {
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.ReportValue"
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Contracts.ReportCellRef": {
        "type": "object",
        "properties": {
          "sheet": {
            "type": "string",
            "nullable": true
          },
          "cell": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Contracts.ReportColumn": {
        "type": "object",
        "properties": {
          "cell": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "field": {
            "type": "string",
            "nullable": true
          },
          "aggregate": {
            "type": "string",
            "nullable": true
          },
          "formula": {
            "type": "string",
            "nullable": true
          },
          "separator": {
            "type": "string",
            "nullable": true
          },
          "distinct": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Contracts.ReportOutput": {
        "type": "object",
        "properties": {
          "xlsx": {
            "type": "boolean"
          },
          "pdf": {
            "type": "boolean"
          },
          "split": {
            "type": "string",
            "nullable": true
          },
          "fileName": {
            "type": "string",
            "nullable": true
          },
          "culture": {
            "type": "string",
            "nullable": true
          },
          "sheetPer": {
            "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.ReportSheetPer"
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Contracts.ReportSection": {
        "type": "object",
        "properties": {
          "by": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "headerRows": {
            "type": "integer",
            "format": "int32"
          },
          "footerRows": {
            "type": "integer",
            "format": "int32"
          },
          "header": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.ReportColumn"
            },
            "nullable": true
          },
          "footer": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.ReportColumn"
            },
            "nullable": true
          },
          "descending": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Contracts.ReportSheetPer": {
        "type": "object",
        "properties": {
          "sheet": {
            "type": "string",
            "nullable": true
          },
          "by": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Contracts.ReportSort": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "nullable": true
          },
          "descending": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Contracts.ReportValue": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "nullable": true
          },
          "field": {
            "type": "string",
            "nullable": true
          },
          "select": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.QuickSelectStep"
            },
            "nullable": true
          },
          "aggregate": {
            "type": "string",
            "nullable": true
          },
          "separator": {
            "type": "string",
            "nullable": true
          },
          "distinct": {
            "type": "boolean"
          },
          "order": {
            "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.ReportSort"
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Contracts.StandardizerCase": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "when": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.StandardizerRequirement"
            },
            "nullable": true
          },
          "whenRelated": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.StandardizerRelation"
            },
            "nullable": true
          },
          "requirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.StandardizerRequirement"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Contracts.StandardizerCheck": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "nullable": true
          },
          "tolerance": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "max": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "grid": {
            "type": "number",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Contracts.StandardizerCount": {
        "type": "object",
        "properties": {
          "operator": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Contracts.StandardizerCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "properties": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Contracts.StandardizerRelation": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "nullable": true
          },
          "other": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.QuickSelectStep"
            },
            "nullable": true
          },
          "negate": {
            "type": "boolean"
          },
          "point": {
            "type": "string",
            "nullable": true
          },
          "distance": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "tolerance": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "count": {
            "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.StandardizerCount"
          },
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "whenNone": {
            "type": "string",
            "nullable": true
          },
          "whenMany": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Contracts.StandardizerRequirement": {
        "type": "object",
        "properties": {
          "property": {
            "type": "string",
            "nullable": true
          },
          "operator": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "string",
            "nullable": true
          },
          "valueFrom": {
            "type": "string",
            "nullable": true
          },
          "tolerance": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "whenMissing": {
            "type": "string",
            "nullable": true
          },
          "fallback": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Contracts.StandardizerRule": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "severity": {
            "type": "string",
            "nullable": true
          },
          "enabled": {
            "type": "boolean"
          },
          "scope": {
            "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.StandardizerScope"
          },
          "select": {
            "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.StandardizerSelection"
          },
          "requirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.StandardizerRequirement"
            },
            "nullable": true
          },
          "relations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.StandardizerRelation"
            },
            "nullable": true
          },
          "checks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.StandardizerCheck"
            },
            "nullable": true
          },
          "cases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.StandardizerCase"
            },
            "nullable": true
          },
          "count": {
            "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.StandardizerCount"
          },
          "fix": {
            "type": "boolean"
          },
          "create": {
            "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.StandardizerCreate"
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Contracts.StandardizerScope": {
        "type": "object",
        "properties": {
          "layouts": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Contracts.StandardizerSelection": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string",
            "nullable": true
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.QuickSelectStep"
            },
            "nullable": true
          },
          "relations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.StandardizerRelation"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Contracts.TemplateValueType": {
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5
        ],
        "type": "integer",
        "format": "int32"
      },
      "Modules.Cad.Application.Mapping.MappingBinding": {
        "type": "object",
        "properties": {
          "dataField": {
            "type": "string",
            "nullable": true
          },
          "target": {
            "type": "string",
            "nullable": true
          },
          "targetLabel": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "$ref": "#/components/schemas/Modules.Cad.Application.Mapping.MappingSource"
          },
          "path": {
            "type": "string",
            "nullable": true
          },
          "constant": {
            "type": "string",
            "nullable": true
          },
          "format": {
            "type": "string",
            "nullable": true
          },
          "transform": {
            "$ref": "#/components/schemas/Modules.Cad.Application.Mapping.TextTransform"
          },
          "required": {
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Mapping.MappingDataField": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "$ref": "#/components/schemas/Modules.Cad.Application.Contracts.TemplateValueType"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "defaultValue": {
            "type": "string",
            "nullable": true
          },
          "allowedValues": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Mapping.MappingSource": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "nullable": true
          },
          "sheetIndex": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "sheet": {
            "type": "string",
            "nullable": true
          },
          "cell": {
            "type": "string",
            "nullable": true
          },
          "fieldId": {
            "type": "string",
            "nullable": true
          },
          "fieldLabel": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Modules.Cad.Application.Mapping.TextTransform": {
        "enum": [
          0,
          1,
          2,
          3
        ],
        "type": "integer",
        "format": "int32"
      },
      "Modules.Tools.Application.DTOs.AutoFillExportDto": {
        "type": "object",
        "properties": {
          "format": {
            "type": "string",
            "nullable": true
          },
          "formatVersion": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "templateFileName": {
            "type": "string",
            "nullable": true
          },
          "templateFingerprint": {
            "type": "string",
            "nullable": true
          },
          "sourceKind": {
            "type": "string",
            "nullable": true
          },
          "outputMode": {
            "type": "string",
            "nullable": true
          },
          "fileNamePattern": {
            "type": "string",
            "nullable": true
          },
          "mapping": {
            "nullable": true
          },
          "exportedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "Modules.Tools.Application.DTOs.StandardizerExportDto": {
        "type": "object",
        "properties": {
          "format": {
            "type": "string",
            "nullable": true
          },
          "formatVersion": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "rules": {
            "nullable": true
          },
          "exportedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "Modules.Tools.Application.ReportGenerator.ReportTemplateCell": {
        "type": "object",
        "properties": {
          "row": {
            "type": "integer",
            "format": "int32"
          },
          "column": {
            "type": "integer",
            "format": "int32"
          },
          "text": {
            "type": "string",
            "nullable": true
          },
          "formula": {
            "type": "string",
            "nullable": true
          },
          "bold": {
            "type": "boolean"
          },
          "filled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Modules.Tools.Application.ReportGenerator.ReportTemplateSheet": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "hidden": {
            "type": "boolean"
          },
          "lastRow": {
            "type": "integer",
            "format": "int32"
          },
          "lastColumn": {
            "type": "integer",
            "format": "int32"
          },
          "cells": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modules.Tools.Application.ReportGenerator.ReportTemplateCell"
            },
            "nullable": true
          },
          "merged": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "tables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modules.Tools.Application.ReportGenerator.ReportTemplateTable"
            },
            "nullable": true
          },
          "truncated": {
            "type": "boolean",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "Modules.Tools.Application.ReportGenerator.ReportTemplateTable": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "range": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicApiFieldError": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "Where in the request body: `scopes[1]`, `rules[3].property`.",
            "nullable": true
          },
          "code": {
            "type": "string",
            "description": "What is wrong with it: `required`, `not_allowed`, `out_of_range`…",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "allowed": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The values that would be accepted, when there is a short list of them.",
            "nullable": true
          },
          "found": {
            "type": "string",
            "description": "The value that was refused, when showing it helps (a setup document's problems give it).",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicFileLink": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "GET it, with no API key, to download the file. Anyone holding it can, until it expires: hand it only to who should have the file.",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "description": "When the link stops working; ask for a new one after that.",
            "format": "date-time"
          },
          "fileName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicRunFileLink": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "integer",
            "description": "The file, as the run lists it.",
            "format": "int32"
          },
          "url": {
            "type": "string",
            "description": "GET it, with no API key, to download the file. Anyone holding it can, until it expires: hand it only to who should have the file.",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "description": "When the link stops working; ask for new ones after that.",
            "format": "date-time"
          },
          "fileName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A download link to one of a run's files."
      },
      "StandardizerRecipe": {
        "type": "object",
        "properties": {
          "asks": {
            "type": "string",
            "description": "What the office asks for, in words.",
            "nullable": true
          },
          "rule": {
            "description": "The rule that says it, as it goes in a rules document's \"rules\"."
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "http",
        "description": "An API key made in the portal under Account Settings → API Key.",
        "scheme": "bearer",
        "bearerFormat": "byl_live_…"
      }
    }
  },
  "tags": [
    {
      "name": "AutoFill",
      "description": "Auto Fill: mappings that fill a template drawing's title block, attributes, texts and properties\r\nfrom records (typed values, Excel workbooks or CRM records), one drawing per record. Set a\r\nmapping up (create, upload its template, scan it, save the mapping document, publish), then\r\nrun it. Start with GET /v1/auto-fill/reference, or POST /v1/auto-fill/mappings/from-example for\r\na working mapping to read. Fill Manually (one template, typed values, nothing saved) is under\r\n/v1/auto-fill/quick-fill."
    },
    {
      "name": "CadResources",
      "description": "The organization's Company Resources: fonts (.ttf, .otf, .shx) and plot style tables (.ctb,\r\n.stb) that drawings use when the Plotter prints or a tool reads text. Everyone in the\r\norganization lists and downloads them; owners and admins upload and delete. A personal account\r\nhas none (404 no_organization)."
    },
    {
      "name": "Connections",
      "description": "Sign-ins a person finishes in a browser: started by POST /v1/sources/connect,\r\n/v1/integrations/connect or a reconnect. Follow one here until it is completed."
    },
    {
      "name": "Integrations",
      "description": "Integrations: connected CRMs and data apps (HubSpot, Airtable, monday, Quickbase…) and the\r\ntables ByLayer may read in them (data access), which Auto Fill fills drawings from. Connecting\r\nneeds the account's owner in a browser: POST /v1/integrations/connect returns a link for them,\r\nthen GET /v1/connections/{id} follows it. In an organization, owners and admins connect\r\nintegrations and choose their tables; everyone reads them."
    },
    {
      "name": "Me",
      "description": "Who the API key acts as. A good first call: it checks the key and shows what it may do."
    },
    {
      "name": "Plotter",
      "description": "The Plotter: print profiles that turn CAD drawings into PDFs. Set a profile up (create, save\r\nits document, publish), then print drawings with it and download the PDFs. Start with\r\nGET /v1/plotter/reference for how a profile document is written, or\r\nPOST /v1/plotter/profiles/from-example for a working profile to copy from. A company's first\r\nlist of profiles includes its two default configs (colour and black-and-white)."
    },
    {
      "name": "ProductConfigurator",
      "description": "The Product Configurator: a template drawing turned into a form that prints a PDF per filled-in\r\nform. Owners and admins set configurations up (create, template, scan, document, publish);\r\nmembers and salespeople fill in the published ones (runs). A salesperson's key sees only\r\npublished configurations and their own runs. Start with GET /v1/product-configurator/reference,\r\nor POST /v1/product-configurator/configurations/from-example for a working one to read."
    },
    {
      "name": "Runs",
      "description": "Runs of every tool. A member sees the runs they started; an organization's owners and admins\r\nsee all of its runs, as on the portal's Runs page. A salesperson sees the PDFs they made with\r\nthe Product Configurator."
    },
    {
      "name": "Files",
      "description": "Files: what runs made, and the drawings and templates people put in."
    },
    {
      "name": "Organization",
      "description": "The organization the key's person belongs to. Read only: members are managed in the portal."
    },
    {
      "name": "ReportGenerator",
      "description": "The Report Generator: CAD data written into the customer's own Excel template. Set a report up\r\n(create, upload the template and a sample drawing, save the document, test it, publish), run it\r\non drawings, and download the workbooks and PDFs it wrote. Start with GET\r\n/v1/report-generator/reference, or POST /v1/report-generator/reports/from-example for a working\r\nreport to read."
    },
    {
      "name": "Sources",
      "description": "Sources: connected cloud storage accounts (Google Drive, Dropbox, OneDrive, SharePoint, Box…)\r\nand the folders in them ByLayer may use. Connecting one needs its owner to sign in in a browser:\r\nPOST /v1/sources/connect returns a link for them, then GET /v1/connections/{id} follows it.\r\nProviders that take credentials instead are connected with POST /v1/sources/sessions.\r\nIn an organization, owners and admins connect, change and remove sources; everyone reads them."
    },
    {
      "name": "Folders",
      "description": "Every folder ByLayer may use, across the key's sources, with the watched-folder runs on each."
    },
    {
      "name": "Connectors",
      "description": "Watched folders (connectors): a folder of a source whose dropped files start a tool's runs. They\r\nare set up from each tool (its input-folder call); here they are listed, paused, resumed,\r\npointed at another result folder, reconnected or removed, and their pick-ups read."
    },
    {
      "name": "Standardizer",
      "description": "The Standardizer: rulesets that check CAD drawings against an office's standards and fix what\r\nthey can. Set a ruleset up (create, save rules, publish), run it on drawings, then read the\r\nrun's issues and mark or fix them. Start with GET /v1/standardizer/reference for how rules are\r\nwritten, or POST /v1/standardizer/rulesets/from-example for a working ruleset to copy from."
    },
    {
      "name": "Uploads",
      "description": "Putting files in (docs/public-api-plan.md §4.2): a small file in one multipart request, or a\r\nlarge one (above Cloudflare's 100 MB request limit) through an upload link: to storage when it\r\ncan sign one, else to this API's own PUT.\r\nEither way the file becomes an input the key's person owns, in their organization, usable by id\r\nwherever a call takes fileIds (runs, learning from drawings, templates).\r\nUploading takes the setup or the run scope: setups take templates and samples, runs take drawings."
    },
    {
      "name": "Usage",
      "description": "Usage and credits, read only (docs/public-api-plan.md §4.7): the balance and plan allowance,\r\nwhat each tool costs, this month's usage, and the credit transactions. Check the balance before\r\nstarting a large run; a run the balance cannot pay for is refused with 402 insufficient_credits.\r\nBuying credits and changing the plan stay in the portal."
    },
    {
      "name": "Webhooks",
      "description": "Webhooks: ByLayer posts events (a run finished, a source needs signing in again, credits are\r\nlow) to your URL instead of you polling. A webhook belongs to the key's person, in the key's\r\norganization, and hears what that person may see: their own runs, and every run of the\r\norganization for owners and admins."
    }
  ]
}