diff --git a/.gitignore b/.gitignore index 02c0b30..e94cbe7 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ # Python **/__pycache__ +**/.pytest_cache # Logs backend/pine/backend/logs diff --git a/README.md b/README.md index f5be26d..84e3e0f 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,20 @@ Once the dev stack is up and running, the following ports are accessible: 2. `./generate_documentation.sh` 3. Generated documentation can then be found in `./docs/build`. +### Backend OpenAPI Specification + +The backend API is documented using an [OpenAPI specification](https://swagger.io/specification/). +This specification covers the main REST API used by PINE. A copy of the +[Swagger UI](https://swagger.io/tools/swagger-ui/) is hosted at `http[s]:///api/ui` and +the specification itself is hosted at `http[s]:///api/openapi.yaml`. + +This specification is found in the source code at `backend/pine/backend/api/openapi.yaml`. +*NOTE* however that this file is autogenerated by the `./update_openapi.sh` script. The "base" +file is located at `backend/pine/backend/api/base.yaml` which then pulls in information from other +files. ALL changes to the backend API should result in updates to the specification, as it is *NOT* +automatically updated or generated based on code changes. The `./update_openapi.sh` script requires +Docker to run and standard Linux tools (find, grep, awk, sort) but no other dependencies. + ### Testing Data To import testing data, run the dev stack and then run: diff --git a/backend/pine/backend/admin/bp.py b/backend/pine/backend/admin/bp.py index 662ecd7..cc0d596 100644 --- a/backend/pine/backend/admin/bp.py +++ b/backend/pine/backend/admin/bp.py @@ -1,6 +1,6 @@ # (C) 2019 The Johns Hopkins University Applied Physics Laboratory LLC. -from flask import Blueprint, jsonify, request, Response +from flask import Blueprint, jsonify, request import requests from werkzeug import exceptions @@ -29,7 +29,7 @@ def get_user(user_id): """ return jsonify(users.get_user(user_id)) -@bp.route("/users//password", methods = ["POST", "PUT", "PATCH"]) +@bp.route("/users//password", methods = ["PUT"]) @auth.admin_required def update_user_password(user_id): """ @@ -48,7 +48,7 @@ def update_user_password(user_id): resp = service.put("users/" + user_id, json = user, headers = {"If-Match": etag}) return service.convert_response(resp) -@bp.route("/users/", methods = ["PUT", "PATCH"]) +@bp.route("/users/", methods = ["PUT"]) @auth.admin_required def update_user(user_id): """ @@ -98,7 +98,13 @@ def add_user(): body["_id"] = body["id"] del body["id"] - if body["description"] == None: + + # check other fields as required by eve schema + if not "firstname" in body or not body["firstname"] or "lastname" not in body or not body["lastname"]: + raise exceptions.BadRequest(description = "Missing firstname or lastname in body JSON data.") + if not "roles" in body or not body["roles"]: + raise exceptions.BadRequest(description = "Missing/empty roles in body JSON data.") + if "description" in body and body["description"] == None: del body["description"] # post to data server diff --git a/backend/pine/backend/admin/openapi.yaml b/backend/pine/backend/admin/openapi.yaml new file mode 100644 index 0000000..ef986c5 --- /dev/null +++ b/backend/pine/backend/admin/openapi.yaml @@ -0,0 +1,361 @@ +# (C) 2021 The Johns Hopkins University Applied Physics Laboratory LLC. + +openapi: "3.0.2" + +security: + - cookieAuth: [] + +tags: + - name: admin + description: > + Operations in the "admin" blueprint. These operations are generally only available when the + "eve" auth module is running and are only accessible to logged-in users that are + administrators. + +components: + + schemas: + + UserRoles: + description: The role (for permissions) of the user. + type: array + items: + type: string + enum: [administrator, user] + + NewUserData: + type: object + properties: + id: + type: string + email: + type: string + passwd: + type: string + description: + type: string + firstname: + type: string + lastname: + type: string + role: + $ref: "#/components/schemas/UserRoles" + required: + - id + - email + - passwd + - firstname + - lastname + - roles + + UpdateUserData: + type: object + properties: + _id: + type: string + _etag: + type: string + description: + type: string + firstname: + type: string + lastname: + type: string + email: + type: string + description: If this is not included, you wont be able to log in. + passwdhash: + type: string + description: Setting this manually might break the password. + role: + $ref: "#/components/schemas/UserRoles" + required: + - _id + - _etag + - firstname + - lastname + - passwdhash + - role + +paths: + + /admin/users: + get: + summary: Get All User Information + description: | + Get a list of all users (and details: id, email, password hash). + + Example: `curl -X GET http://localhost:5000/admin/users --cookie admin.cookie` + + _Note_: this endpoint requires the logged in user to be an admin and is only relevant if + the auth module supports it. + operationId: admin_get_users + tags: [admin] + responses: + "200": + description: Returned list of user details. + content: + application/json: + schema: + type: array + items: + $ref: "../api/components.yaml#/schemas/UserInfo" + "401": + $ref: "../api/components.yaml#/responses/NotAuthorizedOrNotAdmin" + default: + $ref: "../api/components.yaml#/responses/UnexpectedServerError" + + post: + summary: Create New User + description: | + Create a new user. + + Example: `curl -X Post http://localhost:5000/admin/users -d '{"id":"joe", "passwd":"mypass", "email":"joe@pine.jhuapl.edu", "description": "", "firstname":"joe", "lastname":"jones"}' -H "Content-type:application/json" --cookie admin.cookie` + + _Note_: this endpoint requires the logged in user to be an admin and is only relevant if + the auth module supports it. + operationId: admin_add_user + tags: [admin] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/NewUserData" + responses: + "200": + description: Return id info of newly created user. + content: + application/json: + schema: + type: array + items: + $ref: "../api/components.yaml#/schemas/IDInfo" + "400": + $ref: "../api/components.yaml#/responses/InvalidInputParameters" + "401": + $ref: "../api/components.yaml#/responses/NotAuthorizedOrNotAdmin" + "409": + description: User with that ID/email already exists. + content: {application/json: {schema: {$ref: "../api/components.yaml#/schemas/ErrorResponse"}}} + default: + $ref: "../api/components.yaml#/responses/UnexpectedServerError" + + /admin/users/{user_id}: + get: + summary: Get User Details + description: | + Get details (id, email, password hash...) of a certain user. + + Example: `curl -X GET http://localhost:5000/admin/users/ada --cookie admin.cookie` + + _Note_: this endpoint requires the logged in user to be an admin and is only relevant if + the auth module supports it. + operationId: admin_get_user + tags: [admin] + parameters: + - $ref: "../api/components.yaml#/parameters/userIdParam" + responses: + "200": + description: Successfully found the user and returned their details. + content: + application/json: + schema: + $ref: "../api/components.yaml#/schemas/UserInfo" + "401": + $ref: "../api/components.yaml#/responses/NotAuthorizedOrNotAdmin" + "404": + description: No user found with that ID. + default: + $ref: "../api/components.yaml#/responses/UnexpectedServerError" + + put: + summary: Update user details. + description: | + Update user details. + + Example: `curl -X PUT http://localhost:5000/admin/users/ada -d '{"_id":"ada","description":"newdesc", "firstname":"newada", "lastname":"adalast", "_etag":"1c12354ee74f5d5732231ac5034f7915fb167244", "email":"ada@pine.jhuapl.edu"}' -H "Content-type:application/json" --cookie admin.cookie` + + _Note_: this endpoint requires the logged in user to be an admin and is only relevant if + the auth module supports it. + operationId: admin_update_user + tags: [admin] + parameters: + - $ref: "../api/components.yaml#/parameters/userIdParam" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateUserData" + responses: + "200": + description: Successfully changed user information + content: + application/json: + schema: + $ref: "../api/components.yaml#/schemas/IDInfo" + "401": + $ref: "../api/components.yaml#/responses/NotAuthorizedOrNotAdmin" + "404": + description: No user found with that ID. + "412": + $ref: "../api/components.yaml#/responses/MismatchedEtag" + "422": + $ref: "../api/components.yaml#/responses/InvalidInputParameters" + default: + $ref: "../api/components.yaml#/responses/UnexpectedServerError" + + delete: + summary: Delete User + description: | + Delete a user. + + _Note_: this endpoint requires the logged in user to be an admin and is only relevant if + the auth module supports it. + operationId: admin_delete_user + tags: [admin] + parameters: + - $ref: "../api/components.yaml#/parameters/userIdParam" + responses: + "204": + description: Successfully deleted user. + "401": + $ref: "../api/components.yaml#/responses/NotAuthorizedOrNotAdmin" + "404": + description: No user found with that ID. + default: + $ref: "../api/components.yaml#/responses/UnexpectedServerError" + + /admin/users/{user_id}/password: + put: + summary: Update User Password + description: | + Update the password of a user. + + Example: `curl -X post http://localhost:5000/admin/users/ada/password -d '{"passwd":"newpass"}' -H "Content-type:application/json" --cookie admin.cookie` + + _Note_: this endpoint requires the logged in user to be an admin and is only relevant if + the auth module supports it. + operationId: admin_update_user_password + tags: [admin] + parameters: + - $ref: "../api/components.yaml#/parameters/userIdParam" + requestBody: + content: + application/json: + schema: + type: object + properties: + passwd: + type: string + required: + - passwd + responses: + "200": + description: "Successfully changed user password" + content: + application/json: + schema: + $ref: "../api/components.yaml#/schemas/IDInfo" + "401": + $ref: "../api/components.yaml#/responses/NotAuthorizedOrNotAdmin" + "404": + description: No user found with that ID. + default: + $ref: "../api/components.yaml#/responses/UnexpectedServerError" + + /admin/system/export: + get: + summary: Export Database + description: | + Export the database to a zip file. + + Example: `curl -X GET http://localhost:5000/admin/system/export --cookie admin.cookie -v --output out.zip` + + _Note_: this endpoint requires the logged in user to be an admin and is only relevant if + the auth module supports it. + operationId: admin_system_export + tags: [admin] + responses: + "200": + description: "Successfully exported database" + content: + application/gzip: {} + "401": + $ref: "../api/components.yaml#/responses/NotAuthorizedOrNotAdmin" + default: + $ref: "../api/components.yaml#/responses/UnexpectedServerError" + + /admin/system/import: + put: + summary: Import Database (Update) + description: | + Import the database given in request body. This will _update_ and not _replace_ the + database. + + Example: `curl -X PUT http://localhost:5000/admin/system/import --cookie admin.cookie -F "file=@/home/pine/out.zip"` + + _Note_: this endpoint requires the logged in user to be an admin and is only relevant if + the auth module supports it. + operationId: admin_system_import_put + tags: [admin] + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + file: + type: string + format: binary + required: + - file + responses: + "200": + $ref: "../api/components.yaml#/responses/Success" + "400": + description: The loading of data was wrong. Should be a gz, like what is exported. + content: {application/json: {schema: {$ref: "../api/components.yaml#/schemas/ErrorResponse"}}} + "401": + $ref: "../api/components.yaml#/responses/NotAuthorizedOrNotAdmin" + "422": + description: The file argument was not present. + content: {application/json: {schema: {$ref: "../api/components.yaml#/schemas/ErrorResponse"}}} + default: + $ref: "../api/components.yaml#/responses/UnexpectedServerError" + + post: + summary: Import Database (Replace) + description: | + Import the database given in request body. This will _replace_ and not _update_ the + database. + + Example: `curl -X POST http://localhost:5000/admin/system/import --cookie admin.cookie -F "file=@/home/pine/out.zip"` + + _Note_: this endpoint requires the logged in user to be an admin and is only relevant if + the auth module supports it. + operationId: admin_system_import_post + tags: [admin] + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + file: + type: string + format: binary + required: + - file + responses: + "200": + $ref: "../api/components.yaml#/responses/Success" + "400": + description: The loading of data was wrong. Should be a gz, like what is exported. + content: {application/json: {schema: {$ref: "../api/components.yaml#/schemas/ErrorResponse"}}} + "401": + $ref: "../api/components.yaml#/responses/NotAuthorizedOrNotAdmin" + "422": + description: The file argument was not present. + content: {application/json: {schema: {$ref: "../api/components.yaml#/schemas/ErrorResponse"}}} + default: + $ref: "../api/components.yaml#/responses/UnexpectedServerError" diff --git a/backend/pine/backend/annotations/bp.py b/backend/pine/backend/annotations/bp.py index c9cf820..950bff6 100644 --- a/backend/pine/backend/annotations/bp.py +++ b/backend/pine/backend/annotations/bp.py @@ -204,7 +204,7 @@ def _add_or_update_annotation(new_annotation): return new_annotation["_id"] -@bp.route("/mine/by_document_id/", methods = ["POST", "PUT"]) +@bp.route("/mine/by_document_id/", methods = ["POST"]) def save_annotations(doc_id): """ Save new NER annotations and labels to the database as an entry for the logged in user, for the document. If there @@ -254,7 +254,7 @@ def save_annotations(doc_id): return jsonify(resp) -@bp.route("/mine/by_collection_id/", methods = ["POST", "PUT"]) +@bp.route("/mine/by_collection_id/", methods = ["POST"]) def save_collection_annotations(collection_id: str): # If you change input or output, update client modules pine.client.models and pine.client.client collection = service.get_item_by_id("collections", collection_id, params=service.params({ @@ -277,6 +277,9 @@ def save_collection_annotations(collection_id: str): skip_document_updates = json.loads(request.args.get("skip_document_updates", "false")) update_iaa = json.loads(request.args.get("update_iaa", "true")) + # Batch mode should only be used when all documents being annotated haven't been + # annotated before, otherwise eve's versioning will be messed up. + batch_mode = json.loads(request.args.get("batch_mode", "true")) # make sure all the documents actually belong to that collection collection_ids = list(documents.get_collection_ids_for(doc_annotations.keys())) @@ -284,7 +287,6 @@ def save_collection_annotations(collection_id: str): raise exceptions.Unauthorized() user_id = auth.get_logged_in_user()["id"] - # first try batch mode new_annotations = [] for (doc_id, body) in doc_annotations.items(): (doc_labels, ner_annotations) = _make_annotations(body) @@ -295,24 +297,35 @@ def save_collection_annotations(collection_id: str): "document_id": doc_id, "annotation": doc_labels + ner_annotations }) - resp = service.post("annotations", json=new_annotations) - if resp.ok: - for (i, created_annotation) in enumerate(resp.json()["_items"]): - new_annotations[i]["_id"] = created_annotation["_id"] - if not skip_document_updates: - set_document_to_annotated_by_user(new_annotations[i]["document_id"], - new_annotations[i]["creator_id"]) - log.access_flask_annotate_documents(new_annotations) - if update_iaa: - success = pineiaa.update_iaa_report_by_collection_id(collection_id) - if not success: - logger.error("Unable to update IAA report but will not return an error") - return jsonify([annotation["_id"] for annotation in new_annotations]) + + if batch_mode: + # first try batch mode (should only be done if the document doesn't have annotations already) + resp = service.post("annotations", json=new_annotations) + if resp.ok: + resp_json = resp.json() + # Changing a single document will not have _items + if "_items" in resp_json: + for (i, created_annotation) in enumerate(resp_json["_items"]): + new_annotations[i]["_id"] = created_annotation["_id"] + if not skip_document_updates: + set_document_to_annotated_by_user(new_annotations[i]["document_id"], + new_annotations[i]["creator_id"]) + else: + new_annotations[0]["_id"] = resp_json["_id"] + if not skip_document_updates: + set_document_to_annotated_by_user(new_annotations[0]["document_id"], + new_annotations[0]["creator_id"]) + log.access_flask_annotate_documents(new_annotations) + if update_iaa: + success = pineiaa.update_iaa_report_by_collection_id(collection_id) + if not success: + logger.error("Unable to update IAA report but will not return an error") + return jsonify([annotation["_id"] for annotation in new_annotations]) # fall back on individual mode added_ids = [] for annotation in new_annotations: - added_id = _add_or_update_annotation(annotation["document_id"], user_id, annotation) + added_id = _add_or_update_annotation(annotation) if added_id: added_ids.append(added_id) if update_iaa: diff --git a/backend/pine/backend/annotations/openapi.yaml b/backend/pine/backend/annotations/openapi.yaml new file mode 100644 index 0000000..f2eb309 --- /dev/null +++ b/backend/pine/backend/annotations/openapi.yaml @@ -0,0 +1,211 @@ +# (C) 2021 The Johns Hopkins University Applied Physics Laboratory LLC. + +openapi: "3.0.2" + +security: + - cookieAuth: [] + +tags: + - name: annotations + description: Operations in the "annotations" blueprint. + +components: + + schemas: + + WrappedAnnotations: + type: object + properties: + _items: + type: array + items: + $ref: "../api/components.yaml#/schemas/UserDocumentAnnotation" + _links: + $ref: "../api/components.yaml#/schemas/EveLinks" + +paths: + + /annotations/mine/by_document_id/{doc_id}: + get: + summary: Get My Document Annotations + description: | + Get a list of annotations done by the logged in user on a document. + + Example: `curl -X GET http://localhost:5000/annotations/mine/by_document_id/60d08052f2cb44c51e0af0f1 --cookie session.cookie` + operationId: annotations_get_mine + tags: [annotations] + parameters: + - $ref: "../api/components.yaml#/parameters/docIdParam" + responses: + "200": + description: Successfully found document and got annotations. + content: + application/json: + schema: + $ref: "#/components/schemas/WrappedAnnotations" + "401": + $ref: "../api/components.yaml#/responses/NotAuthorized" + "404": + $ref: "../api/components.yaml#/responses/DocumentNotFound" + default: + $ref: "../api/components.yaml#/responses/UnexpectedServerError" + + post: + summary: Save My Annotations + description: | + Change annotations of a document. + + Example: `curl -X PUT http://localhost:5000/annotations/mine/by_document_id/60d08052f2cb44c51e0af0f1 --cookie session.cookie -H "Content-type: application/json" -d '{"doc":["sci.crypt", "talk.politics.misc"],"ner":[{"end":365,"start":346, "label":"sci.med"}, {"start":475, "end":530, "label":"alt.atheism"}]}'` + + _Note_: start or end indices in the middle of words might make the UI not show the label. + Also, invalid labels are not checked and might cause the UI to freeze. + operationId: annotations_save_mine + tags: [annotations] + parameters: + - $ref: "../api/components.yaml#/parameters/docIdParam" + - name: update_iaa + in: query + required: false + description: Whether to also update IAA reports. + schema: + type: boolean + default: true + requestBody: + description: The labels to add to the document. + required: true + content: + application/json: + schema: + $ref: "../api/components.yaml#/schemas/DocumentAnnotations" + responses: + "200": + description: Successfully found document and changed annotations (returns doc_id). + content: + application/json: + schema: + type: string + "400": + $ref: "../api/components.yaml#/responses/InvalidInputParameters" + "401": + $ref: "../api/components.yaml#/responses/NotAuthorized" + "404": + $ref: "../api/components.yaml#/responses/DocumentNotFound" + default: + $ref: "../api/components.yaml#/responses/UnexpectedServerError" + + /annotations/mine/by_collection_id/{collection_id}: + post: + summary: Set Collection Annotations + description: | + Modify annotations of certain documents in a given collection. + + Example: `curl -X POST http://localhost:5000/annotations/mine/by_collection_id/60d32ba28d34cf656fed503f --cookie session.cookie -H "Content-type: application/json" -d '{"60d32ba48d34cf656fed504b": {"doc":["sci.crypt", "talk.politics.misc"],"ner":[[0,4,"sci.med"], [0,4,"alt.atheism"]]}, "60d32ba48d34cf656fed504c": {"doc":[], "ner":[[0,4,"sci.med"]]}}'` + operationId: annotations_collection + tags: [annotations] + parameters: + - $ref: "../api/components.yaml#/parameters/collectionIdParam" + - name: batch_mode + required: true + description: | + Whether or not to send all annotations to the database as one batch or individually. + + _Note_: Batch mode should ONLY be used if all of the documents have not already been annotated. + + The versioning of eve will be messed up if batch mode annotates a document with pre-existing annotations (even if old). + + To be clear, even if a document had annotations that were deleted, using batch mode on that document will cause problems. + + Conversely, using individual mode (batch_mode = False) can always be done, but will be slower. + + Another issue with individual mode is with many documents, there will be many backend queries, possibly getting rate limited. + schema: + type: boolean + default: true + in: query + - name: update_iaa + in: query + required: false + description: Whether to also update IAA reports. + schema: + type: boolean + default: true + requestBody: + description: The labels to add to the document. + required: true + content: + application/json: + schema: + description: Mapping from document ID to annotations object. + type: object + additionalProperties: + $ref: "../api/components.yaml#/schemas/DocumentAnnotations" + example: + {"60d47b4bdbfddb3ca87c7971": {"doc": ["label1", "label2"], + "ner": [[0, 10, "label1"], [15, 18, "label2"]]}} + responses: + "200": + description: Successfully found document and changed annotations (returns annotation ids). + content: + application/json: + schema: + type: array + items: + type: string + "400": + $ref: "../api/components.yaml#/responses/InvalidInputParameters" + "401": + $ref: "../api/components.yaml#/responses/NotAuthorized" + "404": + $ref: "../api/components.yaml#/responses/CollectionNotFound" + default: + $ref: "../api/components.yaml#/responses/UnexpectedServerError" + + /annotations/others/by_document_id/{doc_id}: + get: + summary: Get Others' Document Annotations + description: | + Get a list of annotations done by everyone but me on a document. + + Example: `curl -X GET http://localhost:5000/annotations/others/by_document_id/60d08052f2cb44c51e0af0f1 --cookie session.cookie` + operationId: annotations_others + tags: [annotations] + parameters: + - $ref: "../api/components.yaml#/parameters/docIdParam" + responses: + "200": + description: Successfully found document and got annotations. + content: + application/json: + schema: + $ref: "#/components/schemas/WrappedAnnotations" + "401": + $ref: "../api/components.yaml#/responses/NotAuthorized" + "404": + $ref: "../api/components.yaml#/responses/DocumentNotFound" + default: + $ref: "../api/components.yaml#/responses/UnexpectedServerError" + + /annotations/by_document_id/{doc_id}: + get: + summary: Get All Document Annotations + description: | + Get a list of annotations done by everyone on a document. + + Example: `curl -X GET http://localhost:5000/annotations/by_document_id/60d08052f2cb44c51e0af0f1 --cookie session.cookie` + operationId: annotations_all + tags: [annotations] + parameters: + - $ref: "../api/components.yaml#/parameters/docIdParam" + responses: + "200": + description: Successfully found document and got annotations. + content: + application/json: + schema: + $ref: "#/components/schemas/WrappedAnnotations" + "401": + $ref: "../api/components.yaml#/responses/NotAuthorized" + "404": + $ref: "../api/components.yaml#/responses/DocumentNotFound" + default: + $ref: "../api/components.yaml#/responses/UnexpectedServerError" diff --git a/backend/pine/backend/api/.gitignore b/backend/pine/backend/api/.gitignore new file mode 100644 index 0000000..08677c1 --- /dev/null +++ b/backend/pine/backend/api/.gitignore @@ -0,0 +1,3 @@ +# (C) 2019 The Johns Hopkins University Applied Physics Laboratory LLC. + +*.tar.gz diff --git a/backend/pine/backend/api/__init__.py b/backend/pine/backend/api/__init__.py new file mode 100644 index 0000000..79dbc53 --- /dev/null +++ b/backend/pine/backend/api/__init__.py @@ -0,0 +1,4 @@ +# (C) 2019 The Johns Hopkins University Applied Physics Laboratory LLC. + +"""This module implements all methods required for SwaggerUI to run on the +backend of PINE.""" diff --git a/backend/pine/backend/api/base.yaml b/backend/pine/backend/api/base.yaml new file mode 100644 index 0000000..223187e --- /dev/null +++ b/backend/pine/backend/api/base.yaml @@ -0,0 +1,34 @@ +# (C) 2021 The Johns Hopkins University Applied Physics Laboratory LLC. + +openapi: "3.0.2" + +info: + title: "PINE" + description: | + PINE: Pmap Interface for Nlp Experimentation + + PINE is a Natural Language Processing (NLP) tool designed for integration with the + Precision Medicine Analytics Platform (PMAP), developed at the Johns Hopkins University Applied + Physics Laboratory (JHU/APL). + + PINE consists of a web UI along with backing services. + version: "1.0.1" + contact: + name: "Michael Harrity" + email: "Michael.Harrity@jhuapl.edu" + license: + name: "AGPL-3.0" + url: https://github.com/JHUAPL/PINE/blob/master/LICENSE + +servers: + - url: http://localhost:5000 + - url: https://localhost:8888/api + - url: https://dev-nlpannotator.pm.jh.edu/api + +paths: {} + +components: + securitySchemes: + cookieAuth: + $ref: "./components.yaml#/securitySchemes/cookieAuth" + schemas: {} diff --git a/backend/pine/backend/api/bp.py b/backend/pine/backend/api/bp.py new file mode 100644 index 0000000..a622c0d --- /dev/null +++ b/backend/pine/backend/api/bp.py @@ -0,0 +1,34 @@ +# (C) 2019 The Johns Hopkins University Applied Physics Laboratory LLC. + +import logging + +from flask import redirect, render_template, request, send_file, url_for, Blueprint + +bp = Blueprint("api", __name__, url_prefix = "/api", template_folder="swagger-ui") +LOGGER = logging.getLogger(__name__) + +# Return the openapi specification for SwaggerUI +@bp.route("/openapi.yaml", methods=["GET"]) +def openapi_spec(): + # Specify statically where the openapi file is, relative path + return send_file("api/openapi.yaml", mimetype='text/yaml', as_attachment=False) + +@bp.route("/ui", methods=["GET"], strict_slashes=False) +def swagger_ui_index(): + # forward to /api/ui/index.html, taking proxy prefix into account if set + url = request.headers.get("X-Forwarded-Prefix", "") + url_for("api.swagger_ui", file="index.html") + LOGGER.info("Redirecting to {}".format(url)) + return redirect(url) + +@bp.route("/ui/", methods=["GET"]) +def swagger_ui(file: str): + if file == "index.html": + # get url for /api/openapi.yaml, taking proxy prefix into account if set + url = request.headers.get("X-Forwarded-Prefix", "") + url_for("api.openapi_spec") + LOGGER.info("Grabbing spec from {}".format(url)) + return render_template("index.html", spec_url=url) + else: + return send_file("api/swagger-ui/{}".format(file)) + +def init_app(app): + app.register_blueprint(bp) diff --git a/backend/pine/backend/api/components.yaml b/backend/pine/backend/api/components.yaml new file mode 100644 index 0000000..f691da4 --- /dev/null +++ b/backend/pine/backend/api/components.yaml @@ -0,0 +1,611 @@ +# (C) 2021 The Johns Hopkins University Applied Physics Laboratory LLC. + +securitySchemes: + + cookieAuth: + description: | + This an example command to provision and print the session key using eve: + + `curl -X POST -H "Content-Type:application/json" -d '{"username":"ada@pine.jhuapl.edu","password":"ada@pine.jhuapl.edu"}' http://localhost:5000/auth/login --cookie-jar - --output /dev/null --silent | grep -o -P "session\s.+" | sed -e 's/session\s/session=/' -` + type: apiKey + in: cookie + name: session + +parameters: + + userIdParam: + name: user_id + in: path + required: true + description: ID of the user on which to operate. + schema: + type: string + + docIdParam: + name: doc_id + in: path + required: true + description: The id of the document on which to operate. + schema: + type: string + + collectionIdParam: + name: collection_id + in: path + required: true + description: The id of the collection on which to operate. + schema: + type: string + + pipelineIdParam: + name: pipeline_id + in: path + required: true + description: The id of the pipeline on which to operate. + schema: + type: string + + classifierIdParam: + name: classifier_id + in: path + required: true + description: The id of the classifier on which to operate. + schema: + type: string + +schemas: + + DocumentAnnotations: + type: object + properties: + doc: + description: Document-level annotations. + type: array + items: + description: Annotation label. + type: string + ner: + description: NER annotations. + type: array + items: + type: object + properties: + start: + description: Start index, inclusive. + type: integer + end: + description: End index, exclusive. + type: integer + label: + description: Annotation label. + type: string + example: + doc: ["label1", "label2"] + ner: [{"start":0, "end":10, "label":"in-text-label"}] + + AuthUser: + type: object + properties: + display_name: + type: string + id: + type: string + is_admin: + type: boolean + username: + type: string + example: + display_name: Ada Lovelace + id: ada + is_admin: false + username: ada@pine.jhuapl.edu + + AuthUserDetails: + type: object + properties: + description: + type: string + first_name: + type: string + last_name: + type: string + example: + first_name: Ada + last_name: Lovelace + description: The first computer programmer. + + EveLinks: + type: object + properties: + parent: + type: object + properties: + title: + type: string + href: + type: string + self: + type: object + properties: + title: + type: string + href: + type: string + + EveBase: + type: object + properties: + _etag: + type: string + + EveBaseWithVersion: + allOf: + - $ref: "#/schemas/EveBase" + - type: object + properties: + _version: + type: integer + _latest_version: + type: integer + + Document: + type: object + properties: + _id: + type: string + creator_id: + type: string + collection_id: + type: string + overlap: + type: integer + format: int64 + metadata: + type: object + # This means accept any type for key/val + additionalProperties: {} + text: + type: string + has_annotated: + type: object + additionalProperties: + type: boolean + + DocumentDeletionResponse: + type: object + properties: + success: + type: boolean + description: Whether the operation was successful. + changed_objs: + type: object + description: What database objects were changed during operation. + properties: + next_instances: + type: object + properties: + updated: + description: IDs of next_instance objects that were updated. + type: array + items: + type: string + annotations: + type: object + properties: + deleted: + description: IDs of annotation objects that were deleted. + type: array + items: + type: string + documents: + type: object + properties: + deleted: + description: IDs of document objects that were deleted. + type: array + items: + type: string + + UserDocumentAnnotation: + description: > + This is the log of annotations by a specific user. A document might have 0, 1, or multiple of + these based on how many users annotated. + allOf: + - $ref: "#/schemas/EveBaseWithVersion" + - type: object + properties: + _id: + type: string + creator_id: + type: string + collection_id: + type: string + document_id: + type: string + annotation: + type: array + items: + anyOf: + - type: string + example: documentlabel + description: String for labels on the entire document. + - type: array + items: + anyOf: + - type: string + - type: integer + example: + [1, 2, "textlabel"] + description: Array for individual annotations [start_index, end_index, label] + + Collection: + type: object + properties: + _id: + type: string + creator_id: + type: string + metadata: + type: object + additionalProperties: {} + configuration: + type: object + additionalProperties: {} + labels: + type: array + items: + type: string + viewers: + type: array + items: + type: string + annotators: + type: array + items: + type: string + archived: + type: boolean + + CollectionDownload: + description: Collection download is Collection with a list of all docs inside (and no eve info) + type: object + properties: + _id: + type: string + creator_id: + type: string + metadata: + type: object + additionalProperties: {} + configuration: + type: object + additionalProperties: {} + labels: + type: array + items: + type: string + viewers: + type: array + items: + type: string + annotators: + type: array + items: + type: string + archived: + type: boolean + documents: + type: array + items: + $ref: '#/components/schemas/Document' + + UserPermissions: + type: object + properties: + add_documents: + type: boolean + add_images: + type: boolean + annotate: + type: boolean + archive: + type: boolean + download_data: + type: boolean + modify_document_metadata: + type: boolean + modify_labels: + type: boolean + modify_users: + type: boolean + view: + type: boolean + + UserInfo: + type: object + properties: + _id: + type: string + _created: + type: string + description: + type: string + email: + type: string + firstname: + type: string + lastname: + type: string + passwdhash: + type: string + role: + type: array + items: + type: string + + IDInfo: + description: > + This object is returned when doing actions like modifying a document or collection. It + contains the ID of the object and some other information from the database. + allOf: + - $ref: "#/schemas/EveBase" + - type: object + properties: + _status: + type: string + _id: + type: string + _updated: + type: string + format: date-time + _created: + type: string + format: date-time + _links: + $ref: "#/schemas/EveLinks" + + ErrorResponse: + description: Error message from the server. + type: string + example: Error message from the server. + + Pipeline: + allOf: + - $ref: "#/schemas/EveBase" + - type: object + properties: + _id: + type: string + title: + type: string + description: + type: string + name: + type: string + parameters: + type: object + additionalProperties: {} + example: + cutoff: "integer" + iterations: " integer" + n_iter: "integer" + dropout: "float" + max_left: "integer" + use_class_feature: [true, false] + use_word: [true, false] + use_ngrams: [true, false] + no_mid_ngrams: [true, false] + max_ngram_length: "integer" + use_prev: [true, false] + use_next: [true, false] + use_disjunctive: [true, false] + use_sequences: [true, false] + use_prev_sequences: [true, false] + use_type_seqs: [true, false] + use_type_seqs2: [true, false] + use_type_y_sequences: [true, false] + _updated: + type: string + format: date-time + _created: + type: string + format: date-time + + CollectionMetric: + type: object + properties: + _id: + type: string + collection_id: + type: string + classifier_id: + type: string + # Not positive what elements can be in these array so leaving blank + documents: + type: array + items: {} + annotations: + type: array + items: {} + folds: + type: array + items: {} + metrics: + type: array + items: {} + _updated: + type: string + _created: + type: string + _version: + type: integer + _etag: + type: string + _links: + type: object + properties: + self: + type: object + properties: + title: + type: string + href: + type: string + + InterAnnotatorAgreement: + allOf: + - $ref: "#/schemas/EveBaseWithVersion" + - type: object + properties: + _id: + type: string + collection_id: + type: string + num_of_annotators: + type: integer + num_of_agreement_docs: + type: integer + num_of_labels: + type: integer + per_doc_agreement: + type: object + properties: + doc_id: + type: string + avg: + type: number + format: double + stddev: + type: integer + per_label_agreement: + type: array + items: + type: object + properties: + label: + type: string + avg: + type: number + format: double + stddev: + type: integer + overall_agreement: + type: object + properties: + mean: + type: number + format: double + sd: + type: integer + heatmap_data: + type: object + properties: + matrix: + type: array + items: + type: array + items: + type: number + format: float + minItems: 2 + maxItems: 2 + example: + [1, .666666] + annotators: + type: array + items: + type: string + example: + ["ada", "margaret"] + labels_per_annotator: + # Dictionary of dictionaries per annotator + type: object + additionalProperties: + # Dictionary of number of each label + type: object + additionalProperties: + type: integer + example: + {"ada": {"label1": 1, "label2": 4}, "margaret": {"label1": 3, "label2": 2}} + _updated: + type: string + format: date-time + _created: + type: string + format: date-time + +responses: + + Success: + description: Whether the operation succeeded or failed. + content: + application/json: + schema: + type: object + properties: + success: + type: boolean + + NotAuthorized: + description: > + Authentication failed: not logged in or user doesn't have the permissions for this operation. + content: + application/json: + schema: + $ref: "#/schemas/ErrorResponse" + + NotAuthorizedOrNotAdmin: + description: Authentication failed, not logged in or not an admin. + content: + application/json: + schema: + $ref: "#/schemas/ErrorResponse" + + InvalidInputParameters: + description: Input parameters are missing/invalid. + content: + application/json: + schema: + $ref: "#/schemas/ErrorResponse" + + DocumentNotFound: + description: Document with given ID was not found. + content: + application/json: + schema: + $ref: "#/schemas/ErrorResponse" + + CollectionNotFound: + description: Collection with given ID was not found. + content: + application/json: + schema: + $ref: "#/schemas/ErrorResponse" + + PipelineNotFound: + description: Pipeline with given ID was not found. + content: + application/json: + schema: + $ref: "#/schemas/ErrorResponse" + + ClassifierNotFound: + description: Classifier with given ID was not found. + content: + application/json: + schema: + $ref: "#/schemas/ErrorResponse" + + MismatchedEtag: + description: Given etag did not match the most updated stored one. + content: + application/json: + schema: + $ref: "#/schemas/ErrorResponse" + + UnexpectedServerError: + description: Unexpected error, check server logs. + content: + application/json: + schema: + $ref: "#/schemas/ErrorResponse" diff --git a/backend/pine/backend/api/download_swagger_ui.sh b/backend/pine/backend/api/download_swagger_ui.sh new file mode 100755 index 0000000..4258aec --- /dev/null +++ b/backend/pine/backend/api/download_swagger_ui.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# (C) 2019 The Johns Hopkins University Applied Physics Laboratory LLC. + +set -ex + +if [[ $# -eq 0 ]]; then + VERSION=$(curl --silent "https://api.github.com/repos/swagger-api/swagger-ui/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') + if [[ ${VERSION} = v* ]]; then + VERSION=${VERSION:1} + fi +else + VERSION="$1" +fi + +if [[ ! -f swagger-ui-${VERSION}.tar.gz ]]; then + wget "https://github.com/swagger-api/swagger-ui/archive/refs/tags/v${VERSION}.tar.gz" -O swagger-ui-${VERSION}.tar.gz +fi + +rm -rf swagger-ui/ +tar xzf swagger-ui-${VERSION}.tar.gz swagger-ui-${VERSION}/dist/ --transform "s|swagger-ui-${VERSION}/dist|swagger-ui|" +sed -i 's|https://petstore.swagger.io/v2/swagger.json|{{spec_url}}|' swagger-ui/index.html +echo ${VERSION} > swagger-ui/VERSION diff --git a/backend/pine/backend/api/openapi.yaml b/backend/pine/backend/api/openapi.yaml new file mode 100644 index 0000000..eb15cdc --- /dev/null +++ b/backend/pine/backend/api/openapi.yaml @@ -0,0 +1,4325 @@ +# (C) 2021 The Johns Hopkins University Applied Physics Laboratory LLC. + +openapi: 3.0.2 +info: + title: PINE + description: > + PINE: Pmap Interface for Nlp Experimentation + + + PINE is a Natural Language Processing (NLP) tool designed for integration + with the + + Precision Medicine Analytics Platform (PMAP), developed at the Johns Hopkins + University Applied + + Physics Laboratory (JHU/APL). + + + PINE consists of a web UI along with backing services. + version: 1.0.1 + contact: + name: Michael Harrity + email: Michael.Harrity@jhuapl.edu + license: + name: AGPL-3.0 + url: 'https://github.com/JHUAPL/PINE/blob/master/LICENSE' +servers: + - url: 'http://localhost:5000' + - url: 'https://localhost:8888/api' + - url: 'https://dev-nlpannotator.pm.jh.edu/api' +paths: + /admin/users: + get: + summary: Get All User Information + description: > + Get a list of all users (and details: id, email, password hash). + + + Example: `curl -X GET http://localhost:5000/admin/users --cookie + admin.cookie` + + + _Note_: this endpoint requires the logged in user to be an admin and is + only relevant if + + the auth module supports it. + operationId: admin_get_users + tags: + - admin + responses: + '200': + description: Returned list of user details. + content: + application/json: + schema: + type: array + items: + type: object + properties: &ref_2 + _id: + type: string + _created: + type: string + description: + type: string + email: + type: string + firstname: + type: string + lastname: + type: string + passwdhash: + type: string + role: + type: array + items: + type: string + '401': + description: 'Authentication failed, not logged in or not an admin.' + content: &ref_0 + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + default: + description: 'Unexpected error, check server logs.' + content: &ref_1 + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + security: + - cookieAuth: [] + post: + summary: Create New User + description: > + Create a new user. + + + Example: `curl -X Post http://localhost:5000/admin/users -d + '{"id":"joe", "passwd":"mypass", "email":"joe@pine.jhuapl.edu", + "description": "", "firstname":"joe", "lastname":"jones"}' -H + "Content-type:application/json" --cookie admin.cookie` + + + _Note_: this endpoint requires the logged in user to be an admin and is + only relevant if + + the auth module supports it. + operationId: admin_add_user + tags: + - admin + requestBody: + content: + application/json: + schema: + type: object + properties: &ref_40 + id: + type: string + email: + type: string + passwd: + type: string + description: + type: string + firstname: + type: string + lastname: + type: string + role: + description: The role (for permissions) of the user. + type: array + items: &ref_4 + type: string + enum: + - administrator + - user + required: &ref_41 + - id + - email + - passwd + - firstname + - lastname + - roles + responses: + '200': + description: Return id info of newly created user. + content: + application/json: + schema: + type: array + items: + description: > + This object is returned when doing actions like modifying a + document or collection. It contains the ID of the object + and some other information from the database. + allOf: &ref_5 + - type: object + properties: &ref_8 + _etag: + type: string + - type: object + properties: + _status: + type: string + _id: + type: string + _updated: + type: string + format: date-time + _created: + type: string + format: date-time + _links: + type: object + properties: &ref_9 + parent: + type: object + properties: + title: + type: string + href: + type: string + self: + type: object + properties: + title: + type: string + href: + type: string + '400': + description: Input parameters are missing/invalid. + content: &ref_6 + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + '401': + description: 'Authentication failed, not logged in or not an admin.' + content: *ref_0 + '409': + description: User with that ID/email already exists. + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/admin/users/{user_id}': + get: + summary: Get User Details + description: > + Get details (id, email, password hash...) of a certain user. + + + Example: `curl -X GET http://localhost:5000/admin/users/ada --cookie + admin.cookie` + + + _Note_: this endpoint requires the logged in user to be an admin and is + only relevant if + + the auth module supports it. + operationId: admin_get_user + tags: + - admin + parameters: + - name: user_id + in: path + required: true + description: ID of the user on which to operate. + schema: &ref_3 + type: string + responses: + '200': + description: Successfully found the user and returned their details. + content: + application/json: + schema: + type: object + properties: *ref_2 + '401': + description: 'Authentication failed, not logged in or not an admin.' + content: *ref_0 + '404': + description: No user found with that ID. + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + put: + summary: Update user details. + description: > + Update user details. + + + Example: `curl -X PUT http://localhost:5000/admin/users/ada -d + '{"_id":"ada","description":"newdesc", "firstname":"newada", + "lastname":"adalast", + "_etag":"1c12354ee74f5d5732231ac5034f7915fb167244", + "email":"ada@pine.jhuapl.edu"}' -H "Content-type:application/json" + --cookie admin.cookie` + + + _Note_: this endpoint requires the logged in user to be an admin and is + only relevant if + + the auth module supports it. + operationId: admin_update_user + tags: + - admin + parameters: + - name: user_id + in: path + required: true + description: ID of the user on which to operate. + schema: *ref_3 + requestBody: + content: + application/json: + schema: + type: object + properties: &ref_42 + _id: + type: string + _etag: + type: string + description: + type: string + firstname: + type: string + lastname: + type: string + email: + type: string + description: 'If this is not included, you wont be able to log in.' + passwdhash: + type: string + description: Setting this manually might break the password. + role: + description: The role (for permissions) of the user. + type: array + items: *ref_4 + required: &ref_43 + - _id + - _etag + - firstname + - lastname + - passwdhash + - role + responses: + '200': + description: Successfully changed user information + content: + application/json: + schema: + description: > + This object is returned when doing actions like modifying a + document or collection. It contains the ID of the object and + some other information from the database. + allOf: *ref_5 + '401': + description: 'Authentication failed, not logged in or not an admin.' + content: *ref_0 + '404': + description: No user found with that ID. + '412': + description: Given etag did not match the most updated stored one. + content: &ref_57 + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + '422': + description: Input parameters are missing/invalid. + content: *ref_6 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + delete: + summary: Delete User + description: > + Delete a user. + + + _Note_: this endpoint requires the logged in user to be an admin and is + only relevant if + + the auth module supports it. + operationId: admin_delete_user + tags: + - admin + parameters: + - name: user_id + in: path + required: true + description: ID of the user on which to operate. + schema: *ref_3 + responses: + '204': + description: Successfully deleted user. + '401': + description: 'Authentication failed, not logged in or not an admin.' + content: *ref_0 + '404': + description: No user found with that ID. + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/admin/users/{user_id}/password': + put: + summary: Update User Password + description: > + Update the password of a user. + + + Example: `curl -X post http://localhost:5000/admin/users/ada/password -d + '{"passwd":"newpass"}' -H "Content-type:application/json" --cookie + admin.cookie` + + + _Note_: this endpoint requires the logged in user to be an admin and is + only relevant if + + the auth module supports it. + operationId: admin_update_user_password + tags: + - admin + parameters: + - name: user_id + in: path + required: true + description: ID of the user on which to operate. + schema: *ref_3 + requestBody: + content: + application/json: + schema: + type: object + properties: + passwd: + type: string + required: + - passwd + responses: + '200': + description: Successfully changed user password + content: + application/json: + schema: + description: > + This object is returned when doing actions like modifying a + document or collection. It contains the ID of the object and + some other information from the database. + allOf: *ref_5 + '401': + description: 'Authentication failed, not logged in or not an admin.' + content: *ref_0 + '404': + description: No user found with that ID. + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + /admin/system/export: + get: + summary: Export Database + description: > + Export the database to a zip file. + + + Example: `curl -X GET http://localhost:5000/admin/system/export --cookie + admin.cookie -v --output out.zip` + + + _Note_: this endpoint requires the logged in user to be an admin and is + only relevant if + + the auth module supports it. + operationId: admin_system_export + tags: + - admin + responses: + '200': + description: Successfully exported database + content: + application/gzip: {} + '401': + description: 'Authentication failed, not logged in or not an admin.' + content: *ref_0 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + /admin/system/import: + put: + summary: Import Database (Update) + description: > + Import the database given in request body. This will _update_ and not + _replace_ the + + database. + + + Example: `curl -X PUT http://localhost:5000/admin/system/import --cookie + admin.cookie -F "file=@/home/pine/out.zip"` + + + _Note_: this endpoint requires the logged in user to be an admin and is + only relevant if + + the auth module supports it. + operationId: admin_system_import_put + tags: + - admin + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + file: + type: string + format: binary + required: + - file + responses: + '200': + description: Whether the operation succeeded or failed. + content: &ref_7 + application/json: + schema: + type: object + properties: + success: + type: boolean + '400': + description: >- + The loading of data was wrong. Should be a gz, like what is + exported. + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + '401': + description: 'Authentication failed, not logged in or not an admin.' + content: *ref_0 + '422': + description: The file argument was not present. + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + post: + summary: Import Database (Replace) + description: > + Import the database given in request body. This will _replace_ and not + _update_ the + + database. + + + Example: `curl -X POST http://localhost:5000/admin/system/import + --cookie admin.cookie -F "file=@/home/pine/out.zip"` + + + _Note_: this endpoint requires the logged in user to be an admin and is + only relevant if + + the auth module supports it. + operationId: admin_system_import_post + tags: + - admin + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + file: + type: string + format: binary + required: + - file + responses: + '200': + description: Whether the operation succeeded or failed. + content: *ref_7 + '400': + description: >- + The loading of data was wrong. Should be a gz, like what is + exported. + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + '401': + description: 'Authentication failed, not logged in or not an admin.' + content: *ref_0 + '422': + description: The file argument was not present. + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/annotations/mine/by_document_id/{doc_id}': + get: + summary: Get My Document Annotations + description: > + Get a list of annotations done by the logged in user on a document. + + + Example: `curl -X GET + http://localhost:5000/annotations/mine/by_document_id/60d08052f2cb44c51e0af0f1 + --cookie session.cookie` + operationId: annotations_get_mine + tags: + - annotations + parameters: + - name: doc_id + in: path + required: true + description: The id of the document on which to operate. + schema: &ref_10 + type: string + responses: + '200': + description: Successfully found document and got annotations. + content: + application/json: + schema: + type: object + properties: &ref_15 + _items: + type: array + items: + description: > + This is the log of annotations by a specific user. A + document might have 0, 1, or multiple of these based on + how many users annotated. + allOf: &ref_55 + - allOf: &ref_30 + - type: object + properties: *ref_8 + - type: object + properties: + _version: + type: integer + _latest_version: + type: integer + - type: object + properties: + _id: + type: string + creator_id: + type: string + collection_id: + type: string + document_id: + type: string + annotation: + type: array + items: + anyOf: + - type: string + example: documentlabel + description: String for labels on the entire document. + - type: array + items: + anyOf: + - type: string + - type: integer + example: + - 1 + - 2 + - textlabel + description: >- + Array for individual annotations + [start_index, end_index, label] + _links: + type: object + properties: *ref_9 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: &ref_11 + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + '404': + description: Document with given ID was not found. + content: &ref_12 + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + post: + summary: Save My Annotations + description: > + Change annotations of a document. + + + Example: `curl -X PUT + http://localhost:5000/annotations/mine/by_document_id/60d08052f2cb44c51e0af0f1 + --cookie session.cookie -H "Content-type: application/json" -d + '{"doc":["sci.crypt", + "talk.politics.misc"],"ner":[{"end":365,"start":346, "label":"sci.med"}, + {"start":475, "end":530, "label":"alt.atheism"}]}'` + + + _Note_: start or end indices in the middle of words might make the UI + not show the label. + + Also, invalid labels are not checked and might cause the UI to freeze. + operationId: annotations_save_mine + tags: + - annotations + parameters: + - name: doc_id + in: path + required: true + description: The id of the document on which to operate. + schema: *ref_10 + - name: update_iaa + in: query + required: false + description: Whether to also update IAA reports. + schema: + type: boolean + default: true + requestBody: + description: The labels to add to the document. + required: true + content: + application/json: + schema: + type: object + properties: &ref_13 + doc: + description: Document-level annotations. + type: array + items: + description: Annotation label. + type: string + ner: + description: NER annotations. + type: array + items: + type: object + properties: + start: + description: 'Start index, inclusive.' + type: integer + end: + description: 'End index, exclusive.' + type: integer + label: + description: Annotation label. + type: string + example: &ref_14 + doc: + - label1 + - label2 + ner: + - start: 0 + end: 10 + label: in-text-label + responses: + '200': + description: >- + Successfully found document and changed annotations (returns + doc_id). + content: + application/json: + schema: + type: string + '400': + description: Input parameters are missing/invalid. + content: *ref_6 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Document with given ID was not found. + content: *ref_12 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/annotations/mine/by_collection_id/{collection_id}': + post: + summary: Set Collection Annotations + description: > + Modify annotations of certain documents in a given collection. + + + Example: `curl -X POST + http://localhost:5000/annotations/mine/by_collection_id/60d32ba28d34cf656fed503f + --cookie session.cookie -H "Content-type: application/json" -d + '{"60d32ba48d34cf656fed504b": {"doc":["sci.crypt", + "talk.politics.misc"],"ner":[[0,4,"sci.med"], [0,4,"alt.atheism"]]}, + "60d32ba48d34cf656fed504c": {"doc":[], "ner":[[0,4,"sci.med"]]}}'` + operationId: annotations_collection + tags: + - annotations + parameters: + - name: collection_id + in: path + required: true + description: The id of the collection on which to operate. + schema: &ref_21 + type: string + - name: batch_mode + required: true + description: > + Whether or not to send all annotations to the database as one batch + or individually. + + + _Note_: Batch mode should ONLY be used if all of the documents have + not already been annotated. + + + The versioning of eve will be messed up if batch mode annotates a + document with pre-existing annotations (even if old). + + + To be clear, even if a document had annotations that were deleted, + using batch mode on that document will cause problems. + + + Conversely, using individual mode (batch_mode = False) can always be + done, but will be slower. + + + Another issue with individual mode is with many documents, there + will be many backend queries, possibly getting rate limited. + schema: + type: boolean + default: true + in: query + - name: update_iaa + in: query + required: false + description: Whether to also update IAA reports. + schema: + type: boolean + default: true + requestBody: + description: The labels to add to the document. + required: true + content: + application/json: + schema: + description: Mapping from document ID to annotations object. + type: object + additionalProperties: + type: object + properties: *ref_13 + example: *ref_14 + example: + 60d47b4bdbfddb3ca87c7971: + doc: + - label1 + - label2 + ner: + - - 0 + - 10 + - label1 + - - 15 + - 18 + - label2 + responses: + '200': + description: >- + Successfully found document and changed annotations (returns + annotation ids). + content: + application/json: + schema: + type: array + items: + type: string + '400': + description: Input parameters are missing/invalid. + content: *ref_6 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Collection with given ID was not found. + content: &ref_23 + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/annotations/others/by_document_id/{doc_id}': + get: + summary: Get Others' Document Annotations + description: > + Get a list of annotations done by everyone but me on a document. + + + Example: `curl -X GET + http://localhost:5000/annotations/others/by_document_id/60d08052f2cb44c51e0af0f1 + --cookie session.cookie` + operationId: annotations_others + tags: + - annotations + parameters: + - name: doc_id + in: path + required: true + description: The id of the document on which to operate. + schema: *ref_10 + responses: + '200': + description: Successfully found document and got annotations. + content: + application/json: + schema: + type: object + properties: *ref_15 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Document with given ID was not found. + content: *ref_12 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/annotations/by_document_id/{doc_id}': + get: + summary: Get All Document Annotations + description: > + Get a list of annotations done by everyone on a document. + + + Example: `curl -X GET + http://localhost:5000/annotations/by_document_id/60d08052f2cb44c51e0af0f1 + --cookie session.cookie` + operationId: annotations_all + tags: + - annotations + parameters: + - name: doc_id + in: path + required: true + description: The id of the document on which to operate. + schema: *ref_10 + responses: + '200': + description: Successfully found document and got annotations. + content: + application/json: + schema: + type: object + properties: *ref_15 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Document with given ID was not found. + content: *ref_12 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + /auth/module: + get: + summary: Get Auth Module + description: | + Get the current auth module being used (vegas or eve). + + Example: `curl -X GET http://localhost:5000/auth/module` + operationId: auth_get_module + tags: + - auth + responses: + '200': + description: Successfully got the auth module. + content: + application/json: + schema: + type: string + enum: + - eve + - vegas + /auth/flat: + get: + summary: Get Auth Is Flat + description: > + Return true if the current auth module is flat. + + + "Flat" auth means, generally, there are no administrators and + permissions are generally on + + the same "level". Collection-level permissions for viewing/annotating + still apply, however. + + + Example: `curl -X GET http://localhost:5000/auth/flat` + operationId: auth_get_flat + tags: + - auth + responses: + '200': + description: Successfully return a boolean if the auth module was flat. + content: + application/json: + schema: + type: boolean + /auth/can_manage_users: + get: + summary: Get Auth Can Manage Users + description: > + Return true if the current auth module supports managing users. + + + If `true`, the auth module can change, add, and delete users. If + `false`, users are managed + + by an external system. + + + Example: `curl -X GET http://localhost:5000/auth/flat` + operationId: auth_get_manage + tags: + - auth + responses: + '200': + description: >- + Successfully return a boolean if the auth module supports managing + users. + content: + application/json: + schema: + type: boolean + /auth/logged_in_user: + get: + summary: Get Logged In User + description: > + Get the currently logged in user (checks based on the session - need the + session cookie sent). + + If there is no user logged, in `null` is returned. + + + Example: `curl -X GET http://localhost:5000/auth/logged_in_user --cookie + session.cookie` + operationId: auth_logged_in_user + tags: + - auth + responses: + '200': + description: >- + Successfully returned the logged in user (or null if no session + cookie). + content: + application/json: + schema: + oneOf: + - type: string + nullable: true + default: null + - type: object + properties: &ref_18 + display_name: + type: string + id: + type: string + is_admin: + type: boolean + username: + type: string + example: &ref_19 + display_name: Ada Lovelace + id: ada + is_admin: false + username: ada@pine.jhuapl.edu + /auth/logged_in_user_details: + get: + summary: Get Logged In User Details + description: > + Get the currently logged in user's details. + + + Example: `curl -X GET http://localhost:5000/auth/logged_in_user_details + --cookie session.cookie` + operationId: auth_user_details + security: + - cookieAuth: [] + tags: + - auth + responses: + '200': + description: Successfully returned the logged in user details. + content: + application/json: + schema: + type: object + properties: &ref_16 + description: + type: string + first_name: + type: string + last_name: + type: string + example: &ref_17 + first_name: Ada + last_name: Lovelace + description: The first computer programmer. + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + post: + summary: Update Logged In User Details with Eve + description: | + Updates the user details for the logged in user. + + _Note_: this endpoint is only exposed if using "eve" auth module. + operationId: auth_eve_update_user_details + security: + - cookieAuth: [] + tags: + - auth_eve + requestBody: + content: + application/json: + schema: + type: object + properties: *ref_16 + example: *ref_17 + responses: + '200': + description: Successfully updated user details. + content: + application/json: + schema: + type: boolean + '400': + description: Input parameters are missing/invalid. + content: *ref_6 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + /auth/login_form: + get: + summary: Get the login form. + description: > + For auth modules that use a form to login, this endpoint will return the + information needed + + to present that form to the user and send back the necessary info in a + subsequent login + + call. + + + Example: `curl -X GET http://localhost:5000/auth/login_form` + operationId: auth_login_form + tags: + - auth + responses: + '200': + description: Successfully returned the login form. + content: + application/json: + schema: + description: Information needed to display a login form. + type: object + properties: &ref_44 + button_text: + description: Text to set in the login button. + type: string + fields: + description: Form fields to use. + type: array + items: + type: object + properties: + display: + description: Display name. + type: string + name: + description: Form name. + type: string + type: + description: Form type. + type: string + example: &ref_45 + button_text: Login + fields: + - display: Username or email + name: username + type: text + - display: Password + name: password + type: password + /auth/logout: + post: + summary: Logout + description: > + Logout of the current session. + + + Example: `curl -X POST http://localhost:5000/auth/logout --cookie + session.cookie` + operationId: auth_logout + tags: + - auth + security: + - cookieAuth: [] + responses: + '200': + description: Successfully logged out. + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + /auth/login: + post: + summary: Login User + description: > + Logs in user. How this works depends on the auth module used. + + + For eve: this takes a request body consisting of the login form data. + + + For vegas: this takes in no parameters and returns the URL the caller + should redirect to. + operationId: auth_login + tags: + - auth_eve + - auth_vegas + parameters: + - name: return_to + in: query + required: false + description: 'For vegas auth only, a URL to return to after auth flow.' + schema: + type: string + format: url + requestBody: + required: false + content: + application/json: + schema: + description: Only for eve login. + type: object + properties: &ref_46 + username: + type: string + password: + type: string + responses: + '200': + description: > + For eve: successfully logged in, returns user information. + + + For vegas: starts auth flow and returns the URL that the caller + should redirect to. + content: + application/json: + schema: + oneOf: + - type: object + properties: *ref_18 + example: *ref_19 + - type: string + format: url + '400': + description: Input parameters are missing/invalid. + content: *ref_6 + '401': + description: >- + Given user doesn't exist, password isn't set, or password doesn't + match. + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + /auth/users: + get: + summary: Get Eve Users + description: | + Gets all users that are registered with eve. + + _Note_: this endpoint is only exposed if using "eve" auth module. + operationId: auth_eve_users + tags: + - auth_eve + security: + - cookieAuth: [] + responses: + '200': + description: Returns all users. + content: + application/json: + schema: + type: array + items: + type: object + properties: *ref_18 + example: *ref_19 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + /auth/logged_in_user_password: + post: + summary: Update Eve User Password + description: | + Updates the password of the currently logged in eve user. + + _Note_: this endpoint is only exposed if using "eve" auth module. + operationId: auth_eve_update_password + tags: + - auth_eve + security: + - cookieAuth: [] + requestBody: + content: + application/json: + schema: + type: object + properties: &ref_47 + current_password: + type: string + new_password: + type: string + responses: + '200': + description: Successfully changed password. + content: + application/json: + schema: + type: boolean + '400': + description: Input parameters are missing/invalid. + content: *ref_6 + '401': + description: 'Not logged in, or current password doesn''t match.' + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + /auth/authorize: + get: + summary: Authorize From Fragment + description: > + Part of the OAuth flow, this will authorize based on passed-in query + parameters. + + + _Note_: this endpoint is only exposed if using "vegas" auth module. + operationId: auth_vegas_authorize_get + tags: + - auth_vegas + parameters: + - name: fragment + in: query + required: true + description: OAuth flow fragment. + schema: + type: string + responses: + '200': + description: 'Successfully logged in, returns user information.' + content: + application/json: + schema: + type: object + properties: *ref_18 + example: *ref_19 + '400': + description: 'Fragment is not valid, or parsed token is not valid.' + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + post: + summary: Authorize From Token + description: > + Authorize diretly based on an obtained vegas token, outside the normal + OAuth flow. + + This is meant to make it easy to authenticate using vegas and then use + this API outside of + + the web UI. + + + _Note_: this endpoint is only exposed if using "vegas" auth module. + operationId: auth_vegas_authorize_post + tags: + - auth_vegas + requestBody: + description: Token obtained from Vegas. + required: true + content: + application/json: + schema: + description: An auth token obtained by Vegas out-of-band from PINE. + type: object + properties: &ref_48 + auth_token: + type: string + token_type: + type: string + additionalProperties: &ref_49 {} + responses: + '200': + description: 'Successfully logged in, returns user information.' + content: + application/json: + schema: + type: object + properties: *ref_18 + example: *ref_19 + '400': + description: Token is not valid. + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + /collections/unarchived: + get: + summary: Get Unarchived Collections + description: > + Get all unarchived collections for logged in user. + + + Example: `curl http://localhost:5000/collections/unarchived --cookie + session.cookie` + operationId: collections_get_unarchived_all + tags: + - collections + responses: + '200': + description: Successfully retrieved relevant collections. + content: + application/json: + schema: + type: object + properties: &ref_20 + _items: + type: array + items: + type: object + properties: &ref_22 + _id: + type: string + creator_id: + type: string + metadata: + type: object + additionalProperties: {} + configuration: + type: object + additionalProperties: {} + labels: + type: array + items: + type: string + viewers: + type: array + items: + type: string + annotators: + type: array + items: + type: string + archived: + type: boolean + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/collections/unarchived/{page}': + get: + summary: Get Paginated Unarchived Collections + description: > + Get unarchived user collections (either all or a certain page). + + + Example: `curl http://localhost:5000/collections/unarchived --cookie + session.cookie` + operationId: collections_get_unarchived_paginated + tags: + - collections + parameters: + - name: page + in: path + required: true + description: > + Optional page number for specifying which collections. "all" for + all pages or a page number. + schema: + oneOf: + - type: string + default: all + - type: integer + responses: + '200': + description: Successfully retrieved relevant collections. + content: + application/json: + schema: + type: object + properties: *ref_20 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + /collections/archived: + get: + summary: Get Archived Collections + description: > + Get all archived user collections. + + + Example: `curl http://localhost:5000/collections/archived --cookie + session.cookie` + operationId: collections_get_archived_all + tags: + - collections + responses: + '200': + description: Successfully retrieved relevant collections. + content: + application/json: + schema: + type: object + properties: *ref_20 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/collections/archived/{page}': + get: + summary: Get Paginated Archived Collections + description: > + Get archived user collections (either all or a certain page). + + + Example: `curl http://localhost:5000/collections/archived --cookie + session.cookie` + operationId: collections_get_archived_paginated + tags: + - collections + parameters: + - name: page + in: path + required: true + description: > + Optional page number for specifying which collections. "all" for + all pages or a page number. + schema: + oneOf: + - type: string + default: all + - type: integer + responses: + '200': + description: Successfully retrieved relevant collections. + content: + application/json: + schema: + type: object + properties: *ref_20 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/collections/archive/{collection_id}': + put: + summary: Archive Collection + description: > + Archive a collection with a certain ID. + + + Example: `curl -X PUT + http://localhost:5000/collections/archive/60c7b7375b72bf4ed6523bf0 + --cookie session.cookie` + operationId: collections_archive + tags: + - collections + parameters: + - name: collection_id + in: path + required: true + description: The id of the collection on which to operate. + schema: *ref_21 + responses: + '200': + description: Successfully archived the chosen collection. + content: + application/json: + schema: + type: object + properties: *ref_22 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Collection with given ID was not found. + content: *ref_23 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/collections/unarchive/{collection_id}': + put: + summary: Unarchive Collection + description: > + Unarchive a collection with a certain ID. + + + Example: `curl -X PUT + http://localhost:5000/collections/unarchive/60c7b7375b72bf4ed6523bf0 + --cookie session.cookie` + operationId: collections_unarchive + tags: + - collections + parameters: + - name: collection_id + in: path + required: true + description: The id of the collection on which to operate. + schema: *ref_21 + responses: + '200': + description: Successfully unarchived the chosen collection. + content: + application/json: + schema: + type: object + properties: *ref_22 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Collection with given ID was not found. + content: *ref_23 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/collections/by_id/{collection_id}': + get: + summary: Get Collection + description: > + Retrieve a collection by its ID. + + + Example: `curl -X GET + http://localhost:5000/collections/by_id/60c7b7375b72bf4ed6523bf0 + --cookie session.cookie` + operationId: collections_get + tags: + - collections + parameters: + - name: collection_id + in: path + required: true + description: The id of the collection on which to operate. + schema: *ref_21 + responses: + '200': + description: Successfully found and rerieved the chosen collection. + content: + application/json: + schema: + type: object + properties: *ref_22 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Collection with given ID was not found. + content: *ref_23 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/collections/by_id/{collection_id}/download': + get: + summary: Download Collection Data + description: > + Download a collection's data by its ID. + + + Example: `curl -X GET + http://localhost:5000/collections/by_id/60c7b7375b72bf4ed6523bf0/download + --cookie session.cookie` + operationId: collections_download + tags: + - collections + parameters: + - name: collection_id + in: path + required: true + description: The id of the collection on which to operate. + schema: *ref_21 + responses: + '200': + description: Successfully found and downloaded the chosen collection. + content: + application/json: + schema: + type: object + properties: *ref_22 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Collection with given ID was not found. + content: *ref_23 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/collections/add_annotator/{collection_id}': + post: + summary: Add Collection Annotator + description: > + Add an annotator by user_id to a specific collection. + + + Example: `curl --cookie session.cookie -X POST + "http://localhost:5000/collections/add_annotator/60c7453d5b72bf4ed65239e9" + -F 'user_id="\"bob\""'` + + + Notice the quotes around the user_id value, NEEDS to be like that to + include the "" in the + + request session.cookie is a file containing: "Set-cookie: + session=.eJy...(rest of cookie)". + operationId: collections_add_annotator + tags: + - collections + parameters: + - name: collection_id + in: path + required: true + description: The id of the collection on which to operate. + schema: *ref_21 + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + user_id: + type: string + description: > + Note: You must put double quotation marks (`""`) around the + user_id for the backend to parse it correctly as it is a + JSON string. For example, enter `"ada"` instead of just + `ada`. + required: + - user_id + responses: + '200': + description: Successfully added the user as an annotator to the collection. + content: + application/json: + schema: + description: > + This object is returned when doing actions like modifying a + document or collection. It contains the ID of the object and + some other information from the database. + allOf: *ref_5 + '400': + description: 'Request malformed, probably missisng user_id arg.' + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Collection with given ID was not found. + content: *ref_23 + '409': + description: Specified user is already an annotator. + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + '500': + description: Internal server error - the form data was probably malformed. + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + security: + - cookieAuth: [] + '/collections/add_viewer/{collection_id}': + post: + summary: Add Collection Viewer + description: > + Add a viewer by user_id to a specific collection. + + + Example: `curl --cookie session.cookie -X POST + "http://localhost:5000/collections/add_viewer/60c7453d5b72bf4ed65239e9" + -F 'user_id="\"bob\""'` + + + Notice the quotes around the user_id value, NEEDS to be like that to + include the "" in the + + request. session.cookie is a file containing: "Set-cookie: + session=.eJy...(rest of cookie)" + operationId: addViewerToCollection + tags: + - collections + parameters: + - name: collection_id + in: path + required: true + description: The id of the collection on which to operate. + schema: *ref_21 + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + user_id: + type: string + description: >- + Note: You must put double quotation marks ("") around the + user_id for the backend to parse it correctly. + + + Ex: enter "ada" instead of just ada + required: + - user_id + responses: + '200': + description: Successfully added the user as a viewer to the collection. + content: + application/json: + schema: + description: > + This object is returned when doing actions like modifying a + document or collection. It contains the ID of the object and + some other information from the database. + allOf: *ref_5 + '400': + description: 'Request malformed, probably missisng user_id arg.' + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Collection with given ID was not found. + content: *ref_23 + '409': + description: Specified user is already an viewer. + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + '500': + description: Internal server error - the form data was probably malformed. + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + security: + - cookieAuth: [] + '/collections/add_label/{collection_id}': + post: + summary: Add Collection Label + description: > + Add a label to a specific collection. + + + Example: `curl --cookie session.cookie -X POST + "http://localhost:5000/collections/add_label/60c7453d5b72bf4ed65239e9" + -F 'new_label="\"testlabel\""'` + + + Notice the quotes around the new_label value, NEEDS to be like that to + include the "" in the + + request. session.cookie is a file containing: "Set-cookie: + session=.eJy...(rest of cookie)" + operationId: collections_add_label + tags: + - collections + parameters: + - name: collection_id + in: path + required: true + description: The id of the collection on which to operate. + schema: *ref_21 + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + new_label: + type: string + description: > + Note: You must put double quotation marks (`""`) around the + new_label for the backend to parse it correctly. Ex: enter + `"MyLabel"` instead of just `MyLabel` + required: + - new_label + responses: + '200': + description: Successfully added the label to the collection. + content: + application/json: + schema: + description: > + This object is returned when doing actions like modifying a + document or collection. It contains the ID of the object and + some other information from the database. + allOf: *ref_5 + '400': + description: 'Request malformed, probably missisng new_label arg.' + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Collection with given ID was not found. + content: *ref_23 + '409': + description: Specified label is already in collection. + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + '500': + description: Internal server error - the form data was probably malformed. + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + security: + - cookieAuth: [] + /collections: + post: + summary: Create Collection + description: > + Create a new collection. + + + Example: `curl --cookie session.cookie -X POST + "http://localhost:5000/collections" -F 'collection={"creator_id":"ada", + "annotators":["ada"], "labels":["label1", + "labellll"],"metadata":{"title":"newcoll11","subject":null,"description":"describe + blahblah"}}' -F 'overlap="\".9\""' -F 'train_every="\"100\""' -F + 'pipelineId="\"5babb6ee4eb7dd2c39b9671d\""'` + + + Notice the quotes around some value, NEEDS to be like that to include + the "" in the request + + to be parsed as a JSON string. session.cookie is a file containing: + + "Set-cookie: session=.eJy...(rest of cookie)" + operationId: collections_create + tags: + - collections + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: &ref_50 + collection: + description: >- + At minimum, this must include creator_id, annotators, + viewers and labels. All other args or sub-args should be + deleted or set to null value. + + + creator_id MUST be a valid user, otherwise 500 Error will + occur. + type: object + properties: + creator_id: + type: string + annotators: + type: array + items: + type: string + viewers: + type: array + items: + type: string + labels: + type: array + items: + type: string + archived: + type: boolean + default: false + metadata: + type: object + properties: + title: + type: string + subject: + type: string + description: + type: string + publisher: + type: string + contributor: + type: string + date: + type: string + type: + type: string + format: + type: string + identifier: + type: string + source: + type: string + language: + type: string + relation: + type: string + coverage: + type: string + rights: + type: string + configuration: + type: object + properties: + allow_overlapping_ner_annotations: + type: boolean + default: true + example: + creator_id: ada + annotators: + - ada + viewers: + - ada + - margaret + labels: + - label1 + - label2 + archived: false + metadata: + title: Test + subject: testcoll + description: test collection + publisher: ada + contributor: ada + date: 1/1/21 + type: sometype + format: HTML + identifier: ABCD + source: apl + language: english + relation: family + coverage: some + rights: all of them + configuration: + allow_overlapping_ner_annotations: true + train_every: + description: Should be an integer >= 5. + type: integer + minimum: 5 + overlap: + description: > + Should be a float between 0 and 1. + + + WARNING: You MUST put double quotation marks (`""`) around + the number for the backend to + + parse it correctly. + + + Ex: enter `".5"` instead of just `.5` + type: number + format: float + minimum: 0 + maximum: 1 + pipelineId: + type: string + description: > + WARNING: You MUST put double quotation marks (`""`) around + the id for the backend to + + parse it correctly. + + + Ex: enter `"123abc..."` instead of just `123abc...` + classifierParameters: + type: string + format: object + default: null + required: &ref_51 + - collection + - train_every + - overlap + - pipelineId + responses: + '201': + description: Successfully created the collection. + content: + application/json: + schema: + description: > + This object is returned when doing actions like modifying a + document or collection. It contains the ID of the object and + some other information from the database. + allOf: *ref_5 + '400': + description: Request malformed. + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + '401': + description: 'Authentication failed, not logged in.' + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + '500': + description: Error in syntax of the request - OR Wekzeug Authentication Failure. + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + security: + - cookieAuth: [] + '/collections/static_images/{collection_id}': + get: + summary: Get Collection Static Images + description: > + Retrieve all static images used in a collection. + + + Example: `curl --cookie session.cookie -X GET + "http://localhost:5000/collections/static_images/60c745395b72bf4ed6523821"` + operationId: collections_get_static_images + tags: + - collections + parameters: + - name: collection_id + in: path + required: true + description: The id of the collection on which to operate. + schema: *ref_21 + responses: + '200': + description: >- + Successfully found the collection and got any relevant static + images. + content: + application/json: + schema: + type: array + description: An array of static image paths. + items: + type: string + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Collection with given ID was not found. + content: *ref_23 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/collections/images/{collection_id}': + get: + summary: Get Collection Images + description: > + Retrieve all (non-static) images used in a collection. + + + Example: `curl --cookie session.cookie -X GET + "http://localhost:5000/collections/images/60c745395b72bf4ed6523821"` + operationId: collections_get_images + tags: + - collections + parameters: + - name: collection_id + in: path + required: true + description: The id of the collection on which to operate. + schema: *ref_21 + responses: + '200': + description: Successfully found the collection and got any relevant images. + content: + application/json: + schema: + type: array + description: An array of image paths. + items: + type: string + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Collection with given ID was not found. + content: *ref_23 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/collections/image_exists/{collection_id}/{path}': + get: + summary: Check Collection Image + description: > + Checks whether the given image exists in the given collection. + + + Example: `curl -X GET + "http://localhost:5000/collections/image_exists/60c745395b72bf4ed6523821/static%2Fapl.png" + -H "accept: application/json" --cookie session.cookie` + operationId: collections_image_exists + tags: + - collections + parameters: + - name: collection_id + in: path + required: true + description: The id of the collection on which to operate. + schema: *ref_21 + - name: path + in: path + required: true + description: >- + Path of the image to check (same as returned from + images/static_images). + schema: + type: string + example: static/apl.jpg + responses: + '200': + description: Returns whether the collection holds the image. + content: + application/json: + schema: + type: boolean + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Collection with given ID was not found. + content: *ref_23 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/collections/image/{collection_id}/{path}': + get: + summary: Get Collection Image + description: > + Download an image from a collection. + + + Example: `curl --cookie session.cookie -X GET + "http://localhost:5000/collections/image/60c745395b72bf4ed6523821/static/apl.png" + -v --output - > apl.png` + operationId: collections_image + tags: + - collections + parameters: + - name: collection_id + in: path + required: true + description: The id of the collection on which to operate. + schema: *ref_21 + - name: path + in: path + required: true + description: >- + Path of the image to download (same as returned from + images/static_images). + schema: + type: string + example: static/apl.jpg + responses: + '200': + description: Successfully found the collection and returns image data. + content: + image/*: + schema: + type: string + format: binary + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Collection with given ID was not found. + content: *ref_23 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + post: + summary: Upload Collection Image + description: > + Upload an image to a collection. + + + Example: `curl --cookie session.cookie -X POST + "http://localhost:5000/collections/image/60c745395b72bf4ed6523821/static/dog.jpeg" + -F 'file=@/home/pine/Downloads/dog.jpeg'` + operationId: collections_image_upload + tags: + - collections + parameters: + - name: collection_id + in: path + required: true + description: The id of the collection on which to operate. + schema: *ref_21 + - name: path + in: path + required: true + description: > + Path to place the image at. + + + Note: This path piece should NOT start with / (Ex: static/dog.jpg, + not /static/dog.jpg). + schema: + type: string + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + file: + type: string + format: binary + required: + - file + responses: + '100': + description: 'Couldn''t read the image, probably bad permissions or bad path.' + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + '200': + description: Successfully uploaded image (Will return the path). + content: + application/json: + schema: + type: string + '400': + description: Did not include the image in the request form. + content: + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Collection with given ID was not found. + content: *ref_23 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/collections/user_permissions/{collection_id}': + get: + summary: Get Collection User Permissions + description: > + Get the current user permissions of a collection. + + + Example: `curl --cookie session.cookie -X GET + "http://localhost:5000/collections/user_permissions/60c745395b72bf4ed6523821" + -v` + operationId: collections_permissions + tags: + - collections + parameters: + - name: collection_id + in: path + required: true + description: The id of the collection on which to operate. + schema: *ref_21 + responses: + '200': + description: Returns collection permissions for logged in user. + content: + application/json: + schema: + type: object + properties: &ref_27 + add_documents: + type: boolean + add_images: + type: boolean + annotate: + type: boolean + archive: + type: boolean + download_data: + type: boolean + modify_document_metadata: + type: boolean + modify_labels: + type: boolean + modify_users: + type: boolean + view: + type: boolean + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Collection with given ID was not found. + content: *ref_23 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/documents/by_id/{doc_id}': + get: + summary: Get Document + description: > + Retrieve a document based on its ID. + + + Example: `curl + http://localhost:5000/documents/by_id/60c7453f5b72bf4ed65239ee --cookie + session.cookie` + operationId: documents_get + tags: + - documents + parameters: + - name: doc_id + in: path + required: true + description: The id of the document on which to operate. + schema: *ref_10 + responses: + '200': + description: Successfully found the document based on the ID. + content: + application/json: + schema: + type: object + properties: &ref_25 + _id: + type: string + creator_id: + type: string + collection_id: + type: string + overlap: + type: integer + format: int64 + metadata: + type: object + additionalProperties: {} + text: + type: string + has_annotated: + type: object + additionalProperties: + type: boolean + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Document with given ID was not found. + content: *ref_12 + '500': + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + delete: + summary: Delete Document + description: > + Delete a document based on its ID. + + + This endpoint deletes a document and any annotations. It also updates + any next_instances so + + that the document will not be returned for annotation in any "get next + instance" calls in + + the future. It does NOT delete document data from any pipeline models + or update any IAA + + reports or pipeline metrics. These will be updated next time they are + requested. + + + Example: `curl -X DELETE + http://localhost:5000/documents/by_id/60c7453f5b72bf4ed65239ee --cookie + session.cookie` + operationId: documents_delete + tags: + - documents + parameters: + - name: doc_id + in: path + required: true + description: The id of the document on which to operate. + schema: *ref_10 + responses: + '200': + description: 'Deletion successful, response has IDs of changed objects.' + content: + application/json: + schema: + type: object + properties: &ref_24 + success: + type: boolean + description: Whether the operation was successful. + changed_objs: + type: object + description: What database objects were changed during operation. + properties: + next_instances: + type: object + properties: + updated: + description: IDs of next_instance objects that were updated. + type: array + items: + type: string + annotations: + type: object + properties: + deleted: + description: IDs of annotation objects that were deleted. + type: array + items: + type: string + documents: + type: object + properties: + deleted: + description: IDs of document objects that were deleted. + type: array + items: + type: string + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Document with given ID was not found. + content: *ref_12 + '500': + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + /documents/by_ids: + delete: + summary: Delete Documents + description: > + Delete documents based on their IDs. + + + This endpoint deletes documents and any associated annotations. It also + updates any next_instances so + + that the documents will not be returned for annotation in any "get next + instance" calls in + + the future. It does NOT delete document data from any pipeline models + or update any IAA + + reports or pipeline metrics. These will be updated next time they are + requested. + + + Example: `curl -X DELETE + http://localhost:5000/documents/by_ids?ids=60c7453f5b72bf4ed65239ee,60c7453f5b72bf4ed65239ef + --cookie session.cookie` + operationId: documents_delete_multiple + tags: + - documents + parameters: + - name: ids + in: query + required: true + description: 'The IDs of the document to delete, comma-separated.' + schema: + type: string + example: '60c7453f5b72bf4ed65239ee,60c7453f5b72bf4ed65239ef' + responses: + '200': + description: 'Deletion successful, response has IDs of changed objects.' + content: + application/json: + schema: + type: object + properties: *ref_24 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Document with given ID was not found. + content: *ref_12 + '500': + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/documents/count_by_collection_id/{collection_id}': + get: + summary: Get Collection Document Count + description: > + Count the number of documents in a collection. + + + Example: `curl + http://localhost:5000/documents/count_by_collection_id/60c7453d5b72bf4ed65239e9 + --cookie session.cookie` + operationId: documents_count_by_collection + tags: + - documents + parameters: + - name: collection_id + in: path + required: true + description: The id of the collection on which to operate. + schema: *ref_21 + responses: + '200': + description: >- + Successfully found collection and counted number of documents + inside. + content: + application/json: + schema: + type: integer + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Collection with given ID was not found. + content: *ref_23 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/documents/by_collection_id_all/{collection_id}': + get: + summary: Get All Collection Documents + description: > + Get all documents that are in a collection with a given collection id. + + + Example: `curl + http://localhost:5000/documents/by_collection_id_all/60c7453d5b72bf4ed65239e9 + --cookie session.cookie` + operationId: documents_get_by_collection + tags: + - documents + parameters: + - name: collection_id + in: path + required: true + description: The id of the collection on which to operate. + schema: *ref_21 + responses: + '200': + description: Successfully found collection and retrieved all related documents. + content: + application/json: + schema: + type: object + properties: &ref_26 + _items: + type: array + items: + type: object + properties: *ref_25 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Collection with given ID was not found. + content: *ref_23 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/documents/by_collection_id_paginated/{collection_id}': + get: + summary: Get Paginated Collection Documents + description: > + Get a variable page of variable size of documents. + + + Example: `curl + "http://localhost:5000/documents/by_collection_id_paginated/60c7453d5b72bf4ed65239e9?page=1&pageSize=5" + --cookie session.cookie` + operationId: documents_get_by_collection_paginated + tags: + - documents + parameters: + - name: collection_id + in: path + required: true + description: The id of the collection on which to operate. + schema: *ref_21 + - name: page + in: query + required: true + description: > + The page number to get by 0 indexing (Will have documents + page_num*pageSize -> page_num*pageSize+pageSize-1 in the collection + if there are any.) + schema: + type: integer + - name: pageSize + in: query + required: true + description: The number of documents to put in each page. + schema: + type: integer + responses: + '200': + description: > + Successfully found collection and retrieved any (if any) associated + documents (Could return no documents if page number too high). + content: + application/json: + schema: + type: object + properties: *ref_26 + '400': + description: Input parameters are missing/invalid. + content: *ref_6 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Collection with given ID was not found. + content: *ref_23 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/documents/user_permissions/{doc_id}': + get: + summary: Get User Document Permissions + description: > + Get the permission that the logged in user has for this document. + + + Example: `curl + http://localhost:5000/documents/user_permissions/60c7453f5b72bf4ed65239ee + --cookie session.cookie` + operationId: documents_permissions + tags: + - documents + parameters: + - name: doc_id + in: path + required: true + description: The id of the document on which to operate. + schema: *ref_10 + responses: + '200': + description: Successfully found document and retrieved user permissions. + content: + application/json: + schema: + type: object + properties: *ref_27 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Document with given ID was not found. + content: *ref_12 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/documents/metadata/{doc_id}': + put: + summary: Update Document Metadata + description: > + Change/Replace the metadata of a certain document (does not add). + + + Example: `curl -X PUT + http://localhost:5000/documents/metadata/60c7453f5b72bf4ed65239ee -d + '{"test":"this"}' --cookie session.cookie -H + Content-Type:application/json` + + + Note: you need the content type header to specify json. + operationId: documents_update_metadata + tags: + - documents + parameters: + - name: doc_id + in: path + required: true + description: The id of the document on which to operate. + schema: *ref_10 + requestBody: + description: The metadata in json form in the body. + required: true + content: + application/json: + schema: + type: object + additionalProperties: {} + responses: + '200': + description: Successfully found document and changed the metadata. + content: + application/json: + schema: + description: > + This object is returned when doing actions like modifying a + document or collection. It contains the ID of the object and + some other information from the database. + allOf: *ref_5 + '400': + description: Input parameters are missing/invalid. + content: *ref_6 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Document with given ID was not found. + content: *ref_12 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + /documents: + post: + summary: Create Document + description: > + Create a new document in a collection. + + + Example: `curl -X POST http://localhost:5000/documents/ -d + '{"collection_id":"6ada", "text":"blah"}' --cookie session.cookie -H + Content-Type:application/json` + operationId: documents_create + tags: + - documents + requestBody: + required: true + content: + application/json: + schema: + oneOf: + - description: >- + Arguments for the new document (at least collection_id, + creator_id, text). + type: object + properties: &ref_28 + collection_id: + type: string + creator_id: + type: string + text: + type: string + overlap: + type: number + format: double + metadata: + type: object + additionalProperties: {} + has_annotated: + type: object + additionalProperties: + type: boolean + required: &ref_29 + - collection_id + - creator_id + - text + - type: array + items: + description: >- + Arguments for the new document (at least collection_id, + creator_id, text). + type: object + properties: *ref_28 + required: *ref_29 + responses: + '200': + description: Successfully created the new document in the collection. + content: + application/json: + schema: + description: > + This object is returned when doing actions like modifying a + document or collection. It contains the ID of the object and + some other information from the database. + allOf: *ref_5 + '400': + description: Input parameters are missing/invalid. + content: *ref_6 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Collection with given ID was not found. + content: *ref_23 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/iaa_reports/by_collection_id/{collection_id}': + get: + summary: Get IAA Report for Collection + description: > + Get the Inter-Annotator Agreement for a specified collection. + + + Note: This will not error with an invalid collection ID, it will give no + items. + + + Example: `curl -X GET + http://localhost:5000/iaa_reports/by_collection_id/60df138b3f8fa7b2e1445bd7 + --cookie ~/session.cookie -v` + operationId: iaa_get + tags: + - iaa_reports + parameters: + - name: collection_id + in: path + required: true + description: The id of the collection on which to operate. + schema: *ref_21 + responses: + '200': + description: Successfully got collection's IAA. + content: + application/json: + schema: + type: object + properties: + _items: + type: array + items: + allOf: &ref_56 + - allOf: *ref_30 + - type: object + properties: + _id: + type: string + collection_id: + type: string + num_of_annotators: + type: integer + num_of_agreement_docs: + type: integer + num_of_labels: + type: integer + per_doc_agreement: + type: object + properties: + doc_id: + type: string + avg: + type: number + format: double + stddev: + type: integer + per_label_agreement: + type: array + items: + type: object + properties: + label: + type: string + avg: + type: number + format: double + stddev: + type: integer + overall_agreement: + type: object + properties: + mean: + type: number + format: double + sd: + type: integer + heatmap_data: + type: object + properties: + matrix: + type: array + items: + type: array + items: + type: number + format: float + minItems: 2 + maxItems: 2 + example: + - 1 + - 0.666666 + annotators: + type: array + items: + type: string + example: + - ada + - margaret + labels_per_annotator: + type: object + additionalProperties: + type: object + additionalProperties: + type: integer + example: + ada: + label1: 1 + label2: 4 + margaret: + label1: 3 + label2: 2 + _updated: + type: string + format: date-time + _created: + type: string + format: date-time + _links: + type: object + properties: *ref_9 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + post: + summary: Create IAA Report for Collection + description: > + Create an Inter-Annotator-Agreement for a collection. + + + Note: This will not error with an invalid collection ID (or not enough + annotators), it will + + return false. + + + Example: `curl -X POST + http://localhost:5000/iaa_reports/by_collection_id/60df138b3f8fa7b2e1445bd7 + --cookie ~/session.cookie -v` + operationId: iaa_create + tags: + - iaa_reports + parameters: + - name: collection_id + in: path + required: true + description: The id of the collection on which to operate. + schema: *ref_21 + responses: + '200': + description: | + Tried to create the IAA (success or fail). + + False means invalid collection ID or not enough annotators. + content: + application/json: + schema: + type: boolean + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + /pipelines: + get: + summary: Get Pipelines + description: > + Get all pipelines. + + + Example: `curl -X GET http://localhost:5000/pipelines/ --cookie + ~/session.cookie` + operationId: pipelines_get_all + tags: + - pipelines + responses: + '200': + description: Successfully got pipelines. + content: + application/json: + schema: + type: object + properties: + _items: + type: array + items: + allOf: &ref_31 + - type: object + properties: *ref_8 + - type: object + properties: + _id: + type: string + title: + type: string + description: + type: string + name: + type: string + parameters: + type: object + additionalProperties: {} + example: + cutoff: integer + iterations: ' integer' + n_iter: integer + dropout: float + max_left: integer + use_class_feature: + - true + - false + use_word: + - true + - false + use_ngrams: + - true + - false + no_mid_ngrams: + - true + - false + max_ngram_length: integer + use_prev: + - true + - false + use_next: + - true + - false + use_disjunctive: + - true + - false + use_sequences: + - true + - false + use_prev_sequences: + - true + - false + use_type_seqs: + - true + - false + use_type_seqs2: + - true + - false + use_type_y_sequences: + - true + - false + _updated: + type: string + format: date-time + _created: + type: string + format: date-time + _links: + type: object + properties: *ref_9 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/pipelines/by_id/{pipeline_id}': + get: + summary: Get Pipeline + description: > + Get the pipeline with the given ID. + + + Example: `curl -X GET + http://localhost:5000/pipelines/by_id/5babb6ee4eb7dd2c39b9671f --cookie + ~/session.cookie -v` + operationId: pipelines_get + tags: + - pipelines + parameters: + - name: pipeline_id + in: path + required: true + description: The id of the pipeline on which to operate. + schema: &ref_35 + type: string + responses: + '200': + description: Successfully got specified pipeline. + content: + application/json: + schema: + allOf: *ref_31 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Pipeline with given ID was not found. + content: &ref_36 + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/pipelines/classifiers/by_collection_id/{collection_id}': + get: + summary: Get Collection Classifier + description: > + Get the classifier information for a collection. + + + Example: `curl -X GET + http://localhost:5000/pipelines/classifiers/by_collection_id/60db2cacdbfddb3ca87c845d + --cookie ~/session.cookie` + operationId: pipelines_get_collection_classifier + tags: + - pipelines + parameters: + - name: collection_id + in: path + required: true + description: The id of the collection on which to operate. + schema: *ref_21 + responses: + '200': + description: Successfully found collection and got information. + content: + application/json: + schema: + allOf: &ref_52 + - allOf: *ref_30 + - type: object + properties: + _id: + type: string + _created: + type: string + format: date-time + _updated: + type: string + format: date-time + annotated_document_count: + type: integer + collection_id: + type: string + labels: + type: array + items: + type: string + overlap: + type: number + format: double + parameters: + type: object + additionalProperties: {} + pipeline_id: + type: string + train_every: + type: integer + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Collection with given ID was not found. + content: *ref_23 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + /pipelines/metrics: + get: + summary: Get Collection Metrics + description: > + Get metrics for all available collections. + + + Example: `curl -X GET http://localhost:5000/pipelines/metrics --cookie + ~/session.cookie` + operationId: pipelines_get_metrics + tags: + - pipelines + responses: + '200': + description: Successfully got metrics. + content: + application/json: + schema: + type: object + properties: + _items: + type: array + items: + type: object + properties: &ref_32 + _id: + type: string + collection_id: + type: string + classifier_id: + type: string + documents: + type: array + items: {} + annotations: + type: array + items: {} + folds: + type: array + items: {} + metrics: + type: array + items: {} + _updated: + type: string + _created: + type: string + _version: + type: integer + _etag: + type: string + _links: + type: object + properties: + self: + type: object + properties: + title: + type: string + href: + type: string + _links: + type: object + properties: *ref_9 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/pipelines/metrics/by_classifier_id/{classifier_id}': + get: + summary: Get Classifier Metrics + description: > + Get metric by classifier id. + + + Example: `curl -X GET + http://localhost:5000/pipelines/metrics/by_classifier_id/60df138b3f8fa7b2e1445bd8 + --cookie ~/session.cookie` + operationId: pipelines_get_classifier_metrics + tags: + - pipelines + parameters: + - name: classifier_id + in: path + required: true + description: The id of the classifier on which to operate. + schema: &ref_33 + type: string + responses: + '200': + description: Successfully got metric(s). + content: + application/json: + schema: + type: object + properties: + _items: + type: array + items: + type: object + properties: *ref_32 + _links: + type: object + properties: *ref_9 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Classifier with given ID was not found. + content: &ref_34 + application/json: + schema: + description: Error message from the server. + type: string + example: Error message from the server. + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/pipelines/next_document/by_classifier_id/{classifier_id}': + get: + summary: Get Next Document to Annotate + description: > + Get the next document id to annotate based on classifier id (or null if + no un-annotated + + documents). + + + Example: `curl -X GET + http://localhost:5000/pipelines/next_document/by_classifier_id/60df138b3f8fa7b2e1445bd8 + --cookie ~/session.cookie` + operationId: pipelines_get_next_document + tags: + - pipelines + parameters: + - name: classifier_id + in: path + required: true + description: The id of the classifier on which to operate. + schema: *ref_33 + responses: + '200': + description: 'Got ID of next document to annotate, or null if all are complete.' + content: + application/json: + schema: + type: string + nullable: true + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Classifier with given ID was not found. + content: *ref_34 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/pipelines/next_document/by_classifier_id/{classifier_id}/{doc_id}': + post: + summary: Advance Next Document + description: > + Advance to next document by marking the given one as annotated. + + + Example: `curl -X POST + http://localhost:5000/pipelines/next_document/by_classifier_id/60df138b3f8fa7b2e1445bd8/60df13d73f8fa7b2e1445bdd + --cookie ~/session.cookie` + + + This will still give you a valid response with an invalid document ID. + operationId: pipelines_advance_next_document + tags: + - pipelines + parameters: + - name: classifier_id + in: path + required: true + description: The id of the classifier on which to operate. + schema: *ref_33 + - name: doc_id + in: path + required: true + description: The id of the document on which to operate. + schema: *ref_10 + responses: + '200': + description: Complete annotations on document. + content: + application/json: + schema: + type: object + properties: + body: + type: object + nullable: true + success: + type: boolean + trained: + type: boolean + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Classifier with given ID was not found. + content: *ref_34 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/pipelines/status/{pipeline_id}': + get: + summary: Get Pipeline Status + description: > + Get the status of the pipeline with the given ID. + + + Example: `curl -X GET + http://localhost:5000/pipelines/status/60df138b3f8fa7b2e1445bd8 --cookie + ~/session.cookie` + operationId: pipelines_get_status + tags: + - pipelines + parameters: + - name: pipeline_id + in: path + required: true + description: The id of the pipeline on which to operate. + schema: *ref_35 + responses: + '200': + description: Returns the status for the given pipeline. + content: + application/json: + schema: + type: object + properties: &ref_37 + service_details: + description: Information about the pipeline service. + type: object + properties: + channel: + type: string + framework: + type: string + framework_types: + type: array + items: + type: string + name: + type: string + version: + type: string + format: version + job_id: + description: The ID of this pipeline job. + type: string + format: uuid + job_request: + description: The job request data submitted to pipelines. + type: object + properties: &ref_38 + job_id: + description: The ID of this pipeline job. + type: string + format: uuid + job_queue: + type: string + job_type: + type: string + job_data: + type: object + properties: + framework: + type: string + type: + description: The type of job. + type: string + classifier_id: + type: string + nullable: true + additionalProperties: + description: Any additional job parameters. + job_response: + description: The job request data received from pipelines. + type: object + properties: + pipeline_name: + type: string + eve_entry_point: + type: string + model_dir: + type: string + format: path + classifier: + description: Status of the classifier. + type: object + has_trained: + description: Whether the classifier has trained. + type: boolean + classifier_id: + description: Will not be present for pipeline status. + type: string + nullable: true + classifier_class: + description: Python class for this classifier. + type: string + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Pipeline with given ID was not found. + content: *ref_36 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/pipelines/classifiers/status/{classifier_id}': + get: + summary: Get Classifier Status + description: > + Get the status of the classifier with the given ID. + + + Example: `curl -X GET + http://localhost:5000/pipelines/classifiers/status/60df138b3f8fa7b2e1445bd8 + --cookie ~/session.cookie` + operationId: pipelines_get_classifier_status + tags: + - pipelines + parameters: + - name: classifier_id + in: path + required: true + description: The id of the classifier on which to operate. + schema: *ref_33 + responses: + '200': + description: Returns the status for the given classifier. + content: + application/json: + schema: + type: object + properties: *ref_37 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Classifier with given ID was not found. + content: *ref_34 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/pipelines/running_jobs/{classifier_id}': + get: + summary: Get Classifier Running Jobs + description: > + Get any currently running jobs of the classifier with the given ID. + + + Example: `curl -X GET + http://localhost:5000/pipelines/running_jobs/60df138b3f8fa7b2e1445bd8 + --cookie ~/session.cookie` + operationId: pipelines_get_running_jobs + tags: + - pipelines + parameters: + - name: classifier_id + in: path + required: true + description: The id of the classifier on which to operate. + schema: *ref_33 + responses: + '200': + description: Returns the all currently running jobs for the classifier. + content: + application/json: + schema: + type: array + items: + type: string + format: uuid + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Classifier with given ID was not found. + content: *ref_34 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/pipelines/train/{classifier_id}': + post: + summary: Train Classifier + description: > + Trains the classifier based on currently annotated documents in the + collection. + + + This endpoint is _ASYNCHRONOUS_ in that it will return information about + the submitted job + + rather than any results from the job. + + + Example: `curl -X POST + http://localhost:5000/pipelines/train/60df138b3f8fa7b2e1445bd8 --cookie + session.cookie` + operationId: pipelines_train + tags: + - pipelines + parameters: + - name: classifier_id + in: path + required: true + description: The id of the classifier on which to operate. + schema: *ref_33 + requestBody: + content: + application/json: + schema: + type: object + properties: + model_name: + description: Optional name to save the model for future reference. + type: string + responses: + '200': + description: Returns the all currently running jobs for the classifier. + content: + application/json: + schema: + type: object + properties: + request: + description: The job request data submitted to pipelines. + type: object + properties: *ref_38 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Classifier with given ID was not found. + content: *ref_34 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] + '/pipelines/predict/{classifier_id}': + post: + summary: Predict Using Classifier + description: > + Uses the given classifier to predict annotations for the given + document(s). + + + Example: `curl -X POST + http://localhost:5000/pipelines/predict/60df138b3f8fa7b2e1445bd8 + --cookie session.cookie` + operationId: pipelines_predict + tags: + - pipelines + parameters: + - name: classifier_id + in: path + required: true + description: The id of the classifier on which to operate. + schema: *ref_33 + requestBody: + content: + application/json: + schema: + description: Either document_ids or texts must be given and non-empty. + type: object + properties: &ref_53 + document_ids: + description: IDs of documents to predict annotations for. + type: array + items: + type: string + default: [] + texts: + description: Text of documents to predict annotations for. + type: array + items: + type: string + default: [] + timeout_in_s: + description: >- + If provided, will wait this long before timing out on the + job. + type: integer + default: 36000 + responses: + '200': + description: Returns the predictions and other job information. + content: + application/json: + schema: + description: Pipeline predictions and other job information. + type: object + properties: &ref_54 + job_id: + type: string + format: uuid + job_request: + description: The job request data submitted to pipelines. + type: object + properties: *ref_38 + job_response: + type: object + properties: + documents_by_id: + description: >- + Predictions in a mapping from document ID to + annotations. + type: object + additionalProperties: + type: object + properties: &ref_39 + doc: + description: Document-level annotations. + type: array + items: + description: Annotation label. + type: string + example: + - label1 + - label2 + ner: + description: 'NER annotations. [startIndex, endIndex, label].' + type: array + items: + type: array + items: + oneOf: + - type: string + - type: integer + example: + - 5 + - 10 + - label1 + texts: + description: >- + Predictions for manual texts in the same order as they + were in the input. + type: array + items: + type: object + properties: *ref_39 + '400': + description: Input parameters are missing/invalid. + content: *ref_6 + '401': + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + '404': + description: Classifier with given ID was not found. + content: *ref_34 + default: + description: 'Unexpected error, check server logs.' + content: *ref_1 + security: + - cookieAuth: [] +components: + securitySchemes: + cookieAuth: + description: > + This an example command to provision and print the session key using + eve: + + + `curl -X POST -H "Content-Type:application/json" -d + '{"username":"ada@pine.jhuapl.edu","password":"ada@pine.jhuapl.edu"}' + http://localhost:5000/auth/login --cookie-jar - --output /dev/null + --silent | grep -o -P "session\s.+" | sed -e 's/session\s/session=/' -` + type: apiKey + in: cookie + name: session + schemas: + UserRoles: + description: The role (for permissions) of the user. + type: array + items: *ref_4 + NewUserData: + type: object + properties: *ref_40 + required: *ref_41 + UpdateUserData: + type: object + properties: *ref_42 + required: *ref_43 + WrappedAnnotations: + type: object + properties: *ref_15 + LoginForm: + description: Information needed to display a login form. + type: object + properties: *ref_44 + example: *ref_45 + EveLogin: + description: Only for eve login. + type: object + properties: *ref_46 + EvePasswordChange: + type: object + properties: *ref_47 + VegasAuthToken: + description: An auth token obtained by Vegas out-of-band from PINE. + type: object + properties: *ref_48 + additionalProperties: *ref_49 + WrappedCollections: + type: object + properties: *ref_20 + NewCollection: + type: object + properties: *ref_50 + required: *ref_51 + WrappedDocuments: + type: object + properties: *ref_26 + NewDocument: + description: >- + Arguments for the new document (at least collection_id, creator_id, + text). + type: object + properties: *ref_28 + required: *ref_29 + Classifier: + allOf: *ref_52 + PipelineJobRequest: + description: The job request data submitted to pipelines. + type: object + properties: *ref_38 + PipelineOrClassifierStatus: + type: object + properties: *ref_37 + PipelinePredictParameters: + description: Either document_ids or texts must be given and non-empty. + type: object + properties: *ref_53 + PipelineDocumentPredictions: + type: object + properties: *ref_39 + PipelinePredictions: + description: Pipeline predictions and other job information. + type: object + properties: *ref_54 + ErrorResponse: + description: Error message from the server. + type: string + example: Error message from the server. + UserInfo: + type: object + properties: *ref_2 + EveBase: + type: object + properties: *ref_8 + EveLinks: + type: object + properties: *ref_9 + IDInfo: + description: > + This object is returned when doing actions like modifying a document or + collection. It contains the ID of the object and some other information + from the database. + allOf: *ref_5 + EveBaseWithVersion: + allOf: *ref_30 + UserDocumentAnnotation: + description: > + This is the log of annotations by a specific user. A document might + have 0, 1, or multiple of these based on how many users annotated. + allOf: *ref_55 + DocumentAnnotations: + type: object + properties: *ref_13 + example: *ref_14 + AuthUser: + type: object + properties: *ref_18 + example: *ref_19 + AuthUserDetails: + type: object + properties: *ref_16 + example: *ref_17 + Collection: + type: object + properties: *ref_22 + UserPermissions: + type: object + properties: *ref_27 + Document: + type: object + properties: *ref_25 + DocumentDeletionResponse: + type: object + properties: *ref_24 + InterAnnotatorAgreement: + allOf: *ref_56 + Pipeline: + allOf: *ref_31 + CollectionMetric: + type: object + properties: *ref_32 + responses: + UnexpectedServerError: + description: 'Unexpected error, check server logs.' + content: *ref_1 + NotAuthorizedOrNotAdmin: + description: 'Authentication failed, not logged in or not an admin.' + content: *ref_0 + InvalidInputParameters: + description: Input parameters are missing/invalid. + content: *ref_6 + MismatchedEtag: + description: Given etag did not match the most updated stored one. + content: *ref_57 + Success: + description: Whether the operation succeeded or failed. + content: *ref_7 + NotAuthorized: + description: > + Authentication failed: not logged in or user doesn't have the + permissions for this operation. + content: *ref_11 + DocumentNotFound: + description: Document with given ID was not found. + content: *ref_12 + CollectionNotFound: + description: Collection with given ID was not found. + content: *ref_23 + PipelineNotFound: + description: Pipeline with given ID was not found. + content: *ref_36 + ClassifierNotFound: + description: Classifier with given ID was not found. + content: *ref_34 + parameters: + userIdParam: + name: user_id + in: path + required: true + description: ID of the user on which to operate. + schema: *ref_3 + docIdParam: + name: doc_id + in: path + required: true + description: The id of the document on which to operate. + schema: *ref_10 + collectionIdParam: + name: collection_id + in: path + required: true + description: The id of the collection on which to operate. + schema: *ref_21 + pipelineIdParam: + name: pipeline_id + in: path + required: true + description: The id of the pipeline on which to operate. + schema: *ref_35 + classifierIdParam: + name: classifier_id + in: path + required: true + description: The id of the classifier on which to operate. + schema: *ref_33 +tags: + - name: admin + description: > + Operations in the "admin" blueprint. These operations are generally only + available when the "eve" auth module is running and are only accessible to + logged-in users that are administrators. + x-displayName: admin + - name: annotations + description: Operations in the "annotations" blueprint. + x-displayName: annotations + - name: auth + description: Operations in the "auth" blueprint. + x-displayName: auth + - name: auth_eve + description: These operations are only available if using "eve" auth module. + x-displayName: auth_eve + - name: auth_vegas + description: These operations are only available if using "vegas" auth module. + x-displayName: auth_vegas + - name: collections + description: Operations in the "collections" blueprint. + x-displayName: collections + - name: documents + description: Operations in the "documents" blueprint. + x-displayName: documents + - name: iaa_reports + description: Operations in the "iaa_reports" blueprint. + x-displayName: iaa_reports + - name: pipelines + description: Operations in the "pipelines" blueprint. + x-displayName: pipelines +x-tagGroups: + - name: openapi + tags: + - admin + - annotations + - auth + - auth_eve + - auth_vegas + - collections + - documents + - iaa_reports + - pipelines diff --git a/backend/pine/backend/api/swagger-ui/VERSION b/backend/pine/backend/api/swagger-ui/VERSION new file mode 100644 index 0000000..ca25ff6 --- /dev/null +++ b/backend/pine/backend/api/swagger-ui/VERSION @@ -0,0 +1 @@ +3.50.0 diff --git a/backend/pine/backend/api/swagger-ui/favicon-16x16.png b/backend/pine/backend/api/swagger-ui/favicon-16x16.png new file mode 100644 index 0000000..8b194e6 Binary files /dev/null and b/backend/pine/backend/api/swagger-ui/favicon-16x16.png differ diff --git a/backend/pine/backend/api/swagger-ui/favicon-32x32.png b/backend/pine/backend/api/swagger-ui/favicon-32x32.png new file mode 100644 index 0000000..249737f Binary files /dev/null and b/backend/pine/backend/api/swagger-ui/favicon-32x32.png differ diff --git a/backend/pine/backend/api/swagger-ui/index.html b/backend/pine/backend/api/swagger-ui/index.html new file mode 100644 index 0000000..5bb4812 --- /dev/null +++ b/backend/pine/backend/api/swagger-ui/index.html @@ -0,0 +1,60 @@ + + + + + + Swagger UI + + + + + + + +
+ + + + + + diff --git a/backend/pine/backend/api/swagger-ui/oauth2-redirect.html b/backend/pine/backend/api/swagger-ui/oauth2-redirect.html new file mode 100644 index 0000000..64b171f --- /dev/null +++ b/backend/pine/backend/api/swagger-ui/oauth2-redirect.html @@ -0,0 +1,75 @@ + + + + Swagger UI: OAuth2 Redirect + + + + + diff --git a/backend/pine/backend/api/swagger-ui/swagger-ui-bundle.js b/backend/pine/backend/api/swagger-ui/swagger-ui-bundle.js new file mode 100644 index 0000000..12c26d6 --- /dev/null +++ b/backend/pine/backend/api/swagger-ui/swagger-ui-bundle.js @@ -0,0 +1,3 @@ +/*! For license information please see swagger-ui-bundle.js.LICENSE.txt */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(function(){try{return require("esprima")}catch(e){}}()):"function"==typeof define&&define.amd?define(["esprima"],t):"object"==typeof exports?exports.SwaggerUIBundle=t(function(){try{return require("esprima")}catch(e){}}()):e.SwaggerUIBundle=t(e.esprima)}(this,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist",n(n.s=555)}([function(e,t,n){"use strict";e.exports=n(131)},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return i(e)?e:J(e)}function r(e){return s(e)?e:K(e)}function o(e){return u(e)?e:Y(e)}function a(e){return i(e)&&!c(e)?e:G(e)}function i(e){return!(!e||!e[p])}function s(e){return!(!e||!e[f])}function u(e){return!(!e||!e[h])}function c(e){return s(e)||u(e)}function l(e){return!(!e||!e[d])}t(r,n),t(o,n),t(a,n),n.isIterable=i,n.isKeyed=s,n.isIndexed=u,n.isAssociative=c,n.isOrdered=l,n.Keyed=r,n.Indexed=o,n.Set=a;var p="@@__IMMUTABLE_ITERABLE__@@",f="@@__IMMUTABLE_KEYED__@@",h="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",m="delete",v=5,g=1<>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?A(e)+t:t}function k(){return!0}function j(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function T(e,t){return P(e,t,0)}function I(e,t){return P(e,t,t)}function P(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var N=0,M=1,R=2,D="function"==typeof Symbol&&Symbol.iterator,L="@@iterator",B=D||L;function F(e){this.next=e}function U(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function q(){return{value:void 0,done:!0}}function z(e){return!!H(e)}function V(e){return e&&"function"==typeof e.next}function W(e){var t=H(e);return t&&t.call(e)}function H(e){var t=e&&(D&&e[D]||e[L]);if("function"==typeof t)return t}function $(e){return e&&"number"==typeof e.length}function J(e){return null==e?ie():i(e)?e.toSeq():ce(e)}function K(e){return null==e?ie().toKeyedSeq():i(e)?s(e)?e.toSeq():e.fromEntrySeq():se(e)}function Y(e){return null==e?ie():i(e)?s(e)?e.entrySeq():e.toIndexedSeq():ue(e)}function G(e){return(null==e?ie():i(e)?s(e)?e.entrySeq():e:ue(e)).toSetSeq()}F.prototype.toString=function(){return"[Iterator]"},F.KEYS=N,F.VALUES=M,F.ENTRIES=R,F.prototype.inspect=F.prototype.toSource=function(){return this.toString()},F.prototype[B]=function(){return this},t(J,n),J.of=function(){return J(arguments)},J.prototype.toSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq {","}")},J.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},J.prototype.__iterate=function(e,t){return pe(this,e,t,!0)},J.prototype.__iterator=function(e,t){return fe(this,e,t,!0)},t(K,J),K.prototype.toKeyedSeq=function(){return this},t(Y,J),Y.of=function(){return Y(arguments)},Y.prototype.toIndexedSeq=function(){return this},Y.prototype.toString=function(){return this.__toString("Seq [","]")},Y.prototype.__iterate=function(e,t){return pe(this,e,t,!1)},Y.prototype.__iterator=function(e,t){return fe(this,e,t,!1)},t(G,J),G.of=function(){return G(arguments)},G.prototype.toSetSeq=function(){return this},J.isSeq=ae,J.Keyed=K,J.Set=G,J.Indexed=Y;var Z,X,Q,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function oe(e){this._iterator=e,this._iteratorCache=[]}function ae(e){return!(!e||!e[ee])}function ie(){return Z||(Z=new te([]))}function se(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():V(e)?new oe(e).fromEntrySeq():z(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function ue(e){var t=le(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ce(e){var t=le(e)||"object"==typeof e&&new ne(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function le(e){return $(e)?new te(e):V(e)?new oe(e):z(e)?new re(e):void 0}function pe(e,t,n,r){var o=e._cache;if(o){for(var a=o.length-1,i=0;i<=a;i++){var s=o[n?a-i:i];if(!1===t(s[1],r?s[0]:i,e))return i+1}return i}return e.__iterateUncached(t,n)}function fe(e,t,n,r){var o=e._cache;if(o){var a=o.length-1,i=0;return new F((function(){var e=o[n?a-i:i];return i++>a?q():U(t,r?e[0]:i-1,e[1])}))}return e.__iteratorUncached(t,n)}function he(e,t){return t?de(t,e,"",{"":e}):me(e)}function de(e,t,n,r){return Array.isArray(t)?e.call(r,n,Y(t).map((function(n,r){return de(e,n,r,t)}))):ve(t)?e.call(r,n,K(t).map((function(n,r){return de(e,n,r,t)}))):t}function me(e){return Array.isArray(e)?Y(e).map(me).toList():ve(e)?K(e).map(me).toMap():e}function ve(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ge(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function ye(e,t){if(e===t)return!0;if(!i(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||u(e)!==u(t)||l(e)!==l(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(l(e)){var r=e.entries();return t.every((function(e,t){var o=r.next().value;return o&&ge(o[1],e)&&(n||ge(o[0],t))}))&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var a=e;e=t,t=a}var p=!0,f=t.__iterate((function(t,r){if(n?!e.has(t):o?!ge(t,e.get(r,b)):!ge(e.get(r,b),t))return p=!1,!1}));return p&&e.size===f}function be(e,t){if(!(this instanceof be))return new be(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(X)return X;X=this}}function _e(e,t){if(!e)throw new Error(t)}function xe(e,t,n){if(!(this instanceof xe))return new xe(e,t,n);if(_e(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),tr?q():U(e,o,n[t?r-o++:o++])}))},t(ne,K),ne.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ne.prototype.has=function(e){return this._object.hasOwnProperty(e)},ne.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,a=0;a<=o;a++){var i=r[t?o-a:a];if(!1===e(n[i],i,this))return a+1}return a},ne.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,o=r.length-1,a=0;return new F((function(){var i=r[t?o-a:a];return a++>o?q():U(e,i,n[i])}))},ne.prototype[d]=!0,t(re,Y),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=W(this._iterable),r=0;if(V(n))for(var o;!(o=n.next()).done&&!1!==e(o.value,r++,this););return r},re.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=W(this._iterable);if(!V(n))return new F(q);var r=0;return new F((function(){var t=n.next();return t.done?t:U(e,r++,t.value)}))},t(oe,Y),oe.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,o=this._iteratorCache,a=0;a=r.length){var t=n.next();if(t.done)return t;r[o]=t.value}return U(e,o,r[o++])}))},t(be,Y),be.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},be.prototype.get=function(e,t){return this.has(e)?this._value:t},be.prototype.includes=function(e){return ge(this._value,e)},be.prototype.slice=function(e,t){var n=this.size;return j(e,t,n)?this:new be(this._value,I(t,n)-T(e,n))},be.prototype.reverse=function(){return this},be.prototype.indexOf=function(e){return ge(this._value,e)?0:-1},be.prototype.lastIndexOf=function(e){return ge(this._value,e)?this.size:-1},be.prototype.__iterate=function(e,t){for(var n=0;n=0&&t=0&&nn?q():U(e,a++,i)}))},xe.prototype.equals=function(e){return e instanceof xe?this._start===e._start&&this._end===e._end&&this._step===e._step:ye(this,e)},t(we,n),t(Ee,we),t(Se,we),t(Ce,we),we.Keyed=Ee,we.Indexed=Se,we.Set=Ce;var Ae="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function Oe(e){return e>>>1&1073741824|3221225471&e}function ke(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return Oe(n)}if("string"===t)return e.length>Fe?je(e):Te(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return Ie(e);if("function"==typeof e.toString)return Te(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function je(e){var t=ze[e];return void 0===t&&(t=Te(e),qe===Ue&&(qe=0,ze={}),qe++,ze[e]=t),t}function Te(e){for(var t=0,n=0;n0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var Re,De="function"==typeof WeakMap;De&&(Re=new WeakMap);var Le=0,Be="__immutablehash__";"function"==typeof Symbol&&(Be=Symbol(Be));var Fe=16,Ue=255,qe=0,ze={};function Ve(e){_e(e!==1/0,"Cannot perform this action with an infinite size.")}function We(e){return null==e?ot():He(e)&&!l(e)?e:ot().withMutations((function(t){var n=r(e);Ve(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function He(e){return!(!e||!e[Je])}t(We,Ee),We.of=function(){var t=e.call(arguments,0);return ot().withMutations((function(e){for(var n=0;n=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}}))},We.prototype.toString=function(){return this.__toString("Map {","}")},We.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},We.prototype.set=function(e,t){return at(this,e,t)},We.prototype.setIn=function(e,t){return this.updateIn(e,b,(function(){return t}))},We.prototype.remove=function(e){return at(this,e,b)},We.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return b}))},We.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},We.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=vt(this,wn(e),t,n);return r===b?void 0:r},We.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):ot()},We.prototype.merge=function(){return ft(this,void 0,arguments)},We.prototype.mergeWith=function(t){return ft(this,t,e.call(arguments,1))},We.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,ot(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},We.prototype.mergeDeep=function(){return ft(this,ht,arguments)},We.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return ft(this,dt(t),n)},We.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,ot(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},We.prototype.sort=function(e){return zt(pn(this,e))},We.prototype.sortBy=function(e,t){return zt(pn(this,t,e))},We.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},We.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new S)},We.prototype.asImmutable=function(){return this.__ensureOwner()},We.prototype.wasAltered=function(){return this.__altered},We.prototype.__iterator=function(e,t){return new et(this,e,t)},We.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},We.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?rt(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},We.isMap=He;var $e,Je="@@__IMMUTABLE_MAP__@@",Ke=We.prototype;function Ye(e,t){this.ownerID=e,this.entries=t}function Ge(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Ze(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Xe(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Qe(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function et(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&nt(e._root)}function tt(e,t){return U(e,t[0],t[1])}function nt(e,t){return{node:e,index:0,__prev:t}}function rt(e,t,n,r){var o=Object.create(Ke);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function ot(){return $e||($e=rt(0))}function at(e,t,n){var r,o;if(e._root){var a=w(_),i=w(x);if(r=it(e._root,e.__ownerID,0,void 0,t,n,a,i),!i.value)return e;o=e.size+(a.value?n===b?-1:1:0)}else{if(n===b)return e;o=1,r=new Ye(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?rt(o,r):ot()}function it(e,t,n,r,o,a,i,s){return e?e.update(t,n,r,o,a,i,s):a===b?e:(E(s),E(i),new Qe(t,r,[o,a]))}function st(e){return e.constructor===Qe||e.constructor===Xe}function ut(e,t,n,r,o){if(e.keyHash===r)return new Xe(t,r,[e.entry,o]);var a,i=(0===n?e.keyHash:e.keyHash>>>n)&y,s=(0===n?r:r>>>n)&y;return new Ge(t,1<>>=1)i[s]=1&n?t[a++]:void 0;return i[r]=o,new Ze(e,a+1,i)}function ft(e,t,n){for(var o=[],a=0;a>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function yt(e,t,n,r){var o=r?e:C(e);return o[t]=n,o}function bt(e,t,n,r){var o=e.length+1;if(r&&t+1===o)return e[t]=n,e;for(var a=new Array(o),i=0,s=0;s=xt)return ct(e,u,r,o);var f=e&&e===this.ownerID,h=f?u:C(u);return p?s?c===l-1?h.pop():h[c]=h.pop():h[c]=[r,o]:h.push([r,o]),f?(this.entries=h,this):new Ye(e,h)}},Ge.prototype.get=function(e,t,n,r){void 0===t&&(t=ke(n));var o=1<<((0===e?t:t>>>e)&y),a=this.bitmap;return 0==(a&o)?r:this.nodes[gt(a&o-1)].get(e+v,t,n,r)},Ge.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=ke(r));var s=(0===t?n:n>>>t)&y,u=1<=wt)return pt(e,f,c,s,d);if(l&&!d&&2===f.length&&st(f[1^p]))return f[1^p];if(l&&d&&1===f.length&&st(d))return d;var m=e&&e===this.ownerID,g=l?d?c:c^u:c|u,_=l?d?yt(f,p,d,m):_t(f,p,m):bt(f,p,d,m);return m?(this.bitmap=g,this.nodes=_,this):new Ge(e,g,_)},Ze.prototype.get=function(e,t,n,r){void 0===t&&(t=ke(n));var o=(0===e?t:t>>>e)&y,a=this.nodes[o];return a?a.get(e+v,t,n,r):r},Ze.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=ke(r));var s=(0===t?n:n>>>t)&y,u=o===b,c=this.nodes,l=c[s];if(u&&!l)return this;var p=it(l,e,t+v,n,r,o,a,i);if(p===l)return this;var f=this.count;if(l){if(!p&&--f0&&r=0&&e>>t&y;if(r>=this.array.length)return new kt([],e);var o,a=0===r;if(t>0){var i=this.array[r];if((o=i&&i.removeBefore(e,t-v,n))===i&&a)return this}if(a&&!o)return this;var s=Lt(this,e);if(!a)for(var u=0;u>>t&y;if(o>=this.array.length)return this;if(t>0){var a=this.array[o];if((r=a&&a.removeAfter(e,t-v,n))===a&&o===this.array.length-1)return this}var i=Lt(this,e);return i.array.splice(o+1),r&&(i.array[o]=r),i};var jt,Tt,It={};function Pt(e,t){var n=e._origin,r=e._capacity,o=qt(r),a=e._tail;return i(e._root,e._level,0);function i(e,t,n){return 0===t?s(e,n):u(e,t,n)}function s(e,i){var s=i===o?a&&a.array:e&&e.array,u=i>n?0:n-i,c=r-i;return c>g&&(c=g),function(){if(u===c)return It;var e=t?--c:u++;return s&&s[e]}}function u(e,o,a){var s,u=e&&e.array,c=a>n?0:n-a>>o,l=1+(r-a>>o);return l>g&&(l=g),function(){for(;;){if(s){var e=s();if(e!==It)return e;s=null}if(c===l)return It;var n=t?--l:c++;s=i(u&&u[n],o-v,a+(n<=e.size||t<0)return e.withMutations((function(e){t<0?Ft(e,t).set(0,n):Ft(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,o=e._root,a=w(x);return t>=qt(e._capacity)?r=Dt(r,e.__ownerID,0,t,n,a):o=Dt(o,e.__ownerID,e._level,t,n,a),a.value?e.__ownerID?(e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Nt(e._origin,e._capacity,e._level,o,r):e}function Dt(e,t,n,r,o,a){var i,s=r>>>n&y,u=e&&s0){var c=e&&e.array[s],l=Dt(c,t,n-v,r,o,a);return l===c?e:((i=Lt(e,t)).array[s]=l,i)}return u&&e.array[s]===o?e:(E(a),i=Lt(e,t),void 0===o&&s===i.array.length-1?i.array.pop():i.array[s]=o,i)}function Lt(e,t){return t&&e&&t===e.ownerID?e:new kt(e?e.array.slice():[],t)}function Bt(e,t){if(t>=qt(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&y],r-=v;return n}}function Ft(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new S,o=e._origin,a=e._capacity,i=o+t,s=void 0===n?a:n<0?a+n:o+n;if(i===o&&s===a)return e;if(i>=s)return e.clear();for(var u=e._level,c=e._root,l=0;i+l<0;)c=new kt(c&&c.array.length?[void 0,c]:[],r),l+=1<<(u+=v);l&&(i+=l,o+=l,s+=l,a+=l);for(var p=qt(a),f=qt(s);f>=1<p?new kt([],r):h;if(h&&f>p&&iv;g-=v){var b=p>>>g&y;m=m.array[b]=Lt(m.array[b],r)}m.array[p>>>v&y]=h}if(s=f)i-=f,s-=f,u=v,c=null,d=d&&d.removeBefore(r,0,i);else if(i>o||f>>u&y;if(_!==f>>>u&y)break;_&&(l+=(1<o&&(c=c.removeBefore(r,u,i-l)),c&&fa&&(a=c.size),i(u)||(c=c.map((function(e){return he(e)}))),r.push(c)}return a>e.size&&(e=e.setSize(a)),mt(e,t,r)}function qt(e){return e>>v<=g&&i.size>=2*a.size?(r=(o=i.filter((function(e,t){return void 0!==e&&s!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=a.remove(t),o=s===i.size-1?i.pop():i.set(s,void 0))}else if(u){if(n===i.get(s)[1])return e;r=a,o=i.set(s,[t,n])}else r=a.set(t,i.size),o=i.set(i.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):Wt(r,o)}function Jt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Kt(e){this._iter=e,this.size=e.size}function Yt(e){this._iter=e,this.size=e.size}function Gt(e){this._iter=e,this.size=e.size}function Zt(e){var t=bn(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=_n,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(t===R){var r=e.__iterator(t,n);return new F((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(t===M?N:M,n)},t}function Xt(e,t,n){var r=bn(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,o){var a=e.get(r,b);return a===b?o:t.call(n,a,r,e)},r.__iterateUncached=function(r,o){var a=this;return e.__iterate((function(e,o,i){return!1!==r(t.call(n,e,o,i),o,a)}),o)},r.__iteratorUncached=function(r,o){var a=e.__iterator(R,o);return new F((function(){var o=a.next();if(o.done)return o;var i=o.value,s=i[0];return U(r,s,t.call(n,i[1],s,e),o)}))},r}function Qt(e,t){var n=bn(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Zt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=_n,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function en(e,t,n,r){var o=bn(e);return r&&(o.has=function(r){var o=e.get(r,b);return o!==b&&!!t.call(n,o,r,e)},o.get=function(r,o){var a=e.get(r,b);return a!==b&&t.call(n,a,r,e)?a:o}),o.__iterateUncached=function(o,a){var i=this,s=0;return e.__iterate((function(e,a,u){if(t.call(n,e,a,u))return s++,o(e,r?a:s-1,i)}),a),s},o.__iteratorUncached=function(o,a){var i=e.__iterator(R,a),s=0;return new F((function(){for(;;){var a=i.next();if(a.done)return a;var u=a.value,c=u[0],l=u[1];if(t.call(n,l,c,e))return U(o,r?c:s++,l,a)}}))},o}function tn(e,t,n){var r=We().asMutable();return e.__iterate((function(o,a){r.update(t.call(n,o,a,e),0,(function(e){return e+1}))})),r.asImmutable()}function nn(e,t,n){var r=s(e),o=(l(e)?zt():We()).asMutable();e.__iterate((function(a,i){o.update(t.call(n,a,i,e),(function(e){return(e=e||[]).push(r?[i,a]:a),e}))}));var a=yn(e);return o.map((function(t){return mn(e,a(t))}))}function rn(e,t,n,r){var o=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=o:n|=0),j(t,n,o))return e;var a=T(t,o),i=I(n,o);if(a!=a||i!=i)return rn(e.toSeq().cacheResult(),t,n,r);var s,u=i-a;u==u&&(s=u<0?0:u);var c=bn(e);return c.size=0===s?s:e.size&&s||void 0,!r&&ae(e)&&s>=0&&(c.get=function(t,n){return(t=O(this,t))>=0&&ts)return q();var e=o.next();return r||t===M?e:U(t,u-1,t===N?void 0:e.value[1],e)}))},c}function on(e,t,n){var r=bn(e);return r.__iterateUncached=function(r,o){var a=this;if(o)return this.cacheResult().__iterate(r,o);var i=0;return e.__iterate((function(e,o,s){return t.call(n,e,o,s)&&++i&&r(e,o,a)})),i},r.__iteratorUncached=function(r,o){var a=this;if(o)return this.cacheResult().__iterator(r,o);var i=e.__iterator(R,o),s=!0;return new F((function(){if(!s)return q();var e=i.next();if(e.done)return e;var o=e.value,u=o[0],c=o[1];return t.call(n,c,u,a)?r===R?e:U(r,u,c,e):(s=!1,q())}))},r}function an(e,t,n,r){var o=bn(e);return o.__iterateUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterate(o,a);var s=!0,u=0;return e.__iterate((function(e,a,c){if(!s||!(s=t.call(n,e,a,c)))return u++,o(e,r?a:u-1,i)})),u},o.__iteratorUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterator(o,a);var s=e.__iterator(R,a),u=!0,c=0;return new F((function(){var e,a,l;do{if((e=s.next()).done)return r||o===M?e:U(o,c++,o===N?void 0:e.value[1],e);var p=e.value;a=p[0],l=p[1],u&&(u=t.call(n,l,a,i))}while(u);return o===R?e:U(o,a,l,e)}))},o}function sn(e,t){var n=s(e),o=[e].concat(t).map((function(e){return i(e)?n&&(e=r(e)):e=n?se(e):ue(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===o.length)return e;if(1===o.length){var a=o[0];if(a===e||n&&s(a)||u(e)&&u(a))return a}var c=new te(o);return n?c=c.toKeyedSeq():u(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=o.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),c}function un(e,t,n){var r=bn(e);return r.__iterateUncached=function(r,o){var a=0,s=!1;function u(e,c){var l=this;e.__iterate((function(e,o){return(!t||c0}function dn(e,t,r){var o=bn(e);return o.size=new te(r).map((function(e){return e.size})).min(),o.__iterate=function(e,t){for(var n,r=this.__iterator(M,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},o.__iteratorUncached=function(e,o){var a=r.map((function(e){return e=n(e),W(o?e.reverse():e)})),i=0,s=!1;return new F((function(){var n;return s||(n=a.map((function(e){return e.next()})),s=n.some((function(e){return e.done}))),s?q():U(e,i++,t.apply(null,n.map((function(e){return e.value}))))}))},o}function mn(e,t){return ae(e)?t:e.constructor(t)}function vn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function gn(e){return Ve(e.size),A(e)}function yn(e){return s(e)?r:u(e)?o:a}function bn(e){return Object.create((s(e)?K:u(e)?Y:G).prototype)}function _n(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):J.prototype.cacheResult.call(this)}function xn(e,t){return e>t?1:e=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Kn(e,t)},Vn.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;Ve(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Kn(t,n)},Vn.prototype.pop=function(){return this.slice(1)},Vn.prototype.unshift=function(){return this.push.apply(this,arguments)},Vn.prototype.unshiftAll=function(e){return this.pushAll(e)},Vn.prototype.shift=function(){return this.pop.apply(this,arguments)},Vn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Yn()},Vn.prototype.slice=function(e,t){if(j(e,t,this.size))return this;var n=T(e,this.size);if(I(t,this.size)!==this.size)return Se.prototype.slice.call(this,e,t);for(var r=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):Kn(r,o)},Vn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Kn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Vn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Vn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new F((function(){if(r){var t=r.value;return r=r.next,U(e,n++,t)}return q()}))},Vn.isStack=Wn;var Hn,$n="@@__IMMUTABLE_STACK__@@",Jn=Vn.prototype;function Kn(e,t,n,r){var o=Object.create(Jn);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Yn(){return Hn||(Hn=Kn(0))}function Gn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}Jn[$n]=!0,Jn.withMutations=Ke.withMutations,Jn.asMutable=Ke.asMutable,Jn.asImmutable=Ke.asImmutable,Jn.wasAltered=Ke.wasAltered,n.Iterator=F,Gn(n,{toArray:function(){Ve(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new Kt(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new Jt(this,!0)},toMap:function(){return We(this.toKeyedSeq())},toObject:function(){Ve(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return zt(this.toKeyedSeq())},toOrderedSet:function(){return Ln(s(this)?this.valueSeq():this)},toSet:function(){return jn(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Yt(this)},toSeq:function(){return u(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Vn(s(this)?this.valueSeq():this)},toList:function(){return St(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return mn(this,sn(this,e.call(arguments,0)))},includes:function(e){return this.some((function(t){return ge(t,e)}))},entries:function(){return this.__iterator(R)},every:function(e,t){Ve(this.size);var n=!0;return this.__iterate((function(r,o,a){if(!e.call(t,r,o,a))return n=!1,!1})),n},filter:function(e,t){return mn(this,en(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return Ve(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Ve(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(N)},map:function(e,t){return mn(this,Xt(this,e,t))},reduce:function(e,t,n){var r,o;return Ve(this.size),arguments.length<2?o=!0:r=t,this.__iterate((function(t,a,i){o?(o=!1,r=t):r=e.call(n,r,t,a,i)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return mn(this,Qt(this,!0))},slice:function(e,t){return mn(this,rn(this,e,t,!0))},some:function(e,t){return!this.every(tr(e),t)},sort:function(e){return mn(this,pn(this,e))},values:function(){return this.__iterator(M)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return A(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return tn(this,e,t)},equals:function(e){return ye(this,e)},entrySeq:function(){var e=this;if(e._cache)return new te(e._cache);var t=e.toSeq().map(er).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(tr(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate((function(n,o,a){if(e.call(t,n,o,a))return r=[o,n],!1})),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(k)},flatMap:function(e,t){return mn(this,cn(this,e,t))},flatten:function(e){return mn(this,un(this,e,!0))},fromEntrySeq:function(){return new Gt(this)},get:function(e,t){return this.find((function(t,n){return ge(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,o=wn(e);!(n=o.next()).done;){var a=n.value;if((r=r&&r.get?r.get(a,b):b)===b)return t}return r},groupBy:function(e,t){return nn(this,e,t)},has:function(e){return this.get(e,b)!==b},hasIn:function(e){return this.getIn(e,b)!==b},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return ge(t,e)}))},keySeq:function(){return this.toSeq().map(Qn).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return fn(this,e)},maxBy:function(e,t){return fn(this,t,e)},min:function(e){return fn(this,e?nr(e):ar)},minBy:function(e,t){return fn(this,t?nr(t):ar,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return mn(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return mn(this,an(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(tr(e),t)},sortBy:function(e,t){return mn(this,pn(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return mn(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return mn(this,on(this,e,t))},takeUntil:function(e,t){return this.takeWhile(tr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=ir(this))}});var Zn=n.prototype;Zn[p]=!0,Zn[B]=Zn.values,Zn.__toJS=Zn.toArray,Zn.__toStringMapper=rr,Zn.inspect=Zn.toSource=function(){return this.toString()},Zn.chain=Zn.flatMap,Zn.contains=Zn.includes,Gn(r,{flip:function(){return mn(this,Zt(this))},mapEntries:function(e,t){var n=this,r=0;return mn(this,this.toSeq().map((function(o,a){return e.call(t,[a,o],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return mn(this,this.toSeq().flip().map((function(r,o){return e.call(t,r,o,n)})).flip())}});var Xn=r.prototype;function Qn(e,t){return t}function er(e,t){return[t,e]}function tr(e){return function(){return!e.apply(this,arguments)}}function nr(e){return function(){return-e.apply(this,arguments)}}function rr(e){return"string"==typeof e?JSON.stringify(e):String(e)}function or(){return C(arguments)}function ar(e,t){return et?-1:0}function ir(e){if(e.size===1/0)return 0;var t=l(e),n=s(e),r=t?1:0;return sr(e.__iterate(n?t?function(e,t){r=31*r+ur(ke(e),ke(t))|0}:function(e,t){r=r+ur(ke(e),ke(t))|0}:t?function(e){r=31*r+ke(e)|0}:function(e){r=r+ke(e)|0}),r)}function sr(e,t){return t=Ae(t,3432918353),t=Ae(t<<15|t>>>-15,461845907),t=Ae(t<<13|t>>>-13,5),t=Ae((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=Oe((t=Ae(t^t>>>13,3266489909))^t>>>16)}function ur(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Xn[f]=!0,Xn[B]=Zn.entries,Xn.__toJS=Zn.toObject,Xn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+rr(e)},Gn(o,{toKeyedSeq:function(){return new Jt(this,!1)},filter:function(e,t){return mn(this,en(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return mn(this,Qt(this,!1))},slice:function(e,t){return mn(this,rn(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=T(e,e<0?this.count():this.size);var r=this.slice(0,e);return mn(this,1===n?r:r.concat(C(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return mn(this,un(this,e,!1))},get:function(e,t){return(e=O(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=O(this,e))>=0&&(void 0!==this.size?this.size===1/0||e1)try{return decodeURIComponent(t[1])}catch(e){console.error(e)}return null}function Ne(e){return t=e.replace(/\.[^./]*$/,""),Y()(J()(t));var t}function Me(e,t,n,r,a){if(!t)return[];var s=[],u=t.get("nullable"),c=t.get("required"),p=t.get("maximum"),h=t.get("minimum"),d=t.get("type"),m=t.get("format"),g=t.get("maxLength"),b=t.get("minLength"),x=t.get("uniqueItems"),w=t.get("maxItems"),E=t.get("minItems"),S=t.get("pattern"),C=n||!0===c,A=null!=e;if(u&&null===e||!d||!(C||A&&"array"===d||!(!C&&!A)))return[];var O="string"===d&&e,k="array"===d&&l()(e)&&e.length,j="array"===d&&W.a.List.isList(e)&&e.count(),T=[O,k,j,"array"===d&&"string"==typeof e&&e,"file"===d&&e instanceof se.a.File,"boolean"===d&&(e||!1===e),"number"===d&&(e||0===e),"integer"===d&&(e||0===e),"object"===d&&"object"===i()(e)&&null!==e,"object"===d&&"string"==typeof e&&e],I=P()(T).call(T,(function(e){return!!e}));if(C&&!I&&!r)return s.push("Required field is not provided"),s;if("object"===d&&(null===a||"application/json"===a)){var N,M=e;if("string"==typeof e)try{M=JSON.parse(e)}catch(e){return s.push("Parameter string value must be valid JSON"),s}if(t&&t.has("required")&&Se(c.isList)&&c.isList()&&y()(c).call(c,(function(e){void 0===M[e]&&s.push({propKey:e,error:"Required property not found"})})),t&&t.has("properties"))y()(N=t.get("properties")).call(N,(function(e,t){var n=Me(M[t],e,!1,r,a);s.push.apply(s,o()(f()(n).call(n,(function(e){return{propKey:t,error:e}}))))}))}if(S){var R=function(e,t){if(!new RegExp(t).test(e))return"Value must follow pattern "+t}(e,S);R&&s.push(R)}if(E&&"array"===d){var D=function(e,t){var n;if(!e&&t>=1||e&&e.lengtht)return v()(n="Array must not contain more then ".concat(t," item")).call(n,1===t?"":"s")}(e,w);L&&s.push({needRemove:!0,error:L})}if(x&&"array"===d){var B=function(e,t){if(e&&("true"===t||!0===t)){var n=Object(V.fromJS)(e),r=n.toSet();if(e.length>r.size){var o=Object(V.Set)();if(y()(n).call(n,(function(e,t){_()(n).call(n,(function(t){return Se(t.equals)?t.equals(e):t===e})).size>1&&(o=o.add(t))})),0!==o.size)return f()(o).call(o,(function(e){return{index:e,error:"No duplicates allowed."}})).toArray()}}}(e,x);B&&s.push.apply(s,o()(B))}if(g||0===g){var F=function(e,t){var n;if(e.length>t)return v()(n="Value must be no longer than ".concat(t," character")).call(n,1!==t?"s":"")}(e,g);F&&s.push(F)}if(b){var U=function(e,t){var n;if(e.lengtht)return"Value must be less than ".concat(t)}(e,p);q&&s.push(q)}if(h||0===h){var z=function(e,t){if(e2&&void 0!==arguments[2]?arguments[2]:{},r=n.isOAS3,o=void 0!==r&&r,a=n.bypassRequiredCheck,i=void 0!==a&&a,s=e.get("required"),u=Object(le.a)(e,{isOAS3:o}),c=u.schema,l=u.parameterContentMediaType;return Me(t,c,s,i,l)},De=function(e,t,n){if(e&&(!e.xml||!e.xml.name)){if(e.xml=e.xml||{},!e.$$ref)return e.type||e.items||e.properties||e.additionalProperties?'\n\x3c!-- XML example cannot be generated; root element name is undefined --\x3e':null;var r=e.$$ref.match(/\S*\/(\S+)$/);e.xml.name=r[1]}return Object(ie.memoizedCreateXMLExample)(e,t,n)},Le=[{when:/json/,shouldStringifyTypes:["string"]}],Be=["object"],Fe=function(e,t,n,r){var a=Object(ie.memoizedSampleFromSchema)(e,t,r),s=i()(a),u=S()(Le).call(Le,(function(e,t){var r;return t.when.test(n)?v()(r=[]).call(r,o()(e),o()(t.shouldStringifyTypes)):e}),Be);return te()(u,(function(e){return e===s}))?M()(a,null,2):a},Ue=function(e,t,n,r){var o,a=Fe(e,t,n,r);try{"\n"===(o=ve.a.safeDump(ve.a.safeLoad(a),{lineWidth:-1}))[o.length-1]&&(o=T()(o).call(o,0,o.length-1))}catch(e){return console.error(e),"error: could not generate yaml example"}return o.replace(/\t/g," ")},qe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;return e&&Se(e.toJS)&&(e=e.toJS()),r&&Se(r.toJS)&&(r=r.toJS()),/xml/.test(t)?De(e,n,r):/(yaml|yml)/.test(t)?Ue(e,n,t,r):Fe(e,n,t,r)},ze=function(){var e={},t=se.a.location.search;if(!t)return{};if(""!=t){var n=t.substr(1).split("&");for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(r=n[r].split("="),e[decodeURIComponent(r[0])]=r[1]&&decodeURIComponent(r[1])||"")}return e},Ve=function(t){return(t instanceof e?t:e.from(t.toString(),"utf-8")).toString("base64")},We={operationsSorter:{alpha:function(e,t){return e.get("path").localeCompare(t.get("path"))},method:function(e,t){return e.get("method").localeCompare(t.get("method"))}},tagsSorter:{alpha:function(e,t){return e.localeCompare(t)}}},He=function(e){var t=[];for(var n in e){var r=e[n];void 0!==r&&""!==r&&t.push([n,"=",encodeURIComponent(r).replace(/%20/g,"+")].join(""))}return t.join("&")},$e=function(e,t,n){return!!Q()(n,(function(n){return re()(e[n],t[n])}))};function Je(e){return"string"!=typeof e||""===e?"":Object(H.sanitizeUrl)(e)}function Ke(e){return!(!e||D()(e).call(e,"localhost")>=0||D()(e).call(e,"127.0.0.1")>=0||"none"===e)}function Ye(e){if(!W.a.OrderedMap.isOrderedMap(e))return null;if(!e.size)return null;var t=B()(e).call(e,(function(e,t){return U()(t).call(t,"2")&&w()(e.get("content")||{}).length>0})),n=e.get("default")||W.a.OrderedMap(),r=(n.get("content")||W.a.OrderedMap()).keySeq().toJS().length?n:null;return t||r}var Ge=function(e){return"string"==typeof e||e instanceof String?z()(e).call(e).replace(/\s/g,"%20"):""},Ze=function(e){return ce()(Ge(e).replace(/%20/g,"_"))},Xe=function(e){return _()(e).call(e,(function(e,t){return/^x-/.test(t)}))},Qe=function(e){return _()(e).call(e,(function(e,t){return/^pattern|maxLength|minLength|maximum|minimum/.test(t)}))};function et(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0};if("object"!==i()(e)||l()(e)||null===e||!t)return e;var o=A()({},e);return y()(n=w()(o)).call(n,(function(e){e===t&&r(o[e],e)?delete o[e]:o[e]=et(o[e],t,r)})),o}function tt(e){if("string"==typeof e)return e;if(e&&e.toJS&&(e=e.toJS()),"object"===i()(e)&&null!==e)try{return M()(e,null,2)}catch(t){return String(e)}return null==e?"":e.toString()}function nt(e){return"number"==typeof e?e.toString():e}function rt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.returnAll,r=void 0!==n&&n,o=t.allowHashes,a=void 0===o||o;if(!W.a.Map.isMap(e))throw new Error("paramToIdentifier: received a non-Im.Map parameter as input");var i,s,u,c=e.get("name"),l=e.get("in"),p=[];e&&e.hashCode&&l&&c&&a&&p.push(v()(i=v()(s="".concat(l,".")).call(s,c,".hash-")).call(i,e.hashCode()));l&&c&&p.push(v()(u="".concat(l,".")).call(u,c));return p.push(c),r?p:p[0]||""}function ot(e,t){var n,r=rt(e,{returnAll:!0});return _()(n=f()(r).call(r,(function(e){return t[e]}))).call(n,(function(e){return void 0!==e}))[0]}function at(){return st(fe()(32).toString("base64"))}function it(e){return st(de()("sha256").update(e).digest("base64"))}function st(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var ut=function(e){return!e||!(!ye(e)||!e.isEmpty())}}).call(this,n(65).Buffer)},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(247);function o(e,t){for(var n=0;n1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:r,n=null,a=null;return function(){return o(t,n,arguments)||(a=e.apply(null,arguments)),n=arguments,a}}))},function(e,t,n){e.exports=n(674)},function(e,t,n){var r=n(181),o=n(582);function a(t){return"function"==typeof r&&"symbol"==typeof o?(e.exports=a=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=a=function(e){return e&&"function"==typeof r&&e.constructor===r&&e!==r.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),a(t)}e.exports=a,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(608)},function(e,t,n){e.exports=n(606)},function(e,t,n){"use strict";var r=n(40),o=n(107).f,a=n(369),i=n(33),s=n(110),u=n(70),c=n(54),l=function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,p,f,h,d,m,v,g,y=e.target,b=e.global,_=e.stat,x=e.proto,w=b?r:_?r[y]:(r[y]||{}).prototype,E=b?i:i[y]||(i[y]={}),S=E.prototype;for(f in t)n=!a(b?f:y+(_?".":"#")+f,e.forced)&&w&&c(w,f),d=E[f],n&&(m=e.noTargetGet?(g=o(w,f))&&g.value:w[f]),h=n&&m?m:t[f],n&&typeof d==typeof h||(v=e.bind&&n?s(h,r):e.wrap&&n?l(h):x&&"function"==typeof h?s(Function.call,h):h,(e.sham||h&&h.sham||d&&d.sham)&&u(v,"sham",!0),E[f]=v,x&&(c(i,p=y+"Prototype")||u(i,p,{}),i[p][f]=h,e.real&&S&&!S[f]&&u(S,f,h)))}},function(e,t,n){e.exports=n(611)},function(e,t,n){e.exports=n(408)},function(e,t,n){var r=n(457),o=n(458),a=n(881),i=n(459),s=n(886),u=n(888),c=n(893),l=n(247),p=n(3);function f(e,t){var n=r(e);if(o){var s=o(e);t&&(s=a(s).call(s,(function(t){return i(e,t).enumerable}))),n.push.apply(n,s)}return n}e.exports=function(e){for(var t=1;t>",i=function(){invariant(!1,"ImmutablePropTypes type checking code is stripped in production.")};i.isRequired=i;var s=function(){return i};function u(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":e instanceof o.Iterable?"Immutable."+e.toSource().split(" ")[0]:t}function c(e){function t(t,n,r,o,i,s){for(var u=arguments.length,c=Array(u>6?u-6:0),l=6;l4)}function l(e){var t=e.get("swagger");return"string"==typeof t&&i()(t).call(t,"2.0")}function p(e){return function(t,n){return function(r){return n&&n.specSelectors&&n.specSelectors.specJson?c(n.specSelectors.specJson())?u.a.createElement(e,o()({},r,n,{Ori:t})):u.a.createElement(t,r):(console.warn("OAS3 wrapper: couldn't get spec"),null)}}}},function(e,t,n){e.exports=n(602)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=i(e),c=1;c0){var o=v()(n).call(n,(function(e){return console.error(e),e.line=e.fullPath?_(x,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",y()(e,"message",{enumerable:!0,value:e.message}),e}));a.newThrownErrBatch(o)}return r.updateResolved(t)}))}},Se=[],Ce=G()(u()(f.a.mark((function e(){var t,n,r,o,a,i,s,c,l,p,h,m,g,b,x,E,C,O;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Se.system){e.next=4;break}return console.error("debResolveSubtrees: don't have a system to operate on, aborting."),e.abrupt("return");case 4:if(n=t.errActions,r=t.errSelectors,o=t.fn,a=o.resolveSubtree,i=o.fetch,s=o.AST,c=void 0===s?{}:s,l=t.specSelectors,p=t.specActions,a){e.next=8;break}return console.error("Error: Swagger-Client did not provide a `resolveSubtree` method, doing nothing."),e.abrupt("return");case 8:return h=c.getLineNumberForPath?c.getLineNumberForPath:function(){},m=l.specStr(),g=t.getConfigs(),b=g.modelPropertyMacro,x=g.parameterMacro,E=g.requestInterceptor,C=g.responseInterceptor,e.prev=11,e.next=14,_()(Se).call(Se,function(){var e=u()(f.a.mark((function e(t,o){var s,c,p,g,_,O,j,T,I;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return s=e.sent,c=s.resultMap,p=s.specWithCurrentSubtrees,e.next=7,a(p,o,{baseDoc:l.url(),modelPropertyMacro:b,parameterMacro:x,requestInterceptor:E,responseInterceptor:C});case 7:if(g=e.sent,_=g.errors,O=g.spec,r.allErrors().size&&n.clearBy((function(e){var t;return"thrown"!==e.get("type")||"resolver"!==e.get("source")||!w()(t=e.get("fullPath")).call(t,(function(e,t){return e===o[t]||void 0===o[t]}))})),d()(_)&&_.length>0&&(j=v()(_).call(_,(function(e){return e.line=e.fullPath?h(m,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",y()(e,"message",{enumerable:!0,value:e.message}),e})),n.newThrownErrBatch(j)),!O||!l.isOAS3()||"components"!==o[0]||"securitySchemes"!==o[1]){e.next=15;break}return e.next=15,S.a.all(v()(T=A()(I=k()(O)).call(I,(function(e){return"openIdConnect"===e.type}))).call(T,function(){var e=u()(f.a.mark((function e(t){var n,r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={url:t.openIdConnectUrl,requestInterceptor:E,responseInterceptor:C},e.prev=1,e.next=4,i(n);case 4:(r=e.sent)instanceof Error||r.status>=400?console.error(r.statusText+" "+n.url):t.openIdConnectData=JSON.parse(r.text),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),console.error(e.t0);case 11:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()));case 15:return X()(c,o,O),X()(p,o,O),e.abrupt("return",{resultMap:c,specWithCurrentSubtrees:p});case 18:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),S.a.resolve({resultMap:(l.specResolvedSubtree([])||Object(V.Map)()).toJS(),specWithCurrentSubtrees:l.specJson().toJS()}));case 14:O=e.sent,delete Se.system,Se=[],e.next=22;break;case 19:e.prev=19,e.t0=e.catch(11),console.error(e.t0);case 22:p.updateResolvedSubtree([],O.resultMap);case 23:case"end":return e.stop()}}),e,null,[[11,19]])}))),35),Ae=function(e){return function(t){var n;T()(n=v()(Se).call(Se,(function(e){return e.join("@@")}))).call(n,e.join("@@"))>-1||(Se.push(e),Se.system=t,Ce())}};function Oe(e,t,n,r,o){return{type:re,payload:{path:e,value:r,paramName:t,paramIn:n,isXml:o}}}function ke(e,t,n,r){return{type:re,payload:{path:e,param:t,value:n,isXml:r}}}var je=function(e,t){return{type:me,payload:{path:e,value:t}}},Te=function(){return{type:me,payload:{path:[],value:Object(V.Map)()}}},Ie=function(e,t){return{type:ae,payload:{pathMethod:e,isOAS3:t}}},Pe=function(e,t,n,r){return{type:oe,payload:{pathMethod:e,paramName:t,paramIn:n,includeEmptyValue:r}}};function Ne(e){return{type:fe,payload:{pathMethod:e}}}function Me(e,t){return{type:he,payload:{path:e,value:t,key:"consumes_value"}}}function Re(e,t){return{type:he,payload:{path:e,value:t,key:"produces_value"}}}var De=function(e,t,n){return{payload:{path:e,method:t,res:n},type:ie}},Le=function(e,t,n){return{payload:{path:e,method:t,req:n},type:se}},Be=function(e,t,n){return{payload:{path:e,method:t,req:n},type:ue}},Fe=function(e){return{payload:e,type:ce}},Ue=function(e){return function(t){var n,r,o=t.fn,a=t.specActions,i=t.specSelectors,s=t.getConfigs,c=t.oas3Selectors,l=e.pathName,p=e.method,h=e.operation,m=s(),g=m.requestInterceptor,y=m.responseInterceptor,b=h.toJS();h&&h.get("parameters")&&P()(n=A()(r=h.get("parameters")).call(r,(function(e){return e&&!0===e.get("allowEmptyValue")}))).call(n,(function(t){if(i.parameterInclusionSettingFor([l,p],t.get("name"),t.get("in"))){e.parameters=e.parameters||{};var n=Object(Q.B)(t,e.parameters);(!n||n&&0===n.size)&&(e.parameters[t.get("name")]="")}}));if(e.contextUrl=H()(i.url()).toString(),b&&b.operationId?e.operationId=b.operationId:b&&l&&p&&(e.operationId=o.opId(b,l,p)),i.isOAS3()){var _,x=M()(_="".concat(l,":")).call(_,p);e.server=c.selectedServer(x)||c.selectedServer();var w=c.serverVariables({server:e.server,namespace:x}).toJS(),E=c.serverVariables({server:e.server}).toJS();e.serverVariables=D()(w).length?w:E,e.requestContentType=c.requestContentType(l,p),e.responseContentType=c.responseContentType(l,p)||"*/*";var S,C=c.requestBodyValue(l,p),O=c.requestBodyInclusionSetting(l,p);if(C&&C.toJS)e.requestBody=A()(S=v()(C).call(C,(function(e){return V.Map.isMap(e)?e.get("value"):e}))).call(S,(function(e,t){return(d()(e)?0!==e.length:!Object(Q.q)(e))||O.get(t)})).toJS();else e.requestBody=C}var k=B()({},e);k=o.buildRequest(k),a.setRequest(e.pathName,e.method,k);var j=function(){var t=u()(f.a.mark((function t(n){var r,o;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,g.apply(undefined,[n]);case 2:return r=t.sent,o=B()({},r),a.setMutatedRequest(e.pathName,e.method,o),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();e.requestInterceptor=j,e.responseInterceptor=y;var T=U()();return o.execute(e).then((function(t){t.duration=U()()-T,a.setResponse(e.pathName,e.method,t)})).catch((function(t){"Failed to fetch"===t.message&&(t.name="",t.message='**Failed to fetch.** \n**Possible Reasons:** \n - CORS \n - Network Failure \n - URL scheme must be "http" or "https" for CORS request.'),a.setResponse(e.pathName,e.method,{error:!0,err:Object($.serializeError)(t)})}))}},qe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.path,n=e.method,r=i()(e,["path","method"]);return function(e){var a=e.fn.fetch,i=e.specSelectors,s=e.specActions,u=i.specJsonWithResolvedSubtrees().toJS(),c=i.operationScheme(t,n),l=i.contentTypeValues([t,n]).toJS(),p=l.requestContentType,f=l.responseContentType,h=/xml/i.test(p),d=i.parameterValues([t,n],h).toJS();return s.executeRequest(o()(o()({},r),{},{fetch:a,spec:u,pathName:t,method:n,parameters:d,requestContentType:p,scheme:c,responseContentType:f}))}};function ze(e,t){return{type:le,payload:{path:e,method:t}}}function Ve(e,t){return{type:pe,payload:{path:e,method:t}}}function We(e,t,n){return{type:ve,payload:{scheme:e,path:t,method:n}}}},function(e,t,n){var r=n(33),o=n(54),a=n(243),i=n(71).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||i(t,e,{value:a.f(e)})}},function(e,t,n){"use strict";var r=n(167),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],a=["scalar","sequence","mapping"];e.exports=function(e,t){var n,i;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===o.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,i={},null!==n&&Object.keys(n).forEach((function(e){n[e].forEach((function(t){i[String(t)]=e}))})),i),-1===a.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},function(e,t,n){var r=n(37);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(181),o=n(250),a=n(249),i=n(190);e.exports=function(e,t){var n=void 0!==r&&o(e)||e["@@iterator"];if(!n){if(a(e)||(n=i(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var s=0,u=function(){};return{s:u,n:function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}},e:function(e){throw e},f:u}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,l=!0,p=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){p=!0,c=e},f:function(){try{l||null==n.return||n.return()}finally{if(p)throw c}}}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(45);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(62),o={}.hasOwnProperty;e.exports=function(e,t){return o.call(r(e),t)}},function(e,t,n){var r=n(458),o=n(460),a=n(898);e.exports=function(e,t){if(null==e)return{};var n,i,s=a(e,t);if(r){var u=r(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.r(t),n.d(t,"UPDATE_SELECTED_SERVER",(function(){return r})),n.d(t,"UPDATE_REQUEST_BODY_VALUE",(function(){return o})),n.d(t,"UPDATE_REQUEST_BODY_VALUE_RETAIN_FLAG",(function(){return a})),n.d(t,"UPDATE_REQUEST_BODY_INCLUSION",(function(){return i})),n.d(t,"UPDATE_ACTIVE_EXAMPLES_MEMBER",(function(){return s})),n.d(t,"UPDATE_REQUEST_CONTENT_TYPE",(function(){return u})),n.d(t,"UPDATE_RESPONSE_CONTENT_TYPE",(function(){return c})),n.d(t,"UPDATE_SERVER_VARIABLE_VALUE",(function(){return l})),n.d(t,"SET_REQUEST_BODY_VALIDATE_ERROR",(function(){return p})),n.d(t,"CLEAR_REQUEST_BODY_VALIDATE_ERROR",(function(){return f})),n.d(t,"CLEAR_REQUEST_BODY_VALUE",(function(){return h})),n.d(t,"setSelectedServer",(function(){return d})),n.d(t,"setRequestBodyValue",(function(){return m})),n.d(t,"setRetainRequestBodyValueFlag",(function(){return v})),n.d(t,"setRequestBodyInclusion",(function(){return g})),n.d(t,"setActiveExamplesMember",(function(){return y})),n.d(t,"setRequestContentType",(function(){return b})),n.d(t,"setResponseContentType",(function(){return _})),n.d(t,"setServerVariableValue",(function(){return x})),n.d(t,"setRequestBodyValidateError",(function(){return w})),n.d(t,"clearRequestBodyValidateError",(function(){return E})),n.d(t,"initRequestBodyValidateError",(function(){return S})),n.d(t,"clearRequestBodyValue",(function(){return C}));var r="oas3_set_servers",o="oas3_set_request_body_value",a="oas3_set_request_body_retain_flag",i="oas3_set_request_body_inclusion",s="oas3_set_active_examples_member",u="oas3_set_request_content_type",c="oas3_set_response_content_type",l="oas3_set_server_variable_value",p="oas3_set_request_body_validate_error",f="oas3_clear_request_body_validate_error",h="oas3_clear_request_body_value";function d(e,t){return{type:r,payload:{selectedServerUrl:e,namespace:t}}}function m(e){var t=e.value,n=e.pathMethod;return{type:o,payload:{value:t,pathMethod:n}}}var v=function(e){var t=e.value,n=e.pathMethod;return{type:a,payload:{value:t,pathMethod:n}}};function g(e){var t=e.value,n=e.pathMethod,r=e.name;return{type:i,payload:{value:t,pathMethod:n,name:r}}}function y(e){var t=e.name,n=e.pathMethod,r=e.contextType,o=e.contextName;return{type:s,payload:{name:t,pathMethod:n,contextType:r,contextName:o}}}function b(e){var t=e.value,n=e.pathMethod;return{type:u,payload:{value:t,pathMethod:n}}}function _(e){var t=e.value,n=e.path,r=e.method;return{type:c,payload:{value:t,path:n,method:r}}}function x(e){var t=e.server,n=e.namespace,r=e.key,o=e.val;return{type:l,payload:{server:t,namespace:n,key:r,val:o}}}var w=function(e){var t=e.path,n=e.method,r=e.validationErrors;return{type:p,payload:{path:t,method:n,validationErrors:r}}},E=function(e){var t=e.path,n=e.method;return{type:f,payload:{path:t,method:n}}},S=function(e){var t=e.pathMethod;return{type:f,payload:{path:t[0],method:t[1]}}},C=function(e){var t=e.pathMethod;return{type:h,payload:{pathMethod:t}}}},function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=o},function(e,t,n){e.exports=n(677)},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return m})),n.d(t,"e",(function(){return v})),n.d(t,"c",(function(){return y})),n.d(t,"a",(function(){return b})),n.d(t,"d",(function(){return _}));var r=n(50),o=n.n(r),a=n(18),i=n.n(a),s=n(2),u=n.n(s),c=n(59),l=n.n(c),p=n(363),f=n.n(p),h=function(e){return String.prototype.toLowerCase.call(e)},d=function(e){return e.replace(/[^\w]/gi,"_")};function m(e){var t=e.openapi;return!!t&&f()(t,"3")}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.v2OperationIdCompatibilityMode;if(!e||"object"!==i()(e))return null;var a=(e.operationId||"").replace(/\s/g,"");return a.length?d(e.operationId):g(t,n,{v2OperationIdCompatibilityMode:o})}function g(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.v2OperationIdCompatibilityMode;if(o){var a,i,s=u()(a="".concat(t.toLowerCase(),"_")).call(a,e).replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return(s=s||u()(i="".concat(e.substring(1),"_")).call(i,t)).replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return u()(n="".concat(h(t))).call(n,d(e))}function y(e,t){var n;return u()(n="".concat(h(t),"-")).call(n,e)}function b(e,t){return e&&e.paths?function(e,t){return function(e,t,n){if(!e||"object"!==i()(e)||!e.paths||"object"!==i()(e.paths))return null;var r=e.paths;for(var o in r)for(var a in r[o])if("PARAMETERS"!==a.toUpperCase()){var s=r[o][a];if(s&&"object"===i()(s)){var u={spec:e,pathName:o,method:a.toUpperCase(),operation:s},c=t(u);if(n&&c)return u}}return}(e,t,!0)||null}(e,(function(e){var n=e.pathName,r=e.method,o=e.operation;if(!o||"object"!==i()(o))return!1;var a=o.operationId;return[v(o,n,r),y(n,r),a].some((function(e){return e&&e===t}))})):null}function _(e){var t=e.spec,n=t.paths,r={};if(!n||t.$$normalized)return e;for(var a in n){var i=n[a];if(l()(i)){var s=i.parameters,c=function(e){var n=i[e];if(!l()(n))return"continue";var c=v(n,a,e);if(c){r[c]?r[c].push(n):r[c]=[n];var p=r[c];if(p.length>1)p.forEach((function(e,t){var n;e.__originalOperationId=e.__originalOperationId||e.operationId,e.operationId=u()(n="".concat(c)).call(n,t+1)}));else if(void 0!==n.operationId){var f=p[0];f.__originalOperationId=f.__originalOperationId||n.operationId,f.operationId=c}}if("parameters"!==e){var h=[],d={};for(var m in t)"produces"!==m&&"consumes"!==m&&"security"!==m||(d[m]=t[m],h.push(d));if(s&&(d.parameters=s,h.push(d)),h.length){var g,y=o()(h);try{for(y.s();!(g=y.n()).done;){var b=g.value;for(var _ in b)if(n[_]){if("parameters"===_){var x,w=o()(b[_]);try{var E=function(){var e=x.value;n[_].some((function(t){return t.name&&t.name===e.name||t.$ref&&t.$ref===e.$ref||t.$$ref&&t.$$ref===e.$$ref||t===e}))||n[_].push(e)};for(w.s();!(x=w.n()).done;)E()}catch(e){w.e(e)}finally{w.f()}}}else n[_]=b[_]}}catch(e){y.e(e)}finally{y.f()}}}};for(var p in i)c(p)}}return t.$$normalized=!0,e}},function(e,t,n){"use strict";n.r(t),n.d(t,"NEW_THROWN_ERR",(function(){return o})),n.d(t,"NEW_THROWN_ERR_BATCH",(function(){return a})),n.d(t,"NEW_SPEC_ERR",(function(){return i})),n.d(t,"NEW_SPEC_ERR_BATCH",(function(){return s})),n.d(t,"NEW_AUTH_ERR",(function(){return u})),n.d(t,"CLEAR",(function(){return c})),n.d(t,"CLEAR_BY",(function(){return l})),n.d(t,"newThrownErr",(function(){return p})),n.d(t,"newThrownErrBatch",(function(){return f})),n.d(t,"newSpecErr",(function(){return h})),n.d(t,"newSpecErrBatch",(function(){return d})),n.d(t,"newAuthErr",(function(){return m})),n.d(t,"clear",(function(){return v})),n.d(t,"clearBy",(function(){return g}));var r=n(146),o="err_new_thrown_err",a="err_new_thrown_err_batch",i="err_new_spec_err",s="err_new_spec_err_batch",u="err_new_auth_err",c="err_clear",l="err_clear_by";function p(e){return{type:o,payload:Object(r.serializeError)(e)}}function f(e){return{type:a,payload:e}}function h(e){return{type:i,payload:e}}function d(e){return{type:s,payload:e}}function m(e){return{type:u,payload:e}}function v(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:c,payload:e}}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0};return{type:l,payload:e}}},function(e,t,n){var r=n(109);e.exports=function(e){return Object(r(e))}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){var r=n(65),o=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function i(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=i),a(o,i),i.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},i.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";(function(e){var r=n(598),o=n(599),a=n(383);function i(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(i()=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return q(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return j(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,o);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,o){var a,i=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;i=2,s/=2,u/=2,n/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o){var l=-1;for(a=n;as&&(n=s-u),a=n;a>=0;a--){for(var p=!0,f=0;fo&&(r=o):r=o;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var i=0;i>8,o=n%256,a.push(o),a.push(r);return a}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:c>223?3:c>191?2:1;if(o+p<=n)switch(p){case 1:c<128&&(l=c);break;case 2:128==(192&(a=e[o+1]))&&(u=(31&c)<<6|63&a)>127&&(l=u);break;case 3:a=e[o+1],i=e[o+2],128==(192&a)&&128==(192&i)&&(u=(15&c)<<12|(63&a)<<6|63&i)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:a=e[o+1],i=e[o+2],s=e[o+3],128==(192&a)&&128==(192&i)&&128==(192&s)&&(u=(15&c)<<18|(63&a)<<12|(63&i)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,p=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=p}return function(e){var t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},u.prototype.compare=function(e,t,n,r,o){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(o>>>=0)-(r>>>=0),i=(n>>>=0)-(t>>>=0),s=Math.min(a,i),c=this.slice(r,o),l=e.slice(t,n),p=0;po)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function k(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",a=t;an)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,n,r,o,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function M(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,a=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function R(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,a=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function D(e,t,n,r,o,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,a){return a||D(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,a){return a||D(e,0,n,8),o.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],o=1,a=0;++a=(o*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=t,o=1,a=this[e+--r];r>0&&(o*=256);)a+=this[e+--r]*o;return a>=(o*=128)&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||N(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+o]=e/a&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):R(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);N(this,e,t,n,o-1,-o)}var a=0,i=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);N(this,e,t,n,o-1,-o)}var a=n-1,i=1,s=0;for(this[t+a]=255&e;--a>=0&&(i*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/i>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):R(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&a.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(53))},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t0?o(r(e),9007199254740991):0}},function(e,t,n){var r,o,a,i=n(374),s=n(40),u=n(45),c=n(70),l=n(54),p=n(235),f=n(188),h=n(159),d="Object already initialized",m=s.WeakMap;if(i){var v=p.state||(p.state=new m),g=v.get,y=v.has,b=v.set;r=function(e,t){if(y.call(v,e))throw new TypeError(d);return t.facade=e,b.call(v,e,t),t},o=function(e){return g.call(v,e)||{}},a=function(e){return y.call(v,e)}}else{var _=f("state");h[_]=!0,r=function(e,t){if(l(e,_))throw new TypeError(d);return t.facade=e,c(e,_,t),t},o=function(e){return l(e,_)?e[_]:{}},a=function(e){return l(e,_)}}e.exports={set:r,get:o,has:a,enforce:function(e){return a(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";var r=n(30),o=n(38),a=n(481),i=n(124),s=n(482),u=n(142),c=n(208),l=n(25),p=[],f=0,h=a.getPooled(),d=!1,m=null;function v(){w.ReactReconcileTransaction&&m||r("123")}var g=[{initialize:function(){this.dirtyComponentsLength=p.length},close:function(){this.dirtyComponentsLength!==p.length?(p.splice(0,this.dirtyComponentsLength),x()):p.length=0}},{initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}}];function y(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=a.getPooled(),this.reconcileTransaction=w.ReactReconcileTransaction.getPooled(!0)}function b(e,t){return e._mountOrder-t._mountOrder}function _(e){var t=e.dirtyComponentsLength;t!==p.length&&r("124",t,p.length),p.sort(b),f++;for(var n=0;n",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),p=["%","/","?",";","#"].concat(l),f=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n(1107);function b(e,t,n){if(e&&o.isObject(e)&&e instanceof a)return e;var r=new a;return r.parse(e,t,n),r}a.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),s=-1!==a&&a127?N+="x":N+=P[M];if(!N.match(h)){var D=T.slice(0,O),L=T.slice(O+1),B=P.match(d);B&&(D.push(B[1]),L.unshift(B[2])),L.length&&(b="/"+L.join(".")+b),this.hostname=D.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),j||(this.hostname=r.toASCII(this.hostname));var F=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+F,this.href+=this.host,j&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[w])for(O=0,I=l.length;O0)&&n.host.split("@"))&&(n.auth=j.shift(),n.host=n.hostname=j.shift());return n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!E.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var C=E.slice(-1)[0],A=(n.host||e.host||E.length>1)&&("."===C||".."===C)||""===C,O=0,k=E.length;k>=0;k--)"."===(C=E[k])?E.splice(k,1):".."===C?(E.splice(k,1),O++):O&&(E.splice(k,1),O--);if(!x&&!w)for(;O--;O)E.unshift("..");!x||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),A&&"/"!==E.join("/").substr(-1)&&E.push("");var j,T=""===E[0]||E[0]&&"/"===E[0].charAt(0);S&&(n.hostname=n.host=T?"":E.length?E.shift():"",(j=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=j.shift(),n.host=n.hostname=j.shift()));return(x=x||n.host&&E.length)&&!T&&E.unshift(""),E.length?n.pathname=E.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},a.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){"use strict";n.r(t),n.d(t,"SHOW_AUTH_POPUP",(function(){return h})),n.d(t,"AUTHORIZE",(function(){return d})),n.d(t,"LOGOUT",(function(){return m})),n.d(t,"PRE_AUTHORIZE_OAUTH2",(function(){return v})),n.d(t,"AUTHORIZE_OAUTH2",(function(){return g})),n.d(t,"VALIDATE",(function(){return y})),n.d(t,"CONFIGURE_AUTH",(function(){return b})),n.d(t,"RESTORE_AUTHORIZATION",(function(){return _})),n.d(t,"showDefinitions",(function(){return x})),n.d(t,"authorize",(function(){return w})),n.d(t,"authorizeWithPersistOption",(function(){return E})),n.d(t,"logout",(function(){return S})),n.d(t,"logoutWithPersistOption",(function(){return C})),n.d(t,"preAuthorizeImplicit",(function(){return A})),n.d(t,"authorizeOauth2",(function(){return O})),n.d(t,"authorizeOauth2WithPersistOption",(function(){return k})),n.d(t,"authorizePassword",(function(){return j})),n.d(t,"authorizeApplication",(function(){return T})),n.d(t,"authorizeAccessCodeWithFormParams",(function(){return I})),n.d(t,"authorizeAccessCodeWithBasicAuthentication",(function(){return P})),n.d(t,"authorizeRequest",(function(){return N})),n.d(t,"configureAuth",(function(){return M})),n.d(t,"restoreAuthorization",(function(){return R})),n.d(t,"persistAuthorizationIfNeeded",(function(){return D}));var r=n(18),o=n.n(r),a=n(32),i=n.n(a),s=n(20),u=n.n(s),c=n(96),l=n.n(c),p=n(26),f=n(5),h="show_popup",d="authorize",m="logout",v="pre_authorize_oauth2",g="authorize_oauth2",y="validate",b="configure_auth",_="restore_authorization";function x(e){return{type:h,payload:e}}function w(e){return{type:d,payload:e}}var E=function(e){return function(t){var n=t.authActions;n.authorize(e),n.persistAuthorizationIfNeeded()}};function S(e){return{type:m,payload:e}}var C=function(e){return function(t){var n=t.authActions;n.logout(e),n.persistAuthorizationIfNeeded()}},A=function(e){return function(t){var n=t.authActions,r=t.errActions,o=e.auth,a=e.token,s=e.isValid,u=o.schema,c=o.name,l=u.get("flow");delete p.a.swaggerUIRedirectOauth2,"accessCode"===l||s||r.newAuthErr({authId:c,source:"auth",level:"warning",message:"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"}),a.error?r.newAuthErr({authId:c,source:"auth",level:"error",message:i()(a)}):n.authorizeOauth2WithPersistOption({auth:o,token:a})}};function O(e){return{type:g,payload:e}}var k=function(e){return function(t){var n=t.authActions;n.authorizeOauth2(e),n.persistAuthorizationIfNeeded()}},j=function(e){return function(t){var n=t.authActions,r=e.schema,o=e.name,a=e.username,i=e.password,s=e.passwordType,c=e.clientId,l=e.clientSecret,p={grant_type:"password",scope:e.scopes.join(" "),username:a,password:i},h={};switch(s){case"request-body":!function(e,t,n){t&&u()(e,{client_id:t});n&&u()(e,{client_secret:n})}(p,c,l);break;case"basic":h.Authorization="Basic "+Object(f.a)(c+":"+l);break;default:console.warn("Warning: invalid passwordType ".concat(s," was passed, not including client id and secret"))}return n.authorizeRequest({body:Object(f.b)(p),url:r.get("tokenUrl"),name:o,headers:h,query:{},auth:e})}};var T=function(e){return function(t){var n=t.authActions,r=e.schema,o=e.scopes,a=e.name,i=e.clientId,s=e.clientSecret,u={Authorization:"Basic "+Object(f.a)(i+":"+s)},c={grant_type:"client_credentials",scope:o.join(" ")};return n.authorizeRequest({body:Object(f.b)(c),name:a,url:r.get("tokenUrl"),auth:e,headers:u})}},I=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,a=t.name,i=t.clientId,s=t.clientSecret,u=t.codeVerifier,c={grant_type:"authorization_code",code:t.code,client_id:i,client_secret:s,redirect_uri:n,code_verifier:u};return r.authorizeRequest({body:Object(f.b)(c),name:a,url:o.get("tokenUrl"),auth:t})}},P=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,a=t.name,i=t.clientId,s=t.clientSecret,u=t.codeVerifier,c={Authorization:"Basic "+Object(f.a)(i+":"+s)},l={grant_type:"authorization_code",code:t.code,client_id:i,redirect_uri:n,code_verifier:u};return r.authorizeRequest({body:Object(f.b)(l),name:a,url:o.get("tokenUrl"),auth:t,headers:c})}},N=function(e){return function(t){var n,r=t.fn,a=t.getConfigs,s=t.authActions,c=t.errActions,p=t.oas3Selectors,f=t.specSelectors,h=t.authSelectors,d=e.body,m=e.query,v=void 0===m?{}:m,g=e.headers,y=void 0===g?{}:g,b=e.name,_=e.url,x=e.auth,w=(h.getConfigs()||{}).additionalQueryStringParams;if(f.isOAS3()){var E=p.serverEffectiveValue(p.selectedServer());n=l()(_,E,!0)}else n=l()(_,f.url(),!0);"object"===o()(w)&&(n.query=u()({},n.query,w));var S=n.toString(),C=u()({Accept:"application/json, text/plain, */*","Content-Type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"},y);r.fetch({url:S,method:"post",headers:C,query:v,body:d,requestInterceptor:a().requestInterceptor,responseInterceptor:a().responseInterceptor}).then((function(e){var t=JSON.parse(e.data),n=t&&(t.error||""),r=t&&(t.parseError||"");e.ok?n||r?c.newAuthErr({authId:b,level:"error",source:"auth",message:i()(t)}):s.authorizeOauth2WithPersistOption({auth:x,token:t}):c.newAuthErr({authId:b,level:"error",source:"auth",message:e.statusText})})).catch((function(e){var t=new Error(e).message;if(e.response&&e.response.data){var n=e.response.data;try{var r="string"==typeof n?JSON.parse(n):n;r.error&&(t+=", error: ".concat(r.error)),r.error_description&&(t+=", description: ".concat(r.error_description))}catch(e){}}c.newAuthErr({authId:b,level:"error",source:"auth",message:t})}))}};function M(e){return{type:b,payload:e}}function R(e){return{type:_,payload:e}}var D=function(){return function(e){var t=e.authSelectors;if((0,e.getConfigs)().persistAuthorization){var n=t.authorized();localStorage.setItem("authorized",i()(n.toJS()))}}}},function(e,t,n){var r=n(1072);e.exports=function(e){for(var t=1;tS;S++)if((h||S in x)&&(b=w(y=x[S],S,_),e))if(t)A[S]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return S;case 2:u.call(A,y)}else switch(e){case 4:return!1;case 7:u.call(A,y)}return p?-1:c||l?l:A}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterOut:c(7)}},function(e,t,n){n(161);var r=n(586),o=n(40),a=n(101),i=n(70),s=n(130),u=n(41)("toStringTag");for(var c in r){var l=o[c],p=l&&l.prototype;p&&a(p)!==u&&i(p,u,c),s[c]=s.Array}},function(e,t,n){"use strict";e.exports={current:null}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var u,c=[],l=!1,p=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):p=-1,c.length&&h())}function h(){if(!l){var e=s(f);l=!0;for(var t=c.length;t;){for(u=c,c=[];++p1)for(var n=1;n0&&"/"!==t[0]}));function Se(e,t,n){var r;t=t||[];var o=xe.apply(void 0,u()(r=[e]).call(r,i()(t))).get("parameters",Object(I.List)());return w()(o).call(o,(function(e,t){var r=n&&"body"===t.get("in")?t.get("value_xml"):t.get("value");return e.set(Object(T.A)(t,{allowHashes:!1}),r)}),Object(I.fromJS)({}))}function Ce(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(I.List.isList(e))return A()(e).call(e,(function(e){return I.Map.isMap(e)&&e.get("in")===t}))}function Ae(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(I.List.isList(e))return A()(e).call(e,(function(e){return I.Map.isMap(e)&&e.get("type")===t}))}function Oe(e,t){var n,r;t=t||[];var o=z(e).getIn(u()(n=["paths"]).call(n,i()(t)),Object(I.fromJS)({})),a=e.getIn(u()(r=["meta","paths"]).call(r,i()(t)),Object(I.fromJS)({})),s=ke(e,t),c=o.get("parameters")||new I.List,l=a.get("consumes_value")?a.get("consumes_value"):Ae(c,"file")?"multipart/form-data":Ae(c,"formData")?"application/x-www-form-urlencoded":void 0;return Object(I.fromJS)({requestContentType:l,responseContentType:s})}function ke(e,t){var n,r;t=t||[];var o=z(e).getIn(u()(n=["paths"]).call(n,i()(t)),null);if(null!==o){var a=e.getIn(u()(r=["meta","paths"]).call(r,i()(t),["produces_value"]),null),s=o.getIn(["produces",0],null);return a||s||"application/json"}}function je(e,t){var n;t=t||[];var r=z(e),a=r.getIn(u()(n=["paths"]).call(n,i()(t)),null);if(null!==a){var s=t,c=o()(s,1)[0],l=a.get("produces",null),p=r.getIn(["paths",c,"produces"],null),f=r.getIn(["produces"],null);return l||p||f}}function Te(e,t){var n;t=t||[];var r=z(e),a=r.getIn(u()(n=["paths"]).call(n,i()(t)),null);if(null!==a){var s=t,c=o()(s,1)[0],l=a.get("consumes",null),p=r.getIn(["paths",c,"consumes"],null),f=r.getIn(["consumes"],null);return l||p||f}}var Ie=function(e,t,n){var r=e.get("url").match(/^([a-z][a-z0-9+\-.]*):/),o=k()(r)?r[1]:null;return e.getIn(["scheme",t,n])||e.getIn(["scheme","_defaultScheme"])||o||""},Pe=function(e,t,n){var r;return d()(r=["http","https"]).call(r,Ie(e,t,n))>-1},Ne=function(e,t){var n;t=t||[];var r=e.getIn(u()(n=["meta","paths"]).call(n,i()(t),["parameters"]),Object(I.fromJS)([])),o=!0;return f()(r).call(r,(function(e){var t=e.get("errors");t&&t.count()&&(o=!1)})),o},Me=function(e,t){var n,r,o={requestBody:!1,requestContentType:{}},a=e.getIn(u()(n=["resolvedSubtrees","paths"]).call(n,i()(t),["requestBody"]),Object(I.fromJS)([]));return a.size<1||(a.getIn(["required"])&&(o.requestBody=a.getIn(["required"])),f()(r=a.getIn(["content"]).entrySeq()).call(r,(function(e){var t=e[0];if(e[1].getIn(["schema","required"])){var n=e[1].getIn(["schema","required"]).toJS();o.requestContentType[t]=n}}))),o},Re=function(e,t,n,r){var o;if((n||r)&&n===r)return!0;var a=e.getIn(u()(o=["resolvedSubtrees","paths"]).call(o,i()(t),["requestBody","content"]),Object(I.fromJS)([]));if(a.size<2||!n||!r)return!1;var s=a.getIn([n,"schema","properties"],Object(I.fromJS)([])),c=a.getIn([r,"schema","properties"],Object(I.fromJS)([]));return!!s.equals(c)};function De(e){return I.Map.isMap(e)?e:new I.Map}},function(e,t,n){"use strict";(function(t){var r=n(919),o=n(920),a=/^[A-Za-z][A-Za-z0-9+-.]*:[\\/]+/,i=/^([a-z][a-z0-9.+-]*:)?([\\/]{1,})?([\S\s]*)/i,s=new RegExp("^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+");function u(e){return(e||"").toString().replace(s,"")}var c=[["#","hash"],["?","query"],function(e){return e.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],l={hash:1,query:1};function p(e){var n,r=("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{}).location||{},o={},i=typeof(e=e||r);if("blob:"===e.protocol)o=new h(unescape(e.pathname),{});else if("string"===i)for(n in o=new h(e,{}),l)delete o[n];else if("object"===i){for(n in e)n in l||(o[n]=e[n]);void 0===o.slashes&&(o.slashes=a.test(e.href))}return o}function f(e){e=u(e);var t=i.exec(e);return{protocol:t[1]?t[1].toLowerCase():"",slashes:!!(t[2]&&t[2].length>=2),rest:t[2]&&1===t[2].length?"/"+t[3]:t[3]}}function h(e,t,n){if(e=u(e),!(this instanceof h))return new h(e,t,n);var a,i,s,l,d,m,v=c.slice(),g=typeof t,y=this,b=0;for("object"!==g&&"string"!==g&&(n=t,t=null),n&&"function"!=typeof n&&(n=o.parse),t=p(t),a=!(i=f(e||"")).protocol&&!i.slashes,y.slashes=i.slashes||a&&t.slashes,y.protocol=i.protocol||t.protocol||"",e=i.rest,i.slashes||(v[3]=[/(.*)/,"pathname"]);b=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),g[r]}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=e.filter((function(e){return"token"!==e})),o=y(r);return o.reduce((function(e,t){return f()({},e,n[t])}),t)}function _(e){return e.join(" ")}function x(e){var t=e.node,n=e.stylesheet,r=e.style,o=void 0===r?{}:r,a=e.useInlineStyles,i=e.key,s=t.properties,u=t.type,c=t.tagName,l=t.value;if("text"===u)return l;if(c){var p,h=function(e,t){var n=0;return function(r){return n+=1,r.map((function(r,o){return x({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(o)})}))}}(n,a);if(a){var m=Object.keys(n).reduce((function(e,t){return t.split(".").forEach((function(t){e.includes(t)||e.push(t)})),e}),[]),g=s.className&&s.className.includes("token")?["token"]:[],y=s.className&&g.concat(s.className.filter((function(e){return!m.includes(e)})));p=f()({},s,{className:_(y)||void 0,style:b(s.className,Object.assign({},s.style,o),n)})}else p=f()({},s,{className:_(s.className)});var w=h(t.children);return d.a.createElement(c,v()({key:i},p),w)}}var w=/\n/g;function E(e){var t=e.codeString,n=e.codeStyle,r=e.containerStyle,o=void 0===r?{float:"left",paddingRight:"10px"}:r,a=e.numberStyle,i=void 0===a?{}:a,s=e.startingLineNumber;return d.a.createElement("code",{style:Object.assign({},n,o)},function(e){var t=e.lines,n=e.startingLineNumber,r=e.style;return t.map((function(e,t){var o=t+n;return d.a.createElement("span",{key:"line-".concat(t),className:"react-syntax-highlighter-line-number",style:"function"==typeof r?r(o):r},"".concat(o,"\n"))}))}({lines:t.replace(/\n$/,"").split("\n"),style:i,startingLineNumber:s}))}function S(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function C(e,t,n){var r,o={display:"inline-block",minWidth:(r=n,"".concat(r.toString().length,".25em")),paddingRight:"1em",textAlign:"right",userSelect:"none"},a="function"==typeof e?e(t):e;return f()({},o,a)}function A(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,o=e.largestLineNumber,a=e.showInlineLineNumbers,i=e.lineProps,s=void 0===i?{}:i,u=e.className,c=void 0===u?[]:u,l=e.showLineNumbers,p=e.wrapLongLines,h="function"==typeof s?s(n):s;if(h.className=c,n&&a){var d=C(r,n,o);t.unshift(S(n,d))}return p&l&&(h.style=f()({},h.style,{display:"flex"})),{type:"element",tagName:"span",properties:h,children:t}}function O(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0;r2&&void 0!==arguments[2]?arguments[2]:[];return A({children:e,lineNumber:t,lineNumberStyle:s,largestLineNumber:i,showInlineLineNumbers:o,lineProps:n,className:a,showLineNumbers:r,wrapLongLines:u})}function m(e,t){if(r&&t&&o){var n=C(s,t,i);e.unshift(S(t,n))}return e}function v(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||r.length>0?d(e,n,r):m(e,n)}for(var g=function(){var e=l[h],t=e.children[0].value;if(t.match(w)){var n=t.split("\n");n.forEach((function(t,o){var i=r&&p.length+a,s={type:"text",value:"".concat(t,"\n")};if(0===o){var u=v(l.slice(f+1,h).concat(A({children:[s],className:e.properties.className})),i);p.push(u)}else if(o===n.length-1){if(l[h+1]&&l[h+1].children&&l[h+1].children[0]){var c=A({children:[{type:"text",value:"".concat(t)}],className:e.properties.className});l.splice(h+1,0,c)}else{var d=v([s],i,e.properties.className);p.push(d)}}else{var m=v([s],i,e.properties.className);p.push(m)}})),f=h}h++};h .hljs-title":{color:"#88C0D0"},"hljs-keyword":{color:"#81A1C1"},"hljs-literal":{color:"#81A1C1"},"hljs-symbol":{color:"#81A1C1"},"hljs-number":{color:"#B48EAD"},"hljs-regexp":{color:"#EBCB8B"},"hljs-string":{color:"#A3BE8C"},"hljs-title":{color:"#8FBCBB"},"hljs-params":{color:"#D8DEE9"},"hljs-bullet":{color:"#81A1C1"},"hljs-code":{color:"#8FBCBB"},"hljs-emphasis":{fontStyle:"italic"},"hljs-formula":{color:"#8FBCBB"},"hljs-strong":{fontWeight:"bold"},"hljs-link:hover":{textDecoration:"underline"},"hljs-quote":{color:"#4C566A"},"hljs-comment":{color:"#4C566A"},"hljs-doctag":{color:"#8FBCBB"},"hljs-meta":{color:"#5E81AC"},"hljs-meta-keyword":{color:"#5E81AC"},"hljs-meta-string":{color:"#A3BE8C"},"hljs-attr":{color:"#8FBCBB"},"hljs-attribute":{color:"#D8DEE9"},"hljs-builtin-name":{color:"#81A1C1"},"hljs-name":{color:"#81A1C1"},"hljs-section":{color:"#88C0D0"},"hljs-tag":{color:"#81A1C1"},"hljs-variable":{color:"#D8DEE9"},"hljs-template-variable":{color:"#D8DEE9"},"hljs-template-tag":{color:"#5E81AC"},"abnf .hljs-attribute":{color:"#88C0D0"},"abnf .hljs-symbol":{color:"#EBCB8B"},"apache .hljs-attribute":{color:"#88C0D0"},"apache .hljs-section":{color:"#81A1C1"},"arduino .hljs-built_in":{color:"#88C0D0"},"aspectj .hljs-meta":{color:"#D08770"},"aspectj > .hljs-title":{color:"#88C0D0"},"bnf .hljs-attribute":{color:"#8FBCBB"},"clojure .hljs-name":{color:"#88C0D0"},"clojure .hljs-symbol":{color:"#EBCB8B"},"coq .hljs-built_in":{color:"#88C0D0"},"cpp .hljs-meta-string":{color:"#8FBCBB"},"css .hljs-built_in":{color:"#88C0D0"},"css .hljs-keyword":{color:"#D08770"},"diff .hljs-meta":{color:"#8FBCBB"},"ebnf .hljs-attribute":{color:"#8FBCBB"},"glsl .hljs-built_in":{color:"#88C0D0"},"groovy .hljs-meta:not(:first-child)":{color:"#D08770"},"haxe .hljs-meta":{color:"#D08770"},"java .hljs-meta":{color:"#D08770"},"ldif .hljs-attribute":{color:"#8FBCBB"},"lisp .hljs-name":{color:"#88C0D0"},"lua .hljs-built_in":{color:"#88C0D0"},"moonscript .hljs-built_in":{color:"#88C0D0"},"nginx .hljs-attribute":{color:"#88C0D0"},"nginx .hljs-section":{color:"#5E81AC"},"pf .hljs-built_in":{color:"#88C0D0"},"processing .hljs-built_in":{color:"#88C0D0"},"scss .hljs-keyword":{color:"#81A1C1"},"stylus .hljs-keyword":{color:"#81A1C1"},"swift .hljs-meta":{color:"#D08770"},"vim .hljs-built_in":{color:"#88C0D0",fontStyle:"italic"},"yaml .hljs-meta":{color:"#D08770"}},obsidian:{hljs:{display:"block",overflowX:"auto",padding:"0.5em",background:"#282b2e",color:"#e0e2e4"},"hljs-keyword":{color:"#93c763",fontWeight:"bold"},"hljs-selector-tag":{color:"#93c763",fontWeight:"bold"},"hljs-literal":{color:"#93c763",fontWeight:"bold"},"hljs-selector-id":{color:"#93c763"},"hljs-number":{color:"#ffcd22"},"hljs-attribute":{color:"#668bb0"},"hljs-code":{color:"white"},"hljs-class .hljs-title":{color:"white"},"hljs-section":{color:"white",fontWeight:"bold"},"hljs-regexp":{color:"#d39745"},"hljs-link":{color:"#d39745"},"hljs-meta":{color:"#557182"},"hljs-tag":{color:"#8cbbad"},"hljs-name":{color:"#8cbbad",fontWeight:"bold"},"hljs-bullet":{color:"#8cbbad"},"hljs-subst":{color:"#8cbbad"},"hljs-emphasis":{color:"#8cbbad"},"hljs-type":{color:"#8cbbad",fontWeight:"bold"},"hljs-built_in":{color:"#8cbbad"},"hljs-selector-attr":{color:"#8cbbad"},"hljs-selector-pseudo":{color:"#8cbbad"},"hljs-addition":{color:"#8cbbad"},"hljs-variable":{color:"#8cbbad"},"hljs-template-tag":{color:"#8cbbad"},"hljs-template-variable":{color:"#8cbbad"},"hljs-string":{color:"#ec7600"},"hljs-symbol":{color:"#ec7600"},"hljs-comment":{color:"#818e96"},"hljs-quote":{color:"#818e96"},"hljs-deletion":{color:"#818e96"},"hljs-selector-class":{color:"#A082BD"},"hljs-doctag":{fontWeight:"bold"},"hljs-title":{fontWeight:"bold"},"hljs-strong":{fontWeight:"bold"}},"tomorrow-night":{"hljs-comment":{color:"#969896"},"hljs-quote":{color:"#969896"},"hljs-variable":{color:"#cc6666"},"hljs-template-variable":{color:"#cc6666"},"hljs-tag":{color:"#cc6666"},"hljs-name":{color:"#cc6666"},"hljs-selector-id":{color:"#cc6666"},"hljs-selector-class":{color:"#cc6666"},"hljs-regexp":{color:"#cc6666"},"hljs-deletion":{color:"#cc6666"},"hljs-number":{color:"#de935f"},"hljs-built_in":{color:"#de935f"},"hljs-builtin-name":{color:"#de935f"},"hljs-literal":{color:"#de935f"},"hljs-type":{color:"#de935f"},"hljs-params":{color:"#de935f"},"hljs-meta":{color:"#de935f"},"hljs-link":{color:"#de935f"},"hljs-attribute":{color:"#f0c674"},"hljs-string":{color:"#b5bd68"},"hljs-symbol":{color:"#b5bd68"},"hljs-bullet":{color:"#b5bd68"},"hljs-addition":{color:"#b5bd68"},"hljs-title":{color:"#81a2be"},"hljs-section":{color:"#81a2be"},"hljs-keyword":{color:"#b294bb"},"hljs-selector-tag":{color:"#b294bb"},hljs:{display:"block",overflowX:"auto",background:"#1d1f21",color:"#c5c8c6",padding:"0.5em"},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"}}},Q=o()(X),ee=function(e){return i()(Q).call(Q,e)?X[e]:(console.warn("Request style '".concat(e,"' is not available, returning default instead")),Z)}},function(e,t){e.exports=!0},function(e,t,n){var r=n(244),o=n(71).f,a=n(70),i=n(54),s=n(560),u=n(41)("toStringTag");e.exports=function(e,t,n,c){if(e){var l=n?e:e.prototype;i(l,u)||o(l,u,{configurable:!0,value:t}),c&&!r&&a(l,"toString",s)}}},function(e,t,n){var r=n(244),o=n(152),a=n(41)("toStringTag"),i="Arguments"==o(function(){return arguments}());e.exports=r?o:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),a))?n:i?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){e.exports=n(685)},function(e,t,n){"use strict";function r(e){return function(e){try{return!!JSON.parse(e)}catch(e){return null}}(e)?"json":null}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t),n.d(t,"UPDATE_LAYOUT",(function(){return o})),n.d(t,"UPDATE_FILTER",(function(){return a})),n.d(t,"UPDATE_MODE",(function(){return i})),n.d(t,"SHOW",(function(){return s})),n.d(t,"updateLayout",(function(){return u})),n.d(t,"updateFilter",(function(){return c})),n.d(t,"show",(function(){return l})),n.d(t,"changeMode",(function(){return p}));var r=n(5),o="layout_update_layout",a="layout_update_filter",i="layout_update_mode",s="layout_show";function u(e){return{type:o,payload:e}}function c(e){return{type:a,payload:e}}function l(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e=Object(r.v)(e),{type:s,payload:{thing:e,shown:t}}}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e=Object(r.v)(e),{type:i,payload:{thing:e,mode:t}}}},function(e,t,n){var r=n(428),o=n(165),a=n(197),i=n(52),s=n(117),u=n(198),c=n(164),l=n(256),p=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(i(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||l(e)||a(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(p.call(e,n))return!1;return!0}},function(e,t,n){var r=n(49),o=n(182),a=n(108),i=n(69),s=n(184),u=n(54),c=n(368),l=Object.getOwnPropertyDescriptor;t.f=r?l:function(e,t){if(e=i(e),t=s(t,!0),c)try{return l(e,t)}catch(e){}if(u(e,t))return a(!o.f.call(e,t),e[t])}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(78);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r,o=n(51),a=n(237),i=n(240),s=n(159),u=n(373),c=n(232),l=n(188),p=l("IE_PROTO"),f=function(){},h=function(e){return" - + + + + +
+
+
+
+ +
+

pine.backend.api.bp

+
+

Module Contents

+
+

Functions

+ ++++ + + + + + + + + + + + + + + +

openapi_spec()

swagger_ui_index()

swagger_ui(file: str)

init_app(app)

+
+
+pine.backend.api.bp.bp
+
+ +
+
+pine.backend.api.bp.LOGGER
+
+ +
+
+pine.backend.api.bp.openapi_spec()
+
+ +
+
+pine.backend.api.bp.swagger_ui_index()
+
+ +
+
+pine.backend.api.bp.swagger_ui(file: str)
+
+ +
+
+pine.backend.api.bp.init_app(app)
+
+ +
+
+
+ + +
+
+
+
+ +
+
+ + + + \ No newline at end of file diff --git a/docs/build/html/autoapi/pine/backend/api/index.html b/docs/build/html/autoapi/pine/backend/api/index.html new file mode 100644 index 0000000..341babc --- /dev/null +++ b/docs/build/html/autoapi/pine/backend/api/index.html @@ -0,0 +1,139 @@ + + + + + + + + + pine.backend.api — pine documentation + + + + + + + + + + + + + + + + + + +
+
+
+
+ +
+

pine.backend.api

+

This module implements all methods required for SwaggerUI to run on the +backend of PINE.

+
+

Submodules

+ +
+
+ + +
+
+
+
+ +
+
+ + + + \ No newline at end of file diff --git a/docs/build/html/autoapi/pine/backend/auth/index.html b/docs/build/html/autoapi/pine/backend/auth/index.html index 20afaff..1ae7a53 100644 --- a/docs/build/html/autoapi/pine/backend/auth/index.html +++ b/docs/build/html/autoapi/pine/backend/auth/index.html @@ -19,7 +19,7 @@ - +