{
  "x-generator": "NSwag v14.6.2.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))",
  "openapi": "3.0.0",
  "info": {
    "title": "PiShock Public API v1",
    "description": "General-Access Application Programming Interface for PiShock.",
    "version": "v1"
  },
  "servers": [
    {
      "url": "http://api.pishock.com"
    }
  ],
  "paths": {
    "/Links/{LinkId}": {
      "delete": {
        "tags": [
          "Links",
          "Links"
        ],
        "operationId": "DeleteLinkEndpoint",
        "parameters": [
          {
            "name": "LinkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Link has been deleted."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Links/{LinkCode}": {
      "get": {
        "tags": [
          "Links",
          "Links"
        ],
        "operationId": "GetLinkEndpoint",
        "parameters": [
          {
            "name": "LinkCode",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the details of a specific link.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetLinkResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Link is claimed by another user."
          }
        }
      }
    },
    "/Links": {
      "get": {
        "tags": [
          "Links",
          "Links"
        ],
        "operationId": "GetLinksEndpoint",
        "responses": {
          "200": {
            "description": "Returns all links for account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GetLinksResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "post": {
        "tags": [
          "Links",
          "Links"
        ],
        "summary": "Creates a new link.",
        "operationId": "PiShockAPIEndpointsCreateLink",
        "requestBody": {
          "x-name": "CreateLinkRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLinkRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "204": {
            "description": "Link has been created."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Account/{AccountId}": {
      "get": {
        "tags": [
          "Account",
          "Account"
        ],
        "summary": "Fetches information about another user",
        "description": "This is a work in progress and currently only returns thier Username.",
        "operationId": "PiShockAuthEndpointsGetOtherAccountEndpoint",
        "parameters": [
          {
            "name": "AccountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "Could not find user with specified Id."
          },
          "200": {
            "description": "Returns a GetOtherAccountResponse containing the example values.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOtherAccountResponse"
                }
              }
            }
          },
          "401": {
            "description": "API Key is not specified or invalid."
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Account": {
      "get": {
        "tags": [
          "Account",
          "Account"
        ],
        "summary": "Fetches information about the account owning this API Key.",
        "description": "This method requires no parameters, please see /Account/{AccountId} to fetch information about other accounts.",
        "operationId": "PiShockAPIEndpointsGetAccountEndpoint",
        "responses": {
          "404": {
            "description": "Account information not present in system for API Key."
          },
          "200": {
            "description": "Returns account information for the API key owner.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAccountResponse"
                }
              }
            }
          },
          "401": {
            "description": "API Key is not specified, or invalid."
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Account/Usernames": {
      "get": {
        "tags": [
          "Account",
          "Account"
        ],
        "summary": "Allows the resolution of UserIds to Usernames in bulk or singular.",
        "description": "Please specify an array of User Ids in the form &UserIds=&UserIds=",
        "operationId": "PiShockAPIEndpointsGetNamesEndpoint",
        "parameters": [
          {
            "name": "UserIds",
            "in": "query",
            "style": "form",
            "explode": true,
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            },
            "example": [
              0
            ]
          }
        ],
        "responses": {
          "510": {
            "description": "Failure calling internal lookup."
          },
          "400": {
            "description": "No UserIds were specified."
          },
          "200": {
            "description": "An object containing userId, Name pairs will be returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GetNamesResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "API Key is not specified, or invalid."
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Firmware/{FirmwareType}": {
      "get": {
        "tags": [
          "Firmware",
          "Firmware"
        ],
        "summary": "Fetches information about the account owning this API Key.",
        "description": "This method requires no parameters, please see /Account/{AccountId} to fetch information about other accounts.",
        "operationId": "PiShockAPIEndpointsGetFirmwareEndpoint",
        "parameters": [
          {
            "name": "FirmwareType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "Account information not present in system for API Key."
          },
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/Firmware/Version/{FirmwareType}": {
      "get": {
        "tags": [
          "Firmware",
          "Firmware"
        ],
        "summary": "Fetches firmware for OTA Updating",
        "description": "This method requires no parameters, please see /Account/{AccountId} to fetch information about other accounts.",
        "operationId": "PiShockAPIEndpointsGetLatestOTAVersionEndpoint",
        "parameters": [
          {
            "name": "FirmwareType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "Firmware information not present in system for the specified firmware type."
          },
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/Firmware/OTA/{FirmwareType}": {
      "get": {
        "tags": [
          "Firmware",
          "Firmware"
        ],
        "summary": "Fetches firmware for OTA Updating",
        "description": "This method requires no parameters, please see /Account/{AccountId} to fetch information about other accounts.",
        "operationId": "PiShockAPIEndpointsGetOTAFirmwareEndpoint",
        "parameters": [
          {
            "name": "FirmwareType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "Account information not present in system for API Key."
          },
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/Health": {
      "get": {
        "tags": [
          "Health",
          "Health"
        ],
        "summary": "Returns 200 if API is accessible.",
        "operationId": "PiShockAPIEndpointsHealthEndpoint",
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/Hub/Unlink": {
      "delete": {
        "tags": [
          "Hub",
          "Hub"
        ],
        "summary": "Unlinks a hub from your account.",
        "operationId": "PiShockAPIEndpointsUnlinkClientEndpoint",
        "requestBody": {
          "x-name": "UnlinkClientRequest",
          "description": "",
          "content": {
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/UnlinkClientRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnlinkClientRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "204": {
            "description": "Hub has been unlinked."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Hub": {
      "get": {
        "tags": [
          "Hub",
          "Hub"
        ],
        "summary": "Retrieves all hubs owned by the account.",
        "operationId": "PiShockAPIEndpointsGetAllHubsEndpoint",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GetAllHubsResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Hub/Name": {
      "patch": {
        "tags": [
          "Hub",
          "Hub"
        ],
        "summary": "Changes the display name of the hub.",
        "operationId": "PiShockAPIEndpointsRenameClientEndpoint",
        "requestBody": {
          "x-name": "RenameClientRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RenameClientRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "204": {
            "description": "Hub has been renamed."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Hub/Link": {
      "post": {
        "tags": [
          "Hub",
          "Hub"
        ],
        "summary": "Links a hub to your account with the OTK.",
        "operationId": "PiShockAPIEndpointsLinkClientEndpoint",
        "requestBody": {
          "x-name": "LinkClientRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkClientRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "204": {
            "description": "Hub has been Linked."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Links/Pause/{LinkId}": {
      "patch": {
        "tags": [
          "Links",
          "Links"
        ],
        "summary": "Changes the pause state of a link.",
        "operationId": "PiShockAPIEndpointsPauseLinkEndpoint",
        "parameters": [
          {
            "name": "LinkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "x-name": "PauseLinkRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PauseLinkRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "204": {
            "description": "Link has been paused or unpaused."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Multishock/Flow/{flowId}": {
      "delete": {
        "tags": [
          "Multishock",
          "Multishock"
        ],
        "summary": "Deletes a flow owned by the authenticated user.",
        "operationId": "PiShockAPIEndpointsDeleteFlowEndpoint",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "get": {
        "tags": [
          "Multishock",
          "Multishock"
        ],
        "summary": "Retrieves a specific flow by its database ID.\nReturns the complete flow object including all flow data.",
        "operationId": "PiShockAPIEndpointsGetFlowEndpoint",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetFlowResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "patch": {
        "tags": [
          "Multishock",
          "Multishock"
        ],
        "summary": "Updates an existing flow owned by the authenticated user.",
        "operationId": "PiShockAPIEndpointsApproveFlowEndpoint",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "x-name": "ApproveFlowRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApproveFlowRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadFlowResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "put": {
        "tags": [
          "Multishock",
          "Multishock"
        ],
        "summary": "Updates an existing flow owned by the authenticated user.",
        "operationId": "PiShockAPIEndpointsUpdateFlowEndpoint",
        "parameters": [
          {
            "name": "flowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "x-name": "UpdateFlowRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFlowRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadFlowResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Multishock/Flows/Creator/{CreatorId}": {
      "get": {
        "tags": [
          "Multishock",
          "Multishock"
        ],
        "summary": "Retrieves all flows by a specific creator.\nIf no CreatorId is specified, returns flows for the authenticated user.\nReturns limited fields (name, description, creator, dates, tags, and plugin dependencies).",
        "operationId": "PiShockAPIEndpointsGetFlowsByCreatorEndpoint",
        "parameters": [
          {
            "name": "CreatorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GetFlowListItemResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Multishock/Flows": {
      "get": {
        "tags": [
          "Multishock",
          "Multishock"
        ],
        "summary": "Retrieves a paginated list of flows.\nReturns limited fields (name, description, creator, dates, tags, and plugin dependencies).\nMaximum 50 flows per page.",
        "operationId": "PiShockAPIEndpointsGetFlowsListEndpoint",
        "parameters": [
          {
            "name": "Page",
            "in": "query",
            "description": "The page number (0-indexed). Defaults to 0.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0,
              "nullable": false
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "The number of items per page. Capped at 50.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50,
              "nullable": false
            }
          },
          {
            "name": "Search",
            "in": "query",
            "description": "Optional search term to filter flows by name, creator name, tags, or plugin dependencies.",
            "schema": {
              "type": "string",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetFlowsListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Multishock/Flows/UnApproved": {
      "get": {
        "tags": [
          "Multishock",
          "Multishock"
        ],
        "summary": "Retrieves all flows by a specific creator.\nIf no CreatorId is specified, returns flows for the authenticated user.\nReturns limited fields (name, description, creator, dates, tags, and plugin dependencies).",
        "operationId": "PiShockAPIEndpointsGetUnApprovedFlowsEndpoint",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GetFlowListItemResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Multishock/Flow": {
      "post": {
        "tags": [
          "Multishock",
          "Multishock"
        ],
        "summary": "Uploads a new flow for the authenticated user.",
        "operationId": "PiShockAPIEndpointsUploadFlowEndpoint",
        "requestBody": {
          "x-name": "UploadFlowRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadFlowRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadFlowResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Share/{ShareId}": {
      "delete": {
        "tags": [
          "Share",
          "Share"
        ],
        "summary": "Deletes a share code.",
        "operationId": "PiShockAPIEndpointsDeleteShareEndpoint",
        "parameters": [
          {
            "name": "ShareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Share code has been deleted."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Share/GetShared": {
      "get": {
        "tags": [
          "Share",
          "Share"
        ],
        "summary": "Sets the allowed modes on the share (shock/vibrate/beep)",
        "operationId": "PiShockAPIEndpointsGetShared",
        "responses": {
          "200": {
            "description": "Returns an array of shockers shared with the user, along with their allowed modes and other share settings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GetSharedShocker"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Share/Limit": {
      "patch": {
        "tags": [
          "Share",
          "Share"
        ],
        "summary": "Changes the limit on a share.",
        "operationId": "PiShockAPIEndpointsChangeLimitEndpoint",
        "requestBody": {
          "x-name": "ChangeLimitRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeLimitRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "204": {
            "description": "Operation of given type was modified successfully."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Share/Hold": {
      "patch": {
        "tags": [
          "Share",
          "Share"
        ],
        "summary": "Sets the allowed modes on the share (shock/vibrate/beep)",
        "operationId": "PiShockAPIEndpointsSetHoldStateEndpoint",
        "requestBody": {
          "x-name": "SetHoldStateRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetHoldStateRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "204": {
            "description": "Share code should now reflect new CanHold state."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Share/Link": {
      "patch": {
        "tags": [
          "Share",
          "Share"
        ],
        "summary": "Sets whether or not the share can create links.",
        "operationId": "PiShockAPIEndpointsSetLinkCreationStateEndpoint",
        "requestBody": {
          "x-name": "SetLinkCreationStateRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetLinkCreationStateRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "204": {
            "description": "Share code should now reflect new CanCreateLinks state."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Share/Log": {
      "patch": {
        "tags": [
          "Share",
          "Share"
        ],
        "summary": "Sets whether or not the share can log.",
        "operationId": "PiShockAPIEndpointsSetLogStateEndpoint",
        "requestBody": {
          "x-name": "SetLogStateRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetLogStateRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "204": {
            "description": "Share code should now reflect new CanLog state."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Share/Pause": {
      "patch": {
        "tags": [
          "Share",
          "Share"
        ],
        "summary": "Pauses, or unpauses a share, use null for PauseState to toggle.",
        "operationId": "PiShockAPIEndpointsSetPauseStateEndpoint",
        "requestBody": {
          "x-name": "SetPauseStateRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetPauseStateRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "204": {
            "description": "Share code should now reflect new pause state."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Share/Modes": {
      "patch": {
        "tags": [
          "Share",
          "Share"
        ],
        "summary": "Sets the allowed modes on the share (shock/vibrate/beep)",
        "operationId": "PiShockAPIEndpointsSetShareOperationModesEndpoint",
        "requestBody": {
          "x-name": "SetShareOperationModesRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetShareOperationModesRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "204": {
            "description": "Share code should now reflect new CanCreateLinks state."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Share": {
      "post": {
        "tags": [
          "Share",
          "Share"
        ],
        "summary": "Creates a new share code.",
        "operationId": "PiShockAPIEndpointsCreateShareEndpoint",
        "requestBody": {
          "x-name": "CreateShareRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateShareRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Share code has been created, should return share code.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "put": {
        "tags": [
          "Share",
          "Share"
        ],
        "summary": "Allows the user to add share codes given to them to operate devices within a defined permission scope. Can add up to 20 shares in an array.",
        "operationId": "PiShockAPIEndpointsAddShareCodesEndpoint",
        "requestBody": {
          "x-name": "AddShareCodesRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddShareCodesRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "204": {
            "description": "Share(s) added."
          },
          "404": {
            "description": "Could not find one of the shares. No shares claimed."
          },
          "410": {
            "description": "A Share is already claimed. No shares were claimed."
          },
          "412": {
            "description": "Must provide at least 1 code."
          },
          "416": {
            "description": "Cannot batch claim more than 20 codes."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Shockers/Licenses": {
      "get": {
        "tags": [
          "Shockers",
          "Shockers"
        ],
        "summary": "Retrieves Shocker licenses for a given order.",
        "operationId": "PiShockAPIEndpointsGetLicensesEndpoint",
        "parameters": [
          {
            "name": "Ordernumber",
            "in": "query",
            "required": true,
            "description": "Order number of the order to retrieve licenses for.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Licenses retrieved successfully."
          },
          "204": {
            "description": "No licenses available."
          },
          "404": {
            "description": "Could not find order or account."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Shockers/{ShockerId}": {
      "get": {
        "tags": [
          "Shockers",
          "Shockers"
        ],
        "summary": "Retrieves share codes related to the specific shocker the the given APIkey has claimed one or more share code for.",
        "operationId": "PiShockAPIEndpointsGetShockerEndpoint",
        "parameters": [
          {
            "name": "ShockerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetShockersResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "post": {
        "tags": [
          "Shockers",
          "Shockers"
        ],
        "summary": "Allows the operation of a PiShock Shocker from an API Key.",
        "description": "The ShockerId is specified as a path parameter, whereas the rest is in the body.  \nThe parameter \"AgentName\" will be removed in a future version however is still present for now -- Expect this to be replaced by the name of the actioning API Key in future.",
        "operationId": "PiShockAPIEndpointsOperateShockerEndpoint",
        "parameters": [
          {
            "name": "ShockerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "x-name": "OperateShockerRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OperateShockerRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "404": {
            "description": "Could not find share."
          },
          "405": {
            "description": "An operation was provided that the share has not allowed the device to perform (such as shocking while shocking is disabled on the share)"
          },
          "406": {
            "description": "Device is not V3 -- Please encourage the user to flash V3 on the device or seek Tech Support assistance."
          },
          "410": {
            "description": "Share is locked"
          },
          "412": {
            "description": "Intensity is out of bounds (<0, >100, Higher than max intensity for a shock)"
          },
          "416": {
            "description": "Duration exceeds limits on share, is lower than 16ms (due to legacy concerns) or higher than 15,000ms"
          },
          "503": {
            "description": "Share or shocker is paused."
          },
          "204": {
            "description": "Command has been sent to the device."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/Shockers": {
      "get": {
        "tags": [
          "Shockers",
          "Shockers"
        ],
        "summary": "Retrieves a list of shockers the given APIkey has claimed share codes for.",
        "operationId": "PiShockAPIEndpointsGetShockersEndpoint",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GetShockersResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "GetLinkResponse": {
        "type": "object",
        "description": "Response model for retrieving a specific link.",
        "additionalProperties": false,
        "properties": {
          "LinkId": {
            "type": "integer",
            "format": "int32"
          },
          "Name": {
            "type": "string"
          },
          "Paused": {
            "type": "boolean"
          },
          "UserId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "OwnerId": {
            "type": "integer",
            "format": "int32"
          },
          "RemainingActivations": {
            "type": "integer",
            "format": "int32"
          },
          "ShowCountdown": {
            "type": "boolean"
          },
          "ShowUsages": {
            "type": "boolean"
          },
          "ShockEnabled": {
            "type": "boolean"
          },
          "VibrateEnabled": {
            "type": "boolean"
          },
          "BeepEnabled": {
            "type": "boolean"
          },
          "MaxIntensity": {
            "type": "integer",
            "format": "int32"
          },
          "MaxDuration": {
            "type": "integer",
            "format": "int32"
          },
          "ForceWarning": {
            "type": "boolean"
          },
          "ForceLogin": {
            "type": "boolean"
          },
          "ActivateOnLoad": {
            "type": "boolean"
          },
          "Expiry": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "GetLinksResponse": {
        "type": "object",
        "description": "Response model for listing links for a given shocker.",
        "additionalProperties": false,
        "properties": {
          "LinkId": {
            "type": "integer",
            "format": "int32"
          },
          "ShockerId": {
            "type": "integer",
            "format": "int32"
          },
          "Code": {
            "type": "string",
            "format": "guid"
          },
          "Name": {
            "type": "string"
          },
          "Paused": {
            "type": "boolean"
          },
          "RemainingActivations": {
            "type": "integer",
            "format": "int32"
          },
          "Editable": {
            "type": "boolean"
          },
          "ShockEnabled": {
            "type": "boolean"
          },
          "VibrateEnabled": {
            "type": "boolean"
          },
          "BeepEnabled": {
            "type": "boolean"
          },
          "Created": {
            "type": "string",
            "format": "date-time"
          },
          "LastUsed": {
            "type": "string",
            "format": "date-time"
          },
          "Expiry": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "GetOtherAccountResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "UserId": {
            "type": "integer",
            "format": "int32"
          },
          "Username": {
            "type": "string"
          }
        }
      },
      "GetAccountResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "UserId": {
            "type": "integer",
            "format": "int32"
          },
          "Username": {
            "type": "string"
          },
          "EmailAddresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetAccountResponseEmail"
            }
          },
          "OAuthLinks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountTypeLinkMapping"
            }
          }
        }
      },
      "GetAccountResponseEmail": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "EmailAddress": {
            "type": "string"
          },
          "Confirmed": {
            "type": "boolean"
          }
        }
      },
      "AccountTypeLinkMapping": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "Type": {
            "type": "string"
          },
          "Linked": {
            "type": "boolean"
          }
        }
      },
      "GetNamesResponse": {
        "type": "object",
        "description": "Response model for listing names for a given user.",
        "additionalProperties": false,
        "properties": {
          "UserId": {
            "type": "integer",
            "format": "int32"
          },
          "Name": {
            "type": "string"
          }
        }
      },
      "GetNamesRequest": {
        "type": "object",
        "additionalProperties": false
      },
      "UnlinkClientRequest": {
        "type": "object",
        "description": "Unlinks a hub from an account.",
        "additionalProperties": false,
        "properties": {
          "HubId": {
            "type": "integer",
            "description": "Id of the hub to unlink.",
            "format": "int32"
          }
        }
      },
      "GetAllHubsResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "HubId": {
            "type": "integer",
            "format": "int32"
          },
          "Name": {
            "type": "string"
          }
        }
      },
      "RenameClientRequest": {
        "type": "object",
        "description": "Changes the display name on the hub.",
        "additionalProperties": false,
        "properties": {
          "HubId": {
            "type": "integer",
            "description": "Id of the hub to change the name of, you must own the hub to rename it.",
            "format": "int32"
          },
          "Name": {
            "type": "string",
            "description": "New display name of the hub."
          }
        }
      },
      "LinkClientRequest": {
        "type": "object",
        "description": "Links a hub to an account with the OTK.",
        "additionalProperties": false,
        "properties": {
          "OTK": {
            "type": "string",
            "description": "One-Time Key for the device."
          }
        }
      },
      "PauseLinkRequest": {
        "type": "object",
        "description": "Creates a new share code for a given shocker.",
        "additionalProperties": false,
        "properties": {
          "PauseState": {
            "type": "boolean",
            "description": "New state of CanHold, or null for toggle",
            "nullable": true
          }
        }
      },
      "CreateLinkRequest": {
        "type": "object",
        "description": "Creates a new share code for a given shocker.",
        "additionalProperties": false,
        "properties": {
          "Name": {
            "type": "string"
          },
          "Intensity": {
            "type": "integer",
            "format": "int32"
          },
          "Duration": {
            "type": "integer",
            "format": "int32"
          },
          "RemainingActivations": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "ShowCountdown": {
            "type": "boolean"
          },
          "ShowUsages": {
            "type": "boolean"
          },
          "Editable": {
            "type": "boolean"
          },
          "ActivateOnLoad": {
            "type": "boolean"
          },
          "ShockEnabled": {
            "type": "boolean"
          },
          "VibrateEnabled": {
            "type": "boolean"
          },
          "BeepEnabled": {
            "type": "boolean"
          },
          "ForceWarning": {
            "type": "boolean"
          },
          "ForceLogin": {
            "type": "boolean"
          },
          "SingleUser": {
            "type": "boolean"
          },
          "ShockerId": {
            "type": "integer",
            "format": "int32"
          },
          "ExpiryMinutes": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "GetFlowResponse": {
        "type": "object",
        "description": "Response model for getting a specific flow by ID.\nContains the complete flow object.",
        "additionalProperties": false,
        "properties": {
          "FlowId": {
            "type": "integer",
            "description": "The database ID of the flow.",
            "format": "int32"
          },
          "ExternalId": {
            "type": "string",
            "description": "The client-side flow ID."
          },
          "Name": {
            "type": "string",
            "description": "Display name for the flow."
          },
          "Description": {
            "type": "string",
            "description": "Description of the flow's purpose.",
            "nullable": true
          },
          "Creator": {
            "type": "string",
            "description": "Username of the flow creator."
          },
          "CreatorId": {
            "type": "integer",
            "description": "Database ID of the flow creator.",
            "format": "int32"
          },
          "IsPublic": {
            "type": "boolean",
            "description": "Whether the flow is public."
          },
          "IsApproved": {
            "type": "boolean",
            "description": "Whether the flow is approved."
          },
          "Created": {
            "type": "string",
            "description": "When the flow was created.",
            "format": "date-time"
          },
          "Modified": {
            "type": "string",
            "description": "When the flow was last modified.",
            "format": "date-time",
            "nullable": true
          },
          "FlowData": {
            "description": "The complete flow definition as JSON.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Flow"
              }
            ]
          },
          "Nodes": {
            "type": "array",
            "description": "List of nodes in the flow.",
            "items": {
              "$ref": "#/components/schemas/Node"
            }
          },
          "Connections": {
            "type": "array",
            "description": "List of connections between nodes.",
            "items": {
              "$ref": "#/components/schemas/Connection"
            }
          },
          "Tags": {
            "type": "array",
            "description": "Tags for organization.",
            "items": {
              "type": "string"
            }
          },
          "PluginDependencies": {
            "type": "array",
            "description": "Plugin IDs required to run this flow.",
            "items": {
              "$ref": "#/components/schemas/PluginDependency"
            }
          }
        }
      },
      "Flow": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "FlowId": {
            "type": "integer",
            "format": "int32"
          },
          "IsPublic": {
            "type": "boolean"
          },
          "IsApproved": {
            "type": "boolean"
          },
          "ExternalId": {
            "type": "string"
          },
          "Name": {
            "type": "string"
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "Creator": {
            "type": "integer",
            "format": "int32"
          },
          "Created": {
            "type": "string",
            "format": "date-time"
          },
          "Modified": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "Nodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Node"
            }
          },
          "Connections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Connection"
            }
          },
          "Tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag"
            }
          },
          "PluginDependencies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PluginDependency"
            }
          }
        }
      },
      "Node": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "NodeId": {
            "type": "integer",
            "format": "int32"
          },
          "ExternalId": {
            "type": "string"
          },
          "Flow": {
            "$ref": "#/components/schemas/Flow"
          },
          "TypeId": {
            "type": "string"
          },
          "X": {
            "type": "number",
            "format": "double"
          },
          "Y": {
            "type": "number",
            "format": "double"
          },
          "Config": {
            "type": "string"
          },
          "DisplayName": {
            "type": "string",
            "nullable": true
          },
          "Disabled": {
            "type": "boolean"
          }
        }
      },
      "Connection": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "ConnectionId": {
            "type": "integer",
            "format": "int32"
          },
          "ExternalId": {
            "type": "string"
          },
          "FromNode": {
            "$ref": "#/components/schemas/Node"
          },
          "FromPortId": {
            "type": "string"
          },
          "ToNode": {
            "$ref": "#/components/schemas/Node"
          },
          "ToPortId": {
            "type": "string"
          }
        }
      },
      "Tag": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "TagId": {
            "type": "integer",
            "format": "int32"
          },
          "Name": {
            "type": "string"
          },
          "Flow": {
            "$ref": "#/components/schemas/Flow"
          }
        }
      },
      "PluginDependency": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "PluginDependencyId": {
            "type": "integer",
            "format": "int32"
          },
          "Name": {
            "type": "string"
          },
          "ExternalId": {
            "type": "string"
          },
          "Link": {
            "type": "string",
            "nullable": true
          },
          "Version": {
            "type": "string",
            "nullable": true
          },
          "Flow": {
            "$ref": "#/components/schemas/Flow"
          }
        }
      },
      "GetFlowListItemResponse": {
        "type": "object",
        "description": "Response model for a flow item in a list.\nContains limited fields for list display purposes.",
        "additionalProperties": false,
        "properties": {
          "FlowId": {
            "type": "integer",
            "description": "The database ID of the flow.",
            "format": "int32"
          },
          "Name": {
            "type": "string",
            "description": "Display name for the flow."
          },
          "Description": {
            "type": "string",
            "description": "Description of the flow's purpose.",
            "nullable": true
          },
          "Creator": {
            "type": "string",
            "description": "Username of the flow creator."
          },
          "CreatorId": {
            "type": "integer",
            "description": "User ID of the flow creator.",
            "format": "int32"
          },
          "IsPublic": {
            "type": "boolean",
            "description": "Whether the flow is public."
          },
          "IsApproved": {
            "type": "boolean",
            "description": "Whether the flow is approved."
          },
          "Created": {
            "type": "string",
            "description": "When the flow was created.",
            "format": "date-time"
          },
          "Modified": {
            "type": "string",
            "description": "When the flow was last modified.",
            "format": "date-time",
            "nullable": true
          },
          "Tags": {
            "type": "array",
            "description": "Tags for organization.",
            "items": {
              "type": "string"
            }
          },
          "PluginDependencies": {
            "type": "array",
            "description": "Plugin IDs required to run this flow.",
            "items": {
              "$ref": "#/components/schemas/PluginDependency"
            }
          }
        }
      },
      "GetFlowsListResponse": {
        "type": "object",
        "description": "Response model for listing flows with pagination.",
        "additionalProperties": false,
        "properties": {
          "Flows": {
            "type": "array",
            "description": "The list of flows for this page.",
            "items": {
              "$ref": "#/components/schemas/GetFlowListItemResponse"
            }
          },
          "Total": {
            "type": "integer",
            "description": "The total number of flows available.",
            "format": "int32"
          },
          "Page": {
            "type": "integer",
            "description": "The current page number (0-indexed).",
            "format": "int32"
          },
          "PageSize": {
            "type": "integer",
            "description": "The number of items per page.",
            "format": "int32"
          }
        }
      },
      "GetFlowsListRequest": {
        "type": "object",
        "description": "Request model for getting a paginated list of flows.",
        "additionalProperties": false
      },
      "UploadFlowResponse": {
        "type": "object",
        "description": "Response model for flow upload.",
        "additionalProperties": false,
        "properties": {
          "Success": {
            "type": "boolean",
            "description": "Whether the upload was successful."
          },
          "FlowId": {
            "type": "integer",
            "description": "The database ID of the uploaded flow.",
            "format": "int32",
            "nullable": true
          },
          "Error": {
            "type": "string",
            "description": "Error message if the upload failed.",
            "nullable": true
          }
        }
      },
      "ApproveFlowRequest": {
        "type": "object",
        "description": "Request model for approving or unapproving a flow.",
        "additionalProperties": false,
        "properties": {
          "IsApproved": {
            "type": "boolean",
            "description": "Whether the flow is approved."
          }
        }
      },
      "UploadFlowRequest": {
        "type": "object",
        "description": "Request model for uploading a new flow from MultiShock client.",
        "additionalProperties": false,
        "properties": {
          "ExternalId": {
            "type": "string",
            "description": "The client-side flow ID (stored as ExternalId in database)."
          },
          "Name": {
            "type": "string",
            "description": "Display name for the flow."
          },
          "Description": {
            "type": "string",
            "description": "Optional description of the flow's purpose.",
            "nullable": true
          },
          "IsPublic": {
            "type": "boolean",
            "description": "Whether the flow is public.",
            "nullable": true
          },
          "Created": {
            "type": "string",
            "description": "When the flow was created on the client.",
            "format": "date-time"
          },
          "Modified": {
            "type": "string",
            "description": "When the flow was last modified on the client.",
            "format": "date-time",
            "nullable": true
          },
          "Nodes": {
            "type": "array",
            "description": "List of nodes in the flow.",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/Node"
            }
          },
          "Connections": {
            "type": "array",
            "description": "List of connections between nodes.",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/Connection"
            }
          },
          "Tags": {
            "type": "array",
            "description": "Tags for organization.",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "PluginDependencies": {
            "type": "array",
            "description": "Plugin IDs required to run this flow.",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/PluginDependency"
            }
          }
        }
      },
      "UpdateFlowRequest": {
        "type": "object",
        "description": "Request model for updating an existing flow.\nAll fields are optional - only provided fields will be updated.",
        "additionalProperties": false,
        "properties": {
          "Name": {
            "type": "string",
            "description": "Display name for the flow.",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "description": "Optional description of the flow's purpose.",
            "nullable": true
          },
          "IsPublic": {
            "type": "boolean",
            "description": "Whether the flow should be publicly visible.",
            "nullable": true
          },
          "Nodes": {
            "type": "array",
            "description": "Optional list of nodes in the flow. If provided, replaces all existing nodes.",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/Node"
            }
          },
          "Connections": {
            "type": "array",
            "description": "Optional list of connections between nodes. Required if Nodes is provided.",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/Connection"
            }
          },
          "Tags": {
            "type": "array",
            "description": "Tags for organization. If provided, replaces existing tags.",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "PluginDependencies": {
            "type": "array",
            "description": "Plugin IDs required to run this flow. If provided, replaces existing dependencies.",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/PluginDependency"
            }
          }
        }
      },
      "GetSharedShocker": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "OwnerId": {
            "type": "integer",
            "format": "int32"
          },
          "ClientId": {
            "type": "integer",
            "format": "int32"
          },
          "Name": {
            "type": "string"
          },
          "Type": {
            "type": "integer",
            "format": "int32"
          },
          "Id": {
            "type": "integer",
            "format": "int32"
          },
          "Paused": {
            "type": "boolean"
          },
          "CanPause": {
            "type": "boolean"
          },
          "OwnedBy": {
            "type": "string"
          },
          "MaxIntensity": {
            "type": "integer",
            "format": "int32"
          },
          "MaxDuration": {
            "type": "integer",
            "format": "int32"
          },
          "SharePaused": {
            "type": "boolean"
          },
          "CanHold": {
            "type": "boolean"
          },
          "ShareId": {
            "type": "integer",
            "format": "int32"
          },
          "CanBeep": {
            "type": "boolean"
          },
          "CanShock": {
            "type": "boolean"
          },
          "CanVibrate": {
            "type": "boolean"
          },
          "ShareCode": {
            "type": "string"
          },
          "CanLog": {
            "type": "boolean"
          },
          "CanCreateLinks": {
            "type": "boolean"
          },
          "IsV3": {
            "type": "boolean"
          },
          "Locked": {
            "type": "boolean"
          },
          "Links": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/LinkV2"
            }
          }
        }
      },
      "LinkV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "LinkId": {
            "type": "integer",
            "format": "int32"
          },
          "Code": {
            "type": "string",
            "format": "guid"
          },
          "Shocker": {
            "$ref": "#/components/schemas/Shocker"
          },
          "UserId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "Name": {
            "type": "string"
          },
          "Duration": {
            "type": "integer",
            "format": "int32"
          },
          "Intensity": {
            "type": "integer",
            "format": "int32"
          },
          "RemainingActivations": {
            "type": "integer",
            "format": "int32"
          },
          "ShowCountdown": {
            "type": "boolean"
          },
          "ShowUsages": {
            "type": "boolean"
          },
          "Editable": {
            "type": "boolean"
          },
          "ActivateOnLoad": {
            "type": "boolean"
          },
          "ShockEnabled": {
            "type": "boolean"
          },
          "VibrateEnabled": {
            "type": "boolean"
          },
          "BeepEnabled": {
            "type": "boolean"
          },
          "ForceWarning": {
            "type": "boolean"
          },
          "ForceLogin": {
            "type": "boolean"
          },
          "Paused": {
            "type": "boolean"
          },
          "Created": {
            "type": "string",
            "format": "date-time"
          },
          "LastUsed": {
            "type": "string",
            "format": "date-time"
          },
          "Expiry": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "Shocker": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int32"
          },
          "ClientId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "OwnerId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Paused": {
            "type": "boolean",
            "nullable": true
          },
          "Type": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "Links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LinkV2"
            }
          }
        }
      },
      "ChangeLimitRequest": {
        "type": "object",
        "description": "Request to change the limits on a share code.",
        "additionalProperties": false,
        "properties": {
          "ShareId": {
            "type": "integer",
            "description": "Id of the share, you must own the share to make changes.",
            "format": "int32"
          },
          "Value": {
            "type": "integer",
            "description": "New value for the given operation.",
            "format": "int32"
          },
          "Operation": {
            "description": "0: Intensity, 1: Duration.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/ShareOperation"
              }
            ]
          }
        }
      },
      "ShareOperation": {
        "type": "integer",
        "description": "Operation type for shares.",
        "x-enumNames": [
          "Intensity",
          "Duration",
          "HoldOff"
        ],
        "enum": [
          0,
          1,
          2
        ]
      },
      "SetHoldStateRequest": {
        "type": "object",
        "description": "Creates a new share code for a given shocker.",
        "additionalProperties": false,
        "properties": {
          "ShareId": {
            "type": "integer",
            "description": "Id of the share to modify",
            "format": "int32"
          },
          "HoldState": {
            "type": "boolean",
            "description": "New state of CanHold, or null for toggle",
            "nullable": true
          }
        }
      },
      "SetLinkCreationStateRequest": {
        "type": "object",
        "description": "Creates a new share code for a given shocker.",
        "additionalProperties": false,
        "properties": {
          "ShareId": {
            "type": "integer",
            "description": "Id of the share to modify",
            "format": "int32"
          },
          "LinkCreationState": {
            "type": "boolean",
            "description": "New state of CanCreateLinks, or null for toggle",
            "nullable": true
          }
        }
      },
      "SetLogStateRequest": {
        "type": "object",
        "description": "Creates a new share code for a given shocker.",
        "additionalProperties": false,
        "properties": {
          "ShareId": {
            "type": "integer",
            "description": "Id of the share to modify",
            "format": "int32"
          },
          "LogState": {
            "type": "boolean",
            "description": "New state of CanLog, or null for toggle",
            "nullable": true
          }
        }
      },
      "SetPauseStateRequest": {
        "type": "object",
        "description": "Creates a new share code for a given shocker.",
        "additionalProperties": false,
        "properties": {
          "ShareId": {
            "type": "integer",
            "description": "Id of the share to modify",
            "format": "int32"
          },
          "PauseState": {
            "type": "boolean",
            "description": "New state of pause, or null for toggle",
            "nullable": true
          }
        }
      },
      "SetShareOperationModesRequest": {
        "type": "object",
        "description": "Creates a new share code for a given shocker.",
        "additionalProperties": false,
        "properties": {
          "ShareId": {
            "type": "integer",
            "description": "Id of the share to modify",
            "format": "int32"
          },
          "VibrateState": {
            "type": "boolean",
            "description": "New state of CanVibrate, or null for toggle",
            "nullable": true
          },
          "ShockState": {
            "type": "boolean",
            "description": "New state of CanShock, or null for toggle",
            "nullable": true
          },
          "BeepState": {
            "type": "boolean",
            "description": "New state of CanBeep, or null for toggle",
            "nullable": true
          }
        }
      },
      "CreateShareRequest": {
        "type": "object",
        "description": "Creates a new share code for a given shocker.",
        "additionalProperties": false,
        "properties": {
          "ShockerId": {
            "type": "integer",
            "description": "ShockerId of the shocker to share.",
            "format": "int32"
          }
        }
      },
      "AddShareCodesRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "Shares": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "GetLicensesRequest": {
        "type": "object",
        "description": "Retrieves licenses for a given order.",
        "additionalProperties": false
      },
      "GetShockersResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "HubId": {
            "type": "integer",
            "format": "int32"
          },
          "ShockerId": {
            "type": "integer",
            "format": "int32"
          },
          "Name": {
            "type": "string"
          },
          "IsV3": {
            "type": "boolean"
          },
          "CanBeep": {
            "type": "boolean"
          },
          "CanVibrate": {
            "type": "boolean"
          },
          "CanShock": {
            "type": "boolean"
          },
          "CanPause": {
            "type": "boolean"
          },
          "MaxDuration": {
            "type": "integer",
            "format": "int32"
          },
          "MaxIntensity": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "OperateShockerRequest": {
        "type": "object",
        "description": "Message containing properties required for the operation of a shocker via the API.",
        "additionalProperties": false,
        "properties": {
          "AgentName": {
            "type": "string",
            "description": "[Deprecated]: Name of the actor on the device, this will reflect in the logs and be replaced with the name of the API Key at a later stage."
          },
          "Operation": {
            "description": "ShockerOperation to perform on the device: 0 = Shock, 1 = Vibrate, 2 = Beep",
            "oneOf": [
              {
                "$ref": "#/components/schemas/ShockerOperation"
              }
            ]
          },
          "Duration": {
            "type": "integer",
            "description": "Maximum duration of the operation in miliseconds, will clamp to the share's maximum duration if lower.",
            "format": "int32"
          },
          "Intensity": {
            "type": "integer",
            "description": "Maximum intensity of the operation, will clamp to the share's maximum intensity if lower.",
            "format": "int32"
          },
          "MinimumDuration": {
            "type": "integer",
            "description": "[Optional] To randomise duration, specify a minimum duration.",
            "format": "int32",
            "nullable": true
          },
          "MinimumIntensity": {
            "type": "integer",
            "description": "[Optional] To randomise intensity, specify a minimum intensity.",
            "format": "int32",
            "nullable": true
          },
          "IntensityAsPercentage": {
            "type": "boolean",
            "description": "Previously called \"Scale\", treats the incoming intensity as a % of the share's maximum."
          }
        }
      },
      "ShockerOperation": {
        "type": "integer",
        "description": "",
        "x-enumNames": [
          "Shock",
          "Vibrate",
          "Beep"
        ],
        "enum": [
          0,
          1,
          2
        ]
      }
    },
    "securitySchemes": {
      "JWTBearerAuth": {
        "type": "http",
        "description": "Enter a JWT token to authorize the requests...",
        "scheme": "Bearer",
        "bearerFormat": "JWT"
      },
      "Token": {
        "type": "apiKey",
        "name": "X-PiShock-Token",
        "in": "header"
      },
      "UserId": {
        "type": "apiKey",
        "name": "X-PiShock-UserId",
        "in": "header"
      },
      "ServerKey": {
        "type": "apiKey",
        "name": "X-PiShock-Server-Key",
        "in": "header"
      },
      "APIKey": {
        "type": "apiKey",
        "name": "X-PiShock-Api-Key",
        "in": "header"
      },
      "Username": {
        "type": "apiKey",
        "name": "X-PiShock-Username",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Token": [
        "*"
      ]
    },
    {
      "UserId": [
        "*"
      ]
    },
    {
      "ServerKey": [
        "*"
      ]
    },
    {
      "APIKey": [
        "*"
      ]
    },
    {
      "Username": [
        "*"
      ]
    }
  ]
}