{
  "openapi": "3.0.1",
  "info": {
    "title": "DynoControl API",
    "version": "v1"
  },
  "paths": {
    "/inventory/add-item": {
      "post": {
        "tags": [
          "Inventory"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddItemRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddItemRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddItemRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InventoryItemDto"
                  }
                }
              }
            }
          },
          "409": {
            "description": "When a scanned item already exists with the same value as provided and it is not deleted."
          }
        }
      }
    },
    "/journals/add-entry": {
      "post": {
        "tags": [
          "Journal"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddJournalEntryRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddJournalEntryRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddJournalEntryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/JournalEntryDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/journals/export-batch": {
      "post": {
        "tags": [
          "Journal"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchExportJournalRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchExportJournalRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/BatchExportJournalRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/change-email": {
      "post": {
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeEmailRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeEmailRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeEmailRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "409": {
            "description": "Email is not unique.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/change-password": {
      "post": {
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePasswordRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePasswordRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePasswordRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/delete-account": {
      "post": {
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteAccountRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteAccountRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteAccountRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/backoffice/delete-customer": {
      "post": {
        "tags": [
          "Backoffice"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteCustomerRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteCustomerRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteCustomerRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileDto"
                }
              }
            }
          }
        }
      }
    },
    "/inventory/delete-item": {
      "post": {
        "tags": [
          "Inventory"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteItemRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteItemRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteItemRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/journals/delete-entry": {
      "post": {
        "tags": [
          "Journal"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteJournalEntryRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteJournalEntryRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteJournalEntryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/integrations/email-import": {
      "post": {
        "tags": [
          "EmailInventoryImport"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "recipient": {
                    "type": "string"
                  }
                }
              },
              "encoding": {
                "recipient": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/inventory/export": {
      "post": {
        "tags": [
          "Inventory"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/journals/export": {
      "post": {
        "tags": [
          "Journal"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExportJournalRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ExportJournalRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExportJournalRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/forgot-password": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgotPasswordRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgotPasswordRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ForgotPasswordRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "User with provided email does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/backoffice/customers": {
      "get": {
        "tags": [
          "Backoffice"
        ],
        "parameters": [
          {
            "name": "Page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerDtoPaginatedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/journals/get-all": {
      "get": {
        "tags": [
          "Journal"
        ],
        "parameters": [
          {
            "name": "StartDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "EndDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalEntryDtoPaginatedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/profile": {
      "get": {
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileDto"
                }
              }
            }
          }
        }
      }
    },
    "/inventory/get-unused-items": {
      "get": {
        "tags": [
          "Inventory"
        ],
        "parameters": [
          {
            "name": "Page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventoryItemDtoPaginatedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/inventory/get-used-items": {
      "get": {
        "tags": [
          "Inventory"
        ],
        "parameters": [
          {
            "name": "Page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventoryItemDtoPaginatedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/login": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            }
          },
          "404": {
            "description": "User with provided email does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Incorrect password.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/refresh": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid refresh token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/register": {
      "post": {
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            }
          },
          "409": {
            "description": "Email is not unique",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/reset-password": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "The provided password reset code does not exist or has expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/backoffice/set-inventory": {
      "post": {
        "tags": [
          "Backoffice"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetInventoryRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetInventoryRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetInventoryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/journals/set-active": {
      "post": {
        "tags": [
          "Journal"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetJournalActiveRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetJournalActiveRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetJournalActiveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/inventory/update-item": {
      "post": {
        "tags": [
          "Inventory"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateItemRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateItemRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateItemRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/journals/update-entry": {
      "post": {
        "tags": [
          "Journal"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateJournalEntryRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateJournalEntryRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateJournalEntryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalEntryDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/inventory/use-all": {
      "post": {
        "tags": [
          "Inventory"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AddItemDto": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "nullable": true
          },
          "used": {
            "type": "boolean"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "inputType": {
            "$ref": "#/components/schemas/InventoryItemInputType"
          },
          "updateIfExists": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "AddItemRequest": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AddItemDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AddJournalEntryRequest": {
        "type": "object",
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BaseJournalEntryDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BaseJournalEntryDto": {
        "type": "object",
        "properties": {
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "updated": {
            "type": "string",
            "format": "date-time"
          },
          "synced": {
            "type": "boolean",
            "readOnly": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "author": {
            "type": "string",
            "nullable": true
          },
          "contractor": {
            "type": "string",
            "nullable": true
          },
          "supervisor": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "location": {
            "$ref": "#/components/schemas/LocationDto"
          },
          "initiatingDevices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiatingDevice"
            },
            "nullable": true
          },
          "explosives": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Explosive"
            },
            "nullable": true
          },
          "coveringTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CoveringType"
            },
            "nullable": true
          },
          "number": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "numberOfHoles": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "holeDiameter": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "prechargeMaterial": {
            "type": "string",
            "nullable": true
          },
          "prechargeHeight": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "displacement": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "sideDistance": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "holeDepth": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "undercut": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "estimatedRockQuantity": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "simultaneousCharge": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "totalCharge": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "specificCharge": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "numberOfRocksBlasted": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "vibrationMeasurement": {
            "type": "boolean"
          },
          "vibrationVelocity": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "vibrationAcceleration": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "vibrationMeasurementDistance": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "vibrationPercentOfLimit": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "vibrationProtocolNumber": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BatchExportJournalRequest": {
        "type": "object",
        "properties": {
          "entryIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ChangeEmailRequest": {
        "type": "object",
        "properties": {
          "newEmail": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ChangePasswordRequest": {
        "type": "object",
        "properties": {
          "oldPassword": {
            "type": "string",
            "nullable": true
          },
          "newPassword": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CoordinatesDto": {
        "type": "object",
        "properties": {
          "longitude": {
            "type": "string",
            "nullable": true
          },
          "latitude": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CoveringType": {
        "enum": [
          "Full",
          "Partly",
          "Without",
          "Anchored",
          "Assembled"
        ],
        "type": "string"
      },
      "CustomerDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "orgNumber": {
            "type": "string",
            "nullable": true
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "importEmail": {
            "type": "string",
            "nullable": true
          },
          "isJournalActive": {
            "type": "boolean"
          },
          "journalUsagePeriods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalUsagePeriod"
            },
            "nullable": true
          },
          "usesCommonInventory": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "CustomerDtoPaginatedResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomerDto"
            },
            "nullable": true
          },
          "meta": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false
      },
      "DeleteAccountRequest": {
        "type": "object",
        "properties": {
          "password": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DeleteCustomerRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "DeleteItemRequest": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ItemToDelete"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DeleteJournalEntryRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "Explosive": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ExplosiveType"
          },
          "customValue": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExplosiveType": {
        "enum": [
          "Dynamite",
          "Pentyl",
          "Booster",
          "ANFO",
          "Emulsion",
          "Other"
        ],
        "type": "string"
      },
      "ExportJournalRequest": {
        "type": "object",
        "properties": {
          "entryId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ForgotPasswordRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "InitiatingDevice": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/InitiatingDeviceType"
          },
          "customValue": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "InitiatingDeviceType": {
        "enum": [
          "Electronic",
          "Shockwave",
          "Electric",
          "TopIgnition",
          "Other"
        ],
        "type": "string"
      },
      "InventoryItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "value": {
            "type": "string",
            "nullable": true
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          },
          "lastModified": {
            "type": "string",
            "format": "date-time"
          },
          "lastModifiedBy": {
            "type": "string",
            "nullable": true
          },
          "inputType": {
            "$ref": "#/components/schemas/InventoryItemInputType"
          },
          "used": {
            "type": "boolean"
          },
          "synced": {
            "type": "boolean",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "InventoryItemDtoPaginatedResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InventoryItemDto"
            },
            "nullable": true
          },
          "meta": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false
      },
      "InventoryItemInputType": {
        "enum": [
          "Scanned",
          "Text",
          "Imported"
        ],
        "type": "string"
      },
      "ItemToDelete": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "ItemToUpdate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "used": {
            "type": "boolean"
          },
          "lastModified": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "JournalEntryDto": {
        "type": "object",
        "properties": {
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "updated": {
            "type": "string",
            "format": "date-time"
          },
          "synced": {
            "type": "boolean",
            "readOnly": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "author": {
            "type": "string",
            "nullable": true
          },
          "contractor": {
            "type": "string",
            "nullable": true
          },
          "supervisor": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "location": {
            "$ref": "#/components/schemas/LocationDto"
          },
          "initiatingDevices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiatingDevice"
            },
            "nullable": true
          },
          "explosives": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Explosive"
            },
            "nullable": true
          },
          "coveringTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CoveringType"
            },
            "nullable": true
          },
          "number": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "numberOfHoles": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "holeDiameter": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "prechargeMaterial": {
            "type": "string",
            "nullable": true
          },
          "prechargeHeight": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "displacement": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "sideDistance": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "holeDepth": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "undercut": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "estimatedRockQuantity": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "simultaneousCharge": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "totalCharge": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "specificCharge": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "numberOfRocksBlasted": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "vibrationMeasurement": {
            "type": "boolean"
          },
          "vibrationVelocity": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "vibrationAcceleration": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "vibrationMeasurementDistance": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "vibrationPercentOfLimit": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "vibrationProtocolNumber": {
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "JournalEntryDtoPaginatedResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalEntryDto"
            },
            "nullable": true
          },
          "meta": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "additionalProperties": false
      },
      "JournalUsagePeriod": {
        "type": "object",
        "properties": {
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LocationDto": {
        "type": "object",
        "properties": {
          "coordinates": {
            "$ref": "#/components/schemas/CoordinatesDto"
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LoginRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "nullable": true
          },
          "password": {
            "type": "string",
            "nullable": true
          },
          "superAdminOnly": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "LoginResponse": {
        "type": "object",
        "properties": {
          "accessToken": {
            "type": "string",
            "nullable": true
          },
          "refreshToken": {
            "type": "string",
            "nullable": true
          },
          "profile": {
            "$ref": "#/components/schemas/ProfileDto"
          }
        },
        "additionalProperties": false
      },
      "PaginationMeta": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalCount": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "ProfileDto": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "nullable": true
          },
          "orgNumber": {
            "type": "string",
            "nullable": true
          },
          "importEmailAddress": {
            "type": "string",
            "nullable": true
          },
          "isJournalFeatureActive": {
            "type": "boolean"
          },
          "usesCommonInventory": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "RefreshRequest": {
        "type": "object",
        "properties": {
          "refreshToken": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RegisterRequest": {
        "type": "object",
        "properties": {
          "orgNumber": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "password": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ResetPasswordRequest": {
        "type": "object",
        "properties": {
          "resetCode": {
            "type": "string",
            "nullable": true
          },
          "newPassword": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SetInventoryRequest": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "useCommonInventory": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "SetJournalActiveRequest": {
        "type": "object",
        "properties": {
          "isJournalFeatureActive": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "UpdateItemRequest": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ItemToUpdate"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateJournalEntryRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "entry": {
            "$ref": "#/components/schemas/BaseJournalEntryDto"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "description": "JWT Authorization header using the Bearer scheme.",
        "scheme": "Bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "bearerAuth": [ ]
    }
  ]
}