// Code generated by go-swagger; DO NOT EDIT.

package rest_server_zrok

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"encoding/json"
)

var (
	// SwaggerJSON embedded version of the swagger document used at generation time
	SwaggerJSON json.RawMessage
	// FlatSwaggerJSON embedded flattened version of the swagger document used at generation time
	FlatSwaggerJSON json.RawMessage
)

func init() {
	SwaggerJSON = json.RawMessage([]byte(`{
  "consumes": [
    "application/zrok.v1+json"
  ],
  "produces": [
    "application/zrok.v1+json"
  ],
  "schemes": [
    "http"
  ],
  "swagger": "2.0",
  "info": {
    "description": "zrok client access",
    "title": "zrok",
    "version": "1.0.0"
  },
  "basePath": "/api/v1",
  "paths": {
    "/access": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "share"
        ],
        "operationId": "access",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/accessRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "access created",
            "schema": {
              "$ref": "#/definitions/accessResponse"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/account": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "createAccount",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "password": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "created",
            "schema": {
              "properties": {
                "token": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/changePassword": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "account"
        ],
        "operationId": "changePassword",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "newPassword": {
                  "type": "string"
                },
                "oldPassword": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "changed password"
          },
          "400": {
            "description": "password not changed"
          },
          "401": {
            "description": "unauthorized"
          },
          "422": {
            "description": "password validation failure",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/configuration": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "configuration",
        "responses": {
          "200": {
            "description": "current configuration",
            "schema": {
              "$ref": "#/definitions/configuration"
            }
          }
        }
      }
    },
    "/detail/account": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "getAccountDetail",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/environments"
            }
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/detail/environment/{envZId}": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "getEnvironmentDetail",
        "parameters": [
          {
            "type": "string",
            "name": "envZId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/environmentAndResources"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/detail/frontend/{feId}": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "getFrontendDetail",
        "parameters": [
          {
            "type": "integer",
            "name": "feId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/frontend"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/detail/share/{shrToken}": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "getShareDetail",
        "parameters": [
          {
            "type": "string",
            "name": "shrToken",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/share"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/disable": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "environment"
        ],
        "operationId": "disable",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/disableRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "environment disabled"
          },
          "401": {
            "description": "invalid environment"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/enable": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "environment"
        ],
        "operationId": "enable",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "description": {
                  "type": "string"
                },
                "host": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "environment enabled",
            "schema": {
              "properties": {
                "cfg": {
                  "type": "string"
                },
                "identity": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "account not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/frontend": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "createFrontend",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "permissionMode": {
                  "type": "string",
                  "enum": [
                    "open",
                    "closed"
                  ]
                },
                "public_name": {
                  "type": "string"
                },
                "url_template": {
                  "type": "string"
                },
                "zId": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "frontend created",
            "schema": {
              "type": "object",
              "properties": {
                "token": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "bad request"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      },
      "delete": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "deleteFrontend",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "frontendToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "frontend deleted"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      },
      "patch": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "updateFrontend",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "frontendToken": {
                  "type": "string"
                },
                "publicName": {
                  "type": "string"
                },
                "urlTemplate": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "frontend updated"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/frontends": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "listFrontends",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "createdAt": {
                    "type": "integer"
                  },
                  "publicName": {
                    "type": "string"
                  },
                  "token": {
                    "type": "string"
                  },
                  "updatedAt": {
                    "type": "integer"
                  },
                  "urlTemplate": {
                    "type": "string"
                  },
                  "zId": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/grants": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "grants",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/identity": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "createIdentity",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "name": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "created",
            "schema": {
              "properties": {
                "cfg": {
                  "type": "string"
                },
                "identity": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/invite": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "invite",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "invitation created"
          },
          "400": {
            "description": "invitation not created (already exists)",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/invite/token/generate": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "inviteTokenGenerate",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "tokens": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "invitation tokens created"
          },
          "400": {
            "description": "invitation tokens not created"
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/login": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "login",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "password": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "login successful",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "invalid login"
          }
        }
      }
    },
    "/members/{organizationToken}": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "listOrgMembers",
        "parameters": [
          {
            "type": "string",
            "name": "organizationToken",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "members": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "admin": {
                        "type": "boolean"
                      },
                      "email": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/memberships": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "listMemberships",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "memberships": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "admin": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "token": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/metrics/account": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "getAccountMetrics",
        "parameters": [
          {
            "type": "string",
            "name": "duration",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "account metrics",
            "schema": {
              "$ref": "#/definitions/metrics"
            }
          },
          "400": {
            "description": "bad request"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/metrics/environment/{envId}": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "getEnvironmentMetrics",
        "parameters": [
          {
            "type": "string",
            "name": "envId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "name": "duration",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "environment metrics",
            "schema": {
              "$ref": "#/definitions/metrics"
            }
          },
          "400": {
            "description": "bad request"
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/metrics/share/{shrToken}": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "getShareMetrics",
        "parameters": [
          {
            "type": "string",
            "name": "shrToken",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "name": "duration",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "share metrics",
            "schema": {
              "$ref": "#/definitions/metrics"
            }
          },
          "400": {
            "description": "bad request"
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/organization": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "createOrganization",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "description": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "organization created",
            "schema": {
              "properties": {
                "token": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        }
      },
      "delete": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "deleteOrganization",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "organization deleted"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "organization not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/organization/add": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "addOrganizationMember",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "admin": {
                  "type": "boolean"
                },
                "email": {
                  "type": "string"
                },
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "member added"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/organization/list": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "listOrganizationMembers",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "list organization members",
            "schema": {
              "properties": {
                "members": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "admin": {
                        "type": "boolean"
                      },
                      "email": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/organization/remove": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "removeOrganizationMember",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "member removed"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/organizations": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "listOrganizations",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "organizations": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "description": {
                        "type": "string"
                      },
                      "token": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/overview": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "overview",
        "responses": {
          "200": {
            "description": "overview returned",
            "schema": {
              "$ref": "#/definitions/overview"
            }
          },
          "500": {
            "description": "internal server error",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          }
        }
      }
    },
    "/overview/{organizationToken}/{accountEmail}": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "orgAccountOverview",
        "parameters": [
          {
            "type": "string",
            "name": "organizationToken",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "name": "accountEmail",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/overview"
            }
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/regenerateToken": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "account"
        ],
        "operationId": "regenerateToken",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "emailAddress": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "regenerate account token",
            "schema": {
              "properties": {
                "token": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "account not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/register": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "register",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "password": {
                  "type": "string"
                },
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "account created",
            "schema": {
              "properties": {
                "token": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "request not found"
          },
          "422": {
            "description": "password validation failure",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/resetPassword": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "resetPassword",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "password": {
                  "type": "string"
                },
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "password reset"
          },
          "404": {
            "description": "request not found"
          },
          "422": {
            "description": "password validation failure",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/resetPasswordRequest": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "resetPasswordRequest",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "emailAddress": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "forgot password request created"
          },
          "400": {
            "description": "forgot password request not created"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/share": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "share"
        ],
        "operationId": "share",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/shareRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "share created",
            "schema": {
              "$ref": "#/definitions/shareResponse"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "409": {
            "description": "conflict"
          },
          "422": {
            "description": "unprocessable"
          },
          "500": {
            "description": "internal server error",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "share"
        ],
        "operationId": "updateShare",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/updateShareRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "share updated"
          },
          "400": {
            "description": "bad request"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/sparklines": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "getSparklines",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "account": {
                  "type": "boolean"
                },
                "environments": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "shares": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "sparklines data",
            "schema": {
              "properties": {
                "sparklines": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/metrics"
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/unaccess": {
      "delete": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "share"
        ],
        "operationId": "unaccess",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/unaccessRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "access removed"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/unshare": {
      "delete": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "share"
        ],
        "operationId": "unshare",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/unshareRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "share removed"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          }
        }
      }
    },
    "/verify": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "verify",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "token ready",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "token not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/version": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "version",
        "responses": {
          "200": {
            "description": "current server version",
            "schema": {
              "$ref": "#/definitions/version"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "accessRequest": {
      "type": "object",
      "properties": {
        "envZId": {
          "type": "string"
        },
        "shrToken": {
          "type": "string"
        }
      }
    },
    "accessResponse": {
      "type": "object",
      "properties": {
        "backendMode": {
          "type": "string"
        },
        "frontendToken": {
          "type": "string"
        }
      }
    },
    "authUser": {
      "type": "object",
      "properties": {
        "password": {
          "type": "string"
        },
        "username": {
          "type": "string"
        }
      }
    },
    "configuration": {
      "type": "object",
      "properties": {
        "inviteTokenContact": {
          "type": "string"
        },
        "invitesOpen": {
          "type": "boolean"
        },
        "passwordRequirements": {
          "$ref": "#/definitions/passwordRequirements"
        },
        "requiresInviteToken": {
          "type": "boolean"
        },
        "touLink": {
          "type": "string"
        },
        "version": {
          "type": "string"
        }
      }
    },
    "disableRequest": {
      "type": "object",
      "properties": {
        "identity": {
          "type": "string"
        }
      }
    },
    "environment": {
      "type": "object",
      "properties": {
        "activity": {
          "$ref": "#/definitions/sparkData"
        },
        "address": {
          "type": "string"
        },
        "createdAt": {
          "type": "integer"
        },
        "description": {
          "type": "string"
        },
        "host": {
          "type": "string"
        },
        "limited": {
          "type": "boolean"
        },
        "updatedAt": {
          "type": "integer"
        },
        "zId": {
          "type": "string"
        }
      }
    },
    "environmentAndResources": {
      "type": "object",
      "properties": {
        "environment": {
          "$ref": "#/definitions/environment"
        },
        "frontends": {
          "$ref": "#/definitions/frontends"
        },
        "shares": {
          "$ref": "#/definitions/shares"
        }
      }
    },
    "environments": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/environment"
      }
    },
    "errorMessage": {
      "type": "string"
    },
    "frontend": {
      "type": "object",
      "properties": {
        "createdAt": {
          "type": "integer"
        },
        "id": {
          "type": "integer"
        },
        "shrToken": {
          "type": "string"
        },
        "token": {
          "type": "string"
        },
        "updatedAt": {
          "type": "integer"
        },
        "zId": {
          "type": "string"
        }
      }
    },
    "frontends": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/frontend"
      }
    },
    "metrics": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "period": {
          "type": "number"
        },
        "samples": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/metricsSample"
          }
        },
        "scope": {
          "type": "string"
        }
      }
    },
    "metricsSample": {
      "type": "object",
      "properties": {
        "rx": {
          "type": "number"
        },
        "timestamp": {
          "type": "number"
        },
        "tx": {
          "type": "number"
        }
      }
    },
    "overview": {
      "type": "object",
      "properties": {
        "accountLimited": {
          "type": "boolean"
        },
        "environments": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/environmentAndResources"
          }
        }
      }
    },
    "passwordRequirements": {
      "type": "object",
      "properties": {
        "length": {
          "type": "integer"
        },
        "requireCapital": {
          "type": "boolean"
        },
        "requireNumeric": {
          "type": "boolean"
        },
        "requireSpecial": {
          "type": "boolean"
        },
        "validSpecialCharacters": {
          "type": "string"
        }
      }
    },
    "principal": {
      "type": "object",
      "properties": {
        "admin": {
          "type": "boolean"
        },
        "email": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "limitless": {
          "type": "boolean"
        },
        "token": {
          "type": "string"
        }
      }
    },
    "share": {
      "type": "object",
      "properties": {
        "activity": {
          "$ref": "#/definitions/sparkData"
        },
        "backendMode": {
          "type": "string"
        },
        "backendProxyEndpoint": {
          "type": "string"
        },
        "createdAt": {
          "type": "integer"
        },
        "frontendEndpoint": {
          "type": "string"
        },
        "frontendSelection": {
          "type": "string"
        },
        "limited": {
          "type": "boolean"
        },
        "reserved": {
          "type": "boolean"
        },
        "shareMode": {
          "type": "string"
        },
        "token": {
          "type": "string"
        },
        "updatedAt": {
          "type": "integer"
        },
        "zId": {
          "type": "string"
        }
      }
    },
    "shareRequest": {
      "type": "object",
      "properties": {
        "accessGrants": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "authScheme": {
          "type": "string"
        },
        "authUsers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/authUser"
          }
        },
        "backendMode": {
          "type": "string",
          "enum": [
            "proxy",
            "web",
            "tcpTunnel",
            "udpTunnel",
            "caddy",
            "drive",
            "socks",
            "vpn"
          ]
        },
        "backendProxyEndpoint": {
          "type": "string"
        },
        "envZId": {
          "type": "string"
        },
        "frontendSelection": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "oauthAuthorizationCheckInterval": {
          "type": "string"
        },
        "oauthEmailDomains": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "oauthProvider": {
          "type": "string",
          "enum": [
            "github",
            "google"
          ]
        },
        "permissionMode": {
          "type": "string",
          "enum": [
            "open",
            "closed"
          ]
        },
        "reserved": {
          "type": "boolean"
        },
        "shareMode": {
          "type": "string",
          "enum": [
            "public",
            "private"
          ]
        },
        "uniqueName": {
          "type": "string"
        }
      }
    },
    "shareResponse": {
      "type": "object",
      "properties": {
        "frontendProxyEndpoints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "shrToken": {
          "type": "string"
        }
      }
    },
    "shares": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/share"
      }
    },
    "sparkData": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/sparkDataSample"
      }
    },
    "sparkDataSample": {
      "type": "object",
      "properties": {
        "rx": {
          "type": "number"
        },
        "tx": {
          "type": "number"
        }
      }
    },
    "unaccessRequest": {
      "type": "object",
      "properties": {
        "envZId": {
          "type": "string"
        },
        "frontendToken": {
          "type": "string"
        },
        "shrToken": {
          "type": "string"
        }
      }
    },
    "unshareRequest": {
      "type": "object",
      "properties": {
        "envZId": {
          "type": "string"
        },
        "reserved": {
          "type": "boolean"
        },
        "shrToken": {
          "type": "string"
        }
      }
    },
    "updateShareRequest": {
      "type": "object",
      "properties": {
        "addAccessGrants": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "backendProxyEndpoint": {
          "type": "string"
        },
        "removeAccessGrants": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "shrToken": {
          "type": "string"
        }
      }
    },
    "version": {
      "type": "string"
    }
  },
  "securityDefinitions": {
    "key": {
      "type": "apiKey",
      "name": "x-token",
      "in": "header"
    }
  }
}`))
	FlatSwaggerJSON = json.RawMessage([]byte(`{
  "consumes": [
    "application/zrok.v1+json"
  ],
  "produces": [
    "application/zrok.v1+json"
  ],
  "schemes": [
    "http"
  ],
  "swagger": "2.0",
  "info": {
    "description": "zrok client access",
    "title": "zrok",
    "version": "1.0.0"
  },
  "basePath": "/api/v1",
  "paths": {
    "/access": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "share"
        ],
        "operationId": "access",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/accessRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "access created",
            "schema": {
              "$ref": "#/definitions/accessResponse"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/account": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "createAccount",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "password": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "created",
            "schema": {
              "properties": {
                "token": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/changePassword": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "account"
        ],
        "operationId": "changePassword",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "newPassword": {
                  "type": "string"
                },
                "oldPassword": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "changed password"
          },
          "400": {
            "description": "password not changed"
          },
          "401": {
            "description": "unauthorized"
          },
          "422": {
            "description": "password validation failure",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/configuration": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "configuration",
        "responses": {
          "200": {
            "description": "current configuration",
            "schema": {
              "$ref": "#/definitions/configuration"
            }
          }
        }
      }
    },
    "/detail/account": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "getAccountDetail",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/environments"
            }
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/detail/environment/{envZId}": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "getEnvironmentDetail",
        "parameters": [
          {
            "type": "string",
            "name": "envZId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/environmentAndResources"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/detail/frontend/{feId}": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "getFrontendDetail",
        "parameters": [
          {
            "type": "integer",
            "name": "feId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/frontend"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/detail/share/{shrToken}": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "getShareDetail",
        "parameters": [
          {
            "type": "string",
            "name": "shrToken",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/share"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/disable": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "environment"
        ],
        "operationId": "disable",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/disableRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "environment disabled"
          },
          "401": {
            "description": "invalid environment"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/enable": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "environment"
        ],
        "operationId": "enable",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "description": {
                  "type": "string"
                },
                "host": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "environment enabled",
            "schema": {
              "properties": {
                "cfg": {
                  "type": "string"
                },
                "identity": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "account not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/frontend": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "createFrontend",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "permissionMode": {
                  "type": "string",
                  "enum": [
                    "open",
                    "closed"
                  ]
                },
                "public_name": {
                  "type": "string"
                },
                "url_template": {
                  "type": "string"
                },
                "zId": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "frontend created",
            "schema": {
              "type": "object",
              "properties": {
                "token": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "bad request"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      },
      "delete": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "deleteFrontend",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "frontendToken": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "frontend deleted"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      },
      "patch": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "updateFrontend",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "type": "object",
              "properties": {
                "frontendToken": {
                  "type": "string"
                },
                "publicName": {
                  "type": "string"
                },
                "urlTemplate": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "frontend updated"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/frontends": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "listFrontends",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ListFrontendsOKBodyItems0"
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/grants": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "grants",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/identity": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "createIdentity",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "name": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "created",
            "schema": {
              "properties": {
                "cfg": {
                  "type": "string"
                },
                "identity": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/invite": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "invite",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "invitation created"
          },
          "400": {
            "description": "invitation not created (already exists)",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/invite/token/generate": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "inviteTokenGenerate",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "tokens": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "invitation tokens created"
          },
          "400": {
            "description": "invitation tokens not created"
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/login": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "login",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "password": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "login successful",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "invalid login"
          }
        }
      }
    },
    "/members/{organizationToken}": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "listOrgMembers",
        "parameters": [
          {
            "type": "string",
            "name": "organizationToken",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "members": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/MembersItems0"
                  }
                }
              }
            }
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/memberships": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "listMemberships",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "memberships": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/MembershipsItems0"
                  }
                }
              }
            }
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/metrics/account": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "getAccountMetrics",
        "parameters": [
          {
            "type": "string",
            "name": "duration",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "account metrics",
            "schema": {
              "$ref": "#/definitions/metrics"
            }
          },
          "400": {
            "description": "bad request"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/metrics/environment/{envId}": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "getEnvironmentMetrics",
        "parameters": [
          {
            "type": "string",
            "name": "envId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "name": "duration",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "environment metrics",
            "schema": {
              "$ref": "#/definitions/metrics"
            }
          },
          "400": {
            "description": "bad request"
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/metrics/share/{shrToken}": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "getShareMetrics",
        "parameters": [
          {
            "type": "string",
            "name": "shrToken",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "name": "duration",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "share metrics",
            "schema": {
              "$ref": "#/definitions/metrics"
            }
          },
          "400": {
            "description": "bad request"
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/organization": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "createOrganization",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "description": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "organization created",
            "schema": {
              "properties": {
                "token": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        }
      },
      "delete": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "deleteOrganization",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "organization deleted"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "organization not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/organization/add": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "addOrganizationMember",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "admin": {
                  "type": "boolean"
                },
                "email": {
                  "type": "string"
                },
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "member added"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/organization/list": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "listOrganizationMembers",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "list organization members",
            "schema": {
              "properties": {
                "members": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/MembersItems0"
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/organization/remove": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "removeOrganizationMember",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "member removed"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/organizations": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "admin"
        ],
        "operationId": "listOrganizations",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "properties": {
                "organizations": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/OrganizationsItems0"
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/overview": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "overview",
        "responses": {
          "200": {
            "description": "overview returned",
            "schema": {
              "$ref": "#/definitions/overview"
            }
          },
          "500": {
            "description": "internal server error",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          }
        }
      }
    },
    "/overview/{organizationToken}/{accountEmail}": {
      "get": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "orgAccountOverview",
        "parameters": [
          {
            "type": "string",
            "name": "organizationToken",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "name": "accountEmail",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/overview"
            }
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/regenerateToken": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "account"
        ],
        "operationId": "regenerateToken",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "emailAddress": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "regenerate account token",
            "schema": {
              "properties": {
                "token": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "account not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/register": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "register",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "password": {
                  "type": "string"
                },
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "account created",
            "schema": {
              "properties": {
                "token": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "request not found"
          },
          "422": {
            "description": "password validation failure",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/resetPassword": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "resetPassword",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "password": {
                  "type": "string"
                },
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "password reset"
          },
          "404": {
            "description": "request not found"
          },
          "422": {
            "description": "password validation failure",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/resetPasswordRequest": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "resetPasswordRequest",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "emailAddress": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "forgot password request created"
          },
          "400": {
            "description": "forgot password request not created"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/share": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "share"
        ],
        "operationId": "share",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/shareRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "share created",
            "schema": {
              "$ref": "#/definitions/shareResponse"
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "409": {
            "description": "conflict"
          },
          "422": {
            "description": "unprocessable"
          },
          "500": {
            "description": "internal server error",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "share"
        ],
        "operationId": "updateShare",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/updateShareRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "share updated"
          },
          "400": {
            "description": "bad request"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/sparklines": {
      "post": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "metadata"
        ],
        "operationId": "getSparklines",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "account": {
                  "type": "boolean"
                },
                "environments": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "shares": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "sparklines data",
            "schema": {
              "properties": {
                "sparklines": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/metrics"
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/unaccess": {
      "delete": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "share"
        ],
        "operationId": "unaccess",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/unaccessRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "access removed"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/unshare": {
      "delete": {
        "security": [
          {
            "key": []
          }
        ],
        "tags": [
          "share"
        ],
        "operationId": "unshare",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/unshareRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "share removed"
          },
          "401": {
            "description": "unauthorized"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error",
            "schema": {
              "$ref": "#/definitions/errorMessage"
            }
          }
        }
      }
    },
    "/verify": {
      "post": {
        "tags": [
          "account"
        ],
        "operationId": "verify",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "properties": {
                "token": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "token ready",
            "schema": {
              "properties": {
                "email": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "token not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/version": {
      "get": {
        "tags": [
          "metadata"
        ],
        "operationId": "version",
        "responses": {
          "200": {
            "description": "current server version",
            "schema": {
              "$ref": "#/definitions/version"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "ListFrontendsOKBodyItems0": {
      "type": "object",
      "properties": {
        "createdAt": {
          "type": "integer"
        },
        "publicName": {
          "type": "string"
        },
        "token": {
          "type": "string"
        },
        "updatedAt": {
          "type": "integer"
        },
        "urlTemplate": {
          "type": "string"
        },
        "zId": {
          "type": "string"
        }
      }
    },
    "MembersItems0": {
      "properties": {
        "admin": {
          "type": "boolean"
        },
        "email": {
          "type": "string"
        }
      }
    },
    "MembershipsItems0": {
      "properties": {
        "admin": {
          "type": "boolean"
        },
        "description": {
          "type": "string"
        },
        "token": {
          "type": "string"
        }
      }
    },
    "OrganizationsItems0": {
      "properties": {
        "description": {
          "type": "string"
        },
        "token": {
          "type": "string"
        }
      }
    },
    "accessRequest": {
      "type": "object",
      "properties": {
        "envZId": {
          "type": "string"
        },
        "shrToken": {
          "type": "string"
        }
      }
    },
    "accessResponse": {
      "type": "object",
      "properties": {
        "backendMode": {
          "type": "string"
        },
        "frontendToken": {
          "type": "string"
        }
      }
    },
    "authUser": {
      "type": "object",
      "properties": {
        "password": {
          "type": "string"
        },
        "username": {
          "type": "string"
        }
      }
    },
    "configuration": {
      "type": "object",
      "properties": {
        "inviteTokenContact": {
          "type": "string"
        },
        "invitesOpen": {
          "type": "boolean"
        },
        "passwordRequirements": {
          "$ref": "#/definitions/passwordRequirements"
        },
        "requiresInviteToken": {
          "type": "boolean"
        },
        "touLink": {
          "type": "string"
        },
        "version": {
          "type": "string"
        }
      }
    },
    "disableRequest": {
      "type": "object",
      "properties": {
        "identity": {
          "type": "string"
        }
      }
    },
    "environment": {
      "type": "object",
      "properties": {
        "activity": {
          "$ref": "#/definitions/sparkData"
        },
        "address": {
          "type": "string"
        },
        "createdAt": {
          "type": "integer"
        },
        "description": {
          "type": "string"
        },
        "host": {
          "type": "string"
        },
        "limited": {
          "type": "boolean"
        },
        "updatedAt": {
          "type": "integer"
        },
        "zId": {
          "type": "string"
        }
      }
    },
    "environmentAndResources": {
      "type": "object",
      "properties": {
        "environment": {
          "$ref": "#/definitions/environment"
        },
        "frontends": {
          "$ref": "#/definitions/frontends"
        },
        "shares": {
          "$ref": "#/definitions/shares"
        }
      }
    },
    "environments": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/environment"
      }
    },
    "errorMessage": {
      "type": "string"
    },
    "frontend": {
      "type": "object",
      "properties": {
        "createdAt": {
          "type": "integer"
        },
        "id": {
          "type": "integer"
        },
        "shrToken": {
          "type": "string"
        },
        "token": {
          "type": "string"
        },
        "updatedAt": {
          "type": "integer"
        },
        "zId": {
          "type": "string"
        }
      }
    },
    "frontends": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/frontend"
      }
    },
    "metrics": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "period": {
          "type": "number"
        },
        "samples": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/metricsSample"
          }
        },
        "scope": {
          "type": "string"
        }
      }
    },
    "metricsSample": {
      "type": "object",
      "properties": {
        "rx": {
          "type": "number"
        },
        "timestamp": {
          "type": "number"
        },
        "tx": {
          "type": "number"
        }
      }
    },
    "overview": {
      "type": "object",
      "properties": {
        "accountLimited": {
          "type": "boolean"
        },
        "environments": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/environmentAndResources"
          }
        }
      }
    },
    "passwordRequirements": {
      "type": "object",
      "properties": {
        "length": {
          "type": "integer"
        },
        "requireCapital": {
          "type": "boolean"
        },
        "requireNumeric": {
          "type": "boolean"
        },
        "requireSpecial": {
          "type": "boolean"
        },
        "validSpecialCharacters": {
          "type": "string"
        }
      }
    },
    "principal": {
      "type": "object",
      "properties": {
        "admin": {
          "type": "boolean"
        },
        "email": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "limitless": {
          "type": "boolean"
        },
        "token": {
          "type": "string"
        }
      }
    },
    "share": {
      "type": "object",
      "properties": {
        "activity": {
          "$ref": "#/definitions/sparkData"
        },
        "backendMode": {
          "type": "string"
        },
        "backendProxyEndpoint": {
          "type": "string"
        },
        "createdAt": {
          "type": "integer"
        },
        "frontendEndpoint": {
          "type": "string"
        },
        "frontendSelection": {
          "type": "string"
        },
        "limited": {
          "type": "boolean"
        },
        "reserved": {
          "type": "boolean"
        },
        "shareMode": {
          "type": "string"
        },
        "token": {
          "type": "string"
        },
        "updatedAt": {
          "type": "integer"
        },
        "zId": {
          "type": "string"
        }
      }
    },
    "shareRequest": {
      "type": "object",
      "properties": {
        "accessGrants": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "authScheme": {
          "type": "string"
        },
        "authUsers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/authUser"
          }
        },
        "backendMode": {
          "type": "string",
          "enum": [
            "proxy",
            "web",
            "tcpTunnel",
            "udpTunnel",
            "caddy",
            "drive",
            "socks",
            "vpn"
          ]
        },
        "backendProxyEndpoint": {
          "type": "string"
        },
        "envZId": {
          "type": "string"
        },
        "frontendSelection": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "oauthAuthorizationCheckInterval": {
          "type": "string"
        },
        "oauthEmailDomains": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "oauthProvider": {
          "type": "string",
          "enum": [
            "github",
            "google"
          ]
        },
        "permissionMode": {
          "type": "string",
          "enum": [
            "open",
            "closed"
          ]
        },
        "reserved": {
          "type": "boolean"
        },
        "shareMode": {
          "type": "string",
          "enum": [
            "public",
            "private"
          ]
        },
        "uniqueName": {
          "type": "string"
        }
      }
    },
    "shareResponse": {
      "type": "object",
      "properties": {
        "frontendProxyEndpoints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "shrToken": {
          "type": "string"
        }
      }
    },
    "shares": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/share"
      }
    },
    "sparkData": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/sparkDataSample"
      }
    },
    "sparkDataSample": {
      "type": "object",
      "properties": {
        "rx": {
          "type": "number"
        },
        "tx": {
          "type": "number"
        }
      }
    },
    "unaccessRequest": {
      "type": "object",
      "properties": {
        "envZId": {
          "type": "string"
        },
        "frontendToken": {
          "type": "string"
        },
        "shrToken": {
          "type": "string"
        }
      }
    },
    "unshareRequest": {
      "type": "object",
      "properties": {
        "envZId": {
          "type": "string"
        },
        "reserved": {
          "type": "boolean"
        },
        "shrToken": {
          "type": "string"
        }
      }
    },
    "updateShareRequest": {
      "type": "object",
      "properties": {
        "addAccessGrants": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "backendProxyEndpoint": {
          "type": "string"
        },
        "removeAccessGrants": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "shrToken": {
          "type": "string"
        }
      }
    },
    "version": {
      "type": "string"
    }
  },
  "securityDefinitions": {
    "key": {
      "type": "apiKey",
      "name": "x-token",
      "in": "header"
    }
  }
}`))
}
