diff --git a/.github/workflows/update_specs.yml b/.github/workflows/update_specs.yml new file mode 100644 index 000000000..fb579df36 --- /dev/null +++ b/.github/workflows/update_specs.yml @@ -0,0 +1,36 @@ +name: Update OpenAPI specs +on: + push: + branches: + - main + +jobs: + update: + runs-on: ubuntu-latest + steps: + - name: GitHub App token + id: github_app_token + uses: tibdex/github-app-token@v1.5.0 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.APP_PRIVATE_KEY }} + installation_id: 22479998 + + - name: Checkout the repo + uses: actions/checkout@v3 + + - name: Build + run: ./gradlew build + + - name: Move OpenAPI specs to root + run: mv build/smithyprojections/opensearch-api-specification/source/openapi/OpenSearch.openapi.json . + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v4 + with: + token: ${{ steps.github_app_token.outputs.token }} + commit-message: Update OpenAPI specs + title: Update OpenAPI specs + body: | + I've noticed an update to the models. This pull request updates the OpenAPI specs accordingly. + branch: create-pull-request/specs-update \ No newline at end of file diff --git a/OpenSearch.openapi.json b/OpenSearch.openapi.json new file mode 100644 index 000000000..34d2557f4 --- /dev/null +++ b/OpenSearch.openapi.json @@ -0,0 +1,2673 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "OpenSearch", + "version": "2021-11-23" + }, + "paths": { + "/": { + "get": { + "description": "Returns whether the cluster is running.", + "operationId": "GetClusterInfo", + "responses": { + "200": { + "description": "GetClusterInfo 200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetClusterInfoResponseContent" + } + } + } + } + } + } + }, + "/_aliases": { + "post": { + "description": "Adds or removes index aliases.", + "operationId": "PostAliases", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostAliasesRequestContent" + }, + "examples": { + "PostAliases_example1": { + "summary": "Examples for Post Aliases Operation.", + "description": "", + "value": {} + } + } + } + } + }, + "parameters": [ + { + "name": "master_timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$", + "deprecated": true + } + }, + { + "name": "cluster_manager_timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + } + }, + { + "name": "timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + } + } + ], + "responses": { + "200": { + "description": "PostAliases 200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostAliasesResponseContent" + }, + "examples": { + "PostAliases_example1": { + "summary": "Examples for Post Aliases Operation.", + "description": "", + "value": { + "acknowledged": true + } + } + } + } + } + } + } + } + }, + "/_cat/indices": { + "get": { + "description": "Returns information about indices: number of primaries and replicas, document counts, disk size, etc.", + "operationId": "GetCatIndices", + "parameters": [ + { + "name": "master_timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$", + "deprecated": true + } + }, + { + "name": "cluster_manager_timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + } + }, + { + "name": "bytes", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "expand_wildcards", + "in": "query", + "schema": { + "$ref": "#/components/schemas/ExpandWildcards" + } + }, + { + "name": "health", + "in": "query", + "schema": { + "$ref": "#/components/schemas/HealthStatus" + } + }, + { + "name": "include_unloaded_segments", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "pri", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "time", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + } + }, + { + "name": "format", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "GetCatIndices 200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCatIndicesOutputPayload" + } + } + } + } + } + } + }, + "/_cat/indices/{index}": { + "get": { + "description": "Returns information about indices: number of primaries and replicas, document counts, disk size, etc.", + "operationId": "GetCatIndicesWithIndex", + "parameters": [ + { + "name": "index", + "in": "path", + "schema": { + "type": "string", + "pattern": "^[^+_\\-\\.][^\\\\, /*?\"<>| ,#\\nA-Z]+$" + }, + "required": true, + "examples": { + "GetCatIndicesWithIndex_example1": { + "summary": "Examples for Cat indices with Index Operation.", + "description": "", + "value": "books" + } + } + }, + { + "name": "master_timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$", + "deprecated": true + } + }, + { + "name": "cluster_manager_timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + } + }, + { + "name": "bytes", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "expand_wildcards", + "in": "query", + "schema": { + "$ref": "#/components/schemas/ExpandWildcards" + } + }, + { + "name": "health", + "in": "query", + "schema": { + "$ref": "#/components/schemas/HealthStatus" + } + }, + { + "name": "include_unloaded_segments", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "pri", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "time", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + } + }, + { + "name": "format", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "GetCatIndicesWithIndex 200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCatIndicesWithIndexOutputPayload" + } + } + } + } + } + } + }, + "/_cat/nodes": { + "get": { + "description": "Returns basic statistics about performance of cluster nodes.", + "operationId": "GetCatNodes", + "parameters": [ + { + "name": "master_timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$", + "deprecated": true + } + }, + { + "name": "cluster_manager_timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + } + }, + { + "name": "bytes", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "full_id", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "local", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "time", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + } + }, + { + "name": "include_unloaded_segments", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "format", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "GetCatNodes 200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCatNodesOutputPayload" + } + } + } + } + } + } + }, + "/_cluster/settings": { + "get": { + "description": "Returns cluster settings.", + "operationId": "GetClusterSettings", + "parameters": [ + { + "name": "master_timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$", + "deprecated": true + } + }, + { + "name": "cluster_manager_timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + } + }, + { + "name": "flat_settings", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "include_defaults", + "in": "query", + "schema": { + "type": "boolean" + }, + "examples": { + "GetClusterSettings_example1": { + "summary": "Examples for Get cluster settings Operation.", + "description": "", + "value": true + } + } + } + ], + "responses": { + "200": { + "description": "GetClusterSettings 200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetClusterSettingsResponseContent" + }, + "examples": { + "GetClusterSettings_example1": { + "summary": "Examples for Get cluster settings Operation.", + "description": "", + "value": {} + } + } + } + } + } + } + }, + "put": { + "description": "Updates the cluster settings.", + "operationId": "PutUpdateClusterSettings", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PutUpdateClusterSettingsRequestContent" + } + } + } + }, + "parameters": [ + { + "name": "master_timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$", + "deprecated": true + } + }, + { + "name": "cluster_manager_timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + } + }, + { + "name": "flat_settings", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + } + } + ], + "responses": { + "200": { + "description": "PutUpdateClusterSettings 200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PutUpdateClusterSettingsResponseContent" + } + } + } + } + } + } + }, + "/_search": { + "post": { + "description": "Returns results matching a query.", + "operationId": "PostSearch", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostSearchRequestContent" + }, + "examples": { + "PostSearch_example1": { + "summary": "Examples for Post Search Operation.", + "description": "", + "value": { + "query": { + "match_all": {} + }, + "fields": [ + "*" + ] + } + } + } + } + } + }, + "parameters": [ + { + "name": "allow_no_indices", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "allow_partial_search_results", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "analyzer", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "analyze_wildcard", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "batched_reduce_size", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "ccs_minimize_roundtrips", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "default_operator", + "in": "query", + "schema": { + "$ref": "#/components/schemas/DefaultOperator" + } + }, + { + "name": "df", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "docvalue_fields", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "expand_wildcards", + "in": "query", + "schema": { + "$ref": "#/components/schemas/ExpandWildcards" + } + }, + { + "name": "explain", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "from", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "ignore_throttled", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "ignore_unavailable", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "lenient", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "max_concurrent_shard_requests", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "pre_filter_shard_size", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "preference", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "q", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "request_cache", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "rest_total_hits_as_int", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "routing", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "scroll", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + }, + "examples": { + "PostSearch_example1": { + "summary": "Examples for Post Search Operation.", + "description": "", + "value": "1d" + } + } + }, + { + "name": "search_type", + "in": "query", + "schema": { + "$ref": "#/components/schemas/SearchType" + } + }, + { + "name": "seq_no_primary_term", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "size", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "sort", + "in": "query", + "style": "form", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": true + }, + { + "name": "source", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "source_excludes", + "in": "query", + "style": "form", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": true + }, + { + "name": "source_includes", + "in": "query", + "style": "form", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": true + }, + { + "name": "stats", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "stored_fields", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "suggest_field", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "suggest_mode", + "in": "query", + "schema": { + "$ref": "#/components/schemas/SuggestMode" + } + }, + { + "name": "suggest_size", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "suggest_text", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "terminate_after", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + } + }, + { + "name": "track_scores", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "track_total_hits", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "typed_keys", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "version", + "in": "query", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "PostSearch 200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostSearchResponseContent" + }, + "examples": { + "PostSearch_example1": { + "summary": "Examples for Post Search Operation.", + "description": "", + "value": { + "timed_out": false, + "_shards": { + "total": 1, + "successful": 1, + "skipped": 0, + "failed": 0 + }, + "hits": { + "total": { + "value": 0, + "relation": "eq" + }, + "hits": [] + } + } + } + } + } + } + } + } + } + }, + "/{index}": { + "delete": { + "description": "Removes a document from the index.", + "operationId": "DeleteIndex", + "parameters": [ + { + "name": "index", + "in": "path", + "schema": { + "type": "string", + "pattern": "^[^+_\\-\\.][^\\\\, /*?\"<>| ,#\\nA-Z]+$" + }, + "required": true, + "examples": { + "DeleteIndex_example1": { + "summary": "Examples for Delete Index Operation.", + "description": "", + "value": "books" + } + } + }, + { + "name": "master_timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$", + "deprecated": true + } + }, + { + "name": "cluster_manager_timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + } + }, + { + "name": "allow_no_indices", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "expand_wildcards", + "in": "query", + "schema": { + "$ref": "#/components/schemas/ExpandWildcards" + } + }, + { + "name": "ignore_unavailable", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + } + } + ], + "responses": { + "200": { + "description": "DeleteIndex 200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteIndexResponseContent" + }, + "examples": { + "DeleteIndex_example1": { + "summary": "Examples for Delete Index Operation.", + "description": "", + "value": { + "acknowledged": true + } + } + } + } + } + } + } + }, + "put": { + "description": "Creates index mappings.", + "operationId": "PutCreateIndex", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PutCreateIndexRequestContent" + }, + "examples": { + "PutCreateIndex_example1": { + "summary": "Examples for Create Index Operation.", + "description": "", + "value": {} + } + } + } + } + }, + "parameters": [ + { + "name": "index", + "in": "path", + "schema": { + "type": "string", + "pattern": "^[^+_\\-\\.][^\\\\, /*?\"<>| ,#\\nA-Z]+$" + }, + "required": true, + "examples": { + "PutCreateIndex_example1": { + "summary": "Examples for Create Index Operation.", + "description": "", + "value": "books" + } + } + }, + { + "name": "master_timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$", + "deprecated": true + } + }, + { + "name": "cluster_manager_timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + } + }, + { + "name": "include_type_name", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "wait_for_active_shards", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + } + } + ], + "responses": { + "200": { + "description": "PutCreateIndex 200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PutCreateIndexResponseContent" + }, + "examples": { + "PutCreateIndex_example1": { + "summary": "Examples for Create Index Operation.", + "description": "", + "value": { + "index": "books", + "shards_acknowledged": true, + "acknowledged": true + } + } + } + } + } + } + } + } + }, + "/{index}/_doc/{id}": { + "get": { + "description": "Returns a document", + "operationId": "GetDocumentDoc", + "parameters": [ + { + "name": "index", + "in": "path", + "schema": { + "type": "string", + "pattern": "^[^+_\\-\\.][^\\\\, /*?\"<>| ,#\\nA-Z]+$" + }, + "required": true, + "examples": { + "GetDocumentDoc_example1": { + "summary": "Examples for Get document doc Operation.", + "description": "", + "value": "books" + } + } + }, + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "examples": { + "GetDocumentDoc_example1": { + "summary": "Examples for Get document doc Operation.", + "description": "", + "value": "1" + } + } + }, + { + "name": "preference", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "realtime", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "refresh", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "routing", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "stored_fields", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "_source", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "_source_excludes", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "_source_includes", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "version_type", + "in": "query", + "schema": { + "$ref": "#/components/schemas/VersionType" + } + } + ], + "responses": { + "200": { + "description": "GetDocumentDoc 200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetDocumentDocResponseContent" + }, + "examples": { + "GetDocumentDoc_example1": { + "summary": "Examples for Get document doc Operation.", + "description": "", + "value": { + "_index": "books", + "_id": "1", + "found": true + } + } + } + } + } + } + } + } + }, + "/{index}/_mapping": { + "put": { + "description": "The put mapping API operation lets you add new mappings and fields to an index.", + "operationId": "PutIndexMappingWithIndex", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PutIndexMappingWithIndexRequestContent" + }, + "examples": { + "PutIndexMappingWithIndex_example1": { + "summary": "Examples for Put Index Mapping with index Operation.", + "description": "", + "value": {} + } + } + } + } + }, + "parameters": [ + { + "name": "index", + "in": "path", + "schema": { + "type": "string", + "pattern": "^[^+_\\-\\.][^\\\\, /*?\"<>| ,#\\nA-Z]+$" + }, + "required": true, + "examples": { + "PutIndexMappingWithIndex_example1": { + "summary": "Examples for Put Index Mapping with index Operation.", + "description": "", + "value": "books" + } + } + }, + { + "name": "master_timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$", + "deprecated": true + } + }, + { + "name": "cluster_manager_timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + } + }, + { + "name": "allow_no_indices", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "expand_wildcards", + "in": "query", + "schema": { + "$ref": "#/components/schemas/ExpandWildcards" + } + }, + { + "name": "ignore_unavailable", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "include_type_name", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + } + }, + { + "name": "write_index_only", + "in": "query", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "PutIndexMappingWithIndex 200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PutIndexMappingWithIndexResponseContent" + }, + "examples": { + "PutIndexMappingWithIndex_example1": { + "summary": "Examples for Put Index Mapping with index Operation.", + "description": "", + "value": { + "acknowledged": true + } + } + } + } + } + } + } + } + }, + "/{index}/_search": { + "post": { + "description": "Returns results matching a query.", + "operationId": "PostSearchWithIndex", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostSearchWithIndexRequestContent" + }, + "examples": { + "PostSearchWithIndex_example1": { + "summary": "Examples for Post Search With Index Operation.", + "description": "", + "value": { + "query": { + "match_all": {} + }, + "fields": [ + "*" + ] + } + } + } + } + } + }, + "parameters": [ + { + "name": "index", + "in": "path", + "schema": { + "type": "string", + "pattern": "^[^+_\\-\\.][^\\\\, /*?\"<>| ,#\\nA-Z]+$" + }, + "required": true, + "examples": { + "PostSearchWithIndex_example1": { + "summary": "Examples for Post Search With Index Operation.", + "description": "", + "value": "books" + } + } + }, + { + "name": "allow_no_indices", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "allow_partial_search_results", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "analyzer", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "analyze_wildcard", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "batched_reduce_size", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "ccs_minimize_roundtrips", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "default_operator", + "in": "query", + "schema": { + "$ref": "#/components/schemas/DefaultOperator" + } + }, + { + "name": "df", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "docvalue_fields", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "expand_wildcards", + "in": "query", + "schema": { + "$ref": "#/components/schemas/ExpandWildcards" + } + }, + { + "name": "explain", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "from", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "ignore_throttled", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "ignore_unavailable", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "lenient", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "max_concurrent_shard_requests", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "pre_filter_shard_size", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "preference", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "q", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "request_cache", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "rest_total_hits_as_int", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "routing", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "scroll", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + }, + "examples": { + "PostSearchWithIndex_example1": { + "summary": "Examples for Post Search With Index Operation.", + "description": "", + "value": "1d" + } + } + }, + { + "name": "search_type", + "in": "query", + "schema": { + "$ref": "#/components/schemas/SearchType" + } + }, + { + "name": "seq_no_primary_term", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "size", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "sort", + "in": "query", + "style": "form", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": true + }, + { + "name": "source", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "source_excludes", + "in": "query", + "style": "form", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": true + }, + { + "name": "source_includes", + "in": "query", + "style": "form", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": true + }, + { + "name": "stats", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "stored_fields", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "suggest_field", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "suggest_mode", + "in": "query", + "schema": { + "$ref": "#/components/schemas/SuggestMode" + } + }, + { + "name": "suggest_size", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "suggest_text", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "terminate_after", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + } + }, + { + "name": "track_scores", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "track_total_hits", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "typed_keys", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "version", + "in": "query", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "PostSearchWithIndex 200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostSearchWithIndexResponseContent" + }, + "examples": { + "PostSearchWithIndex_example1": { + "summary": "Examples for Post Search With Index Operation.", + "description": "", + "value": { + "timed_out": false, + "_shards": { + "total": 1, + "successful": 1, + "skipped": 0, + "failed": 0 + }, + "hits": { + "total": { + "value": 0, + "relation": "eq" + }, + "hits": [] + } + } + } + } + } + } + } + } + } + }, + "/{index}/_settings": { + "get": { + "description": "The get settings API operation returns all the settings in your index.", + "operationId": "GetSettingsIndex", + "parameters": [ + { + "name": "index", + "in": "path", + "schema": { + "type": "string", + "pattern": "^[^+_\\-\\.][^\\\\, /*?\"<>| ,#\\nA-Z]+$" + }, + "required": true, + "examples": { + "GetSettingsIndex_example1": { + "summary": "Examples for Get settings Index Operation.", + "description": "", + "value": "books" + } + } + }, + { + "name": "master_timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$", + "deprecated": true + } + }, + { + "name": "cluster_manager_timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + } + }, + { + "name": "allow_no_indices", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "expand_wildcards", + "in": "query", + "schema": { + "$ref": "#/components/schemas/ExpandWildcards" + } + }, + { + "name": "flat_settings", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "include_defaults", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "ignore_unavailable", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "local", + "in": "query", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "GetSettingsIndex 200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSettingsIndexOutputPayload" + } + } + } + } + } + } + }, + "/{index}/_settings/{setting}": { + "get": { + "description": "The get settings API operation returns all the settings in your index.", + "operationId": "GetSettingsIndexSetting", + "parameters": [ + { + "name": "index", + "in": "path", + "schema": { + "type": "string", + "pattern": "^[^+_\\-\\.][^\\\\, /*?\"<>| ,#\\nA-Z]+$" + }, + "required": true, + "examples": { + "GetSettingsIndexSetting_example1": { + "summary": "Examples for Get settings Index-setting Operation.", + "description": "", + "value": "books" + } + } + }, + { + "name": "setting", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "examples": { + "GetSettingsIndexSetting_example1": { + "summary": "Examples for Get settings Index-setting Operation.", + "description": "", + "value": "index" + } + } + }, + { + "name": "master_timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$", + "deprecated": true + } + }, + { + "name": "cluster_manager_timeout", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + } + }, + { + "name": "allow_no_indices", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "expand_wildcards", + "in": "query", + "schema": { + "$ref": "#/components/schemas/ExpandWildcards" + } + }, + { + "name": "flat_settings", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "include_defaults", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "ignore_unavailable", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "local", + "in": "query", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "GetSettingsIndexSetting 200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSettingsIndexSettingOutputPayload" + } + } + } + } + } + } + }, + "/{index}/_source/{id}": { + "get": { + "description": "Returns a document.", + "operationId": "GetDocumentSource", + "parameters": [ + { + "name": "index", + "in": "path", + "schema": { + "type": "string", + "pattern": "^[^+_\\-\\.][^\\\\, /*?\"<>| ,#\\nA-Z]+$" + }, + "required": true, + "examples": { + "GetDocumentSource_example1": { + "summary": "Examples for Get document source Operation.", + "description": "", + "value": "books" + } + } + }, + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "examples": { + "GetDocumentSource_example1": { + "summary": "Examples for Get document source Operation.", + "description": "", + "value": "1" + } + } + }, + { + "name": "preference", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "realtime", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "refresh", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "routing", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "stored_fields", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "_source", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "_source_excludes", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "_source_includes", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "version_type", + "in": "query", + "schema": { + "$ref": "#/components/schemas/VersionType" + } + } + ], + "responses": { + "200": { + "description": "GetDocumentSource 200 response" + } + } + } + } + }, + "components": { + "schemas": { + "ActionObjectStructure": { + "type": "object", + "properties": { + "add": { + "$ref": "#/components/schemas/UserDefinedStructure" + }, + "remove": { + "$ref": "#/components/schemas/UserDefinedStructure" + }, + "remove_index": { + "$ref": "#/components/schemas/UserDefinedStructure" + } + } + }, + "DefaultOperator": { + "type": "string", + "enum": [ + "AND", + "OR" + ] + }, + "DeleteIndexResponseContent": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + } + } + }, + "ExpandWildcards": { + "type": "string", + "enum": [ + "all", + "open", + "closed", + "hidden", + "none" + ] + }, + "GetCatIndicesOutputPayload": {}, + "GetCatIndicesWithIndexOutputPayload": {}, + "GetCatNodesOutputPayload": {}, + "GetClusterInfoResponseContent": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "cluster_name": { + "type": "string" + }, + "cluster_uuid": { + "type": "string" + }, + "version": { + "$ref": "#/components/schemas/Version" + }, + "tagline": { + "type": "string" + } + } + }, + "GetClusterSettingsResponseContent": { + "type": "object", + "properties": { + "persistent": { + "$ref": "#/components/schemas/UserDefinedValueMap" + }, + "transient": { + "$ref": "#/components/schemas/UserDefinedValueMap" + }, + "defaults": { + "$ref": "#/components/schemas/UserDefinedValueMap" + } + } + }, + "GetDocumentDocResponseContent": { + "type": "object", + "properties": { + "_index": { + "type": "string", + "pattern": "^[^+_\\-\\.][^\\\\, /*?\"<>| ,#\\nA-Z]+$" + }, + "_type": { + "type": "string" + }, + "_id": { + "type": "string" + }, + "version": { + "type": "number" + }, + "seq_no": { + "type": "number" + }, + "primary_term": { + "type": "number" + }, + "found": { + "type": "boolean" + }, + "_routing": { + "type": "string" + }, + "_source": { + "$ref": "#/components/schemas/UserDefinedValueMap" + }, + "_fields": { + "$ref": "#/components/schemas/UserDefinedValueMap" + } + }, + "required": [ + "_id", + "_index", + "found" + ] + }, + "GetSettingsIndexOutputPayload": {}, + "GetSettingsIndexSettingOutputPayload": {}, + "HealthStatus": { + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "Hits": { + "type": "object", + "properties": { + "_index": { + "type": "string" + }, + "_type": { + "type": "string" + }, + "_id": { + "type": "string" + }, + "_score": { + "type": "number", + "format": "float" + }, + "_source": {}, + "fields": {} + } + }, + "HitsMetadata": { + "type": "object", + "properties": { + "total": { + "$ref": "#/components/schemas/Total" + }, + "max_score": { + "type": "number", + "format": "double" + }, + "hits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Hits" + } + } + } + }, + "PostAliasesRequestContent": { + "type": "object", + "properties": { + "actions": { + "$ref": "#/components/schemas/ActionObjectStructure" + } + } + }, + "PostAliasesResponseContent": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + } + }, + "required": [ + "acknowledged" + ] + }, + "PostSearchRequestContent": { + "type": "object", + "properties": { + "docvalue_fields": { + "type": "string" + }, + "explain": { + "type": "boolean" + }, + "from": { + "type": "number" + }, + "seq_no_primary_term": { + "type": "boolean" + }, + "size": { + "type": "number" + }, + "source": { + "type": "string" + }, + "stats": { + "type": "string" + }, + "terminate_after": { + "type": "number" + }, + "timeout": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + }, + "version": { + "type": "boolean" + }, + "fields": { + "type": "array", + "items": { + "type": "string" + } + }, + "min_score": { + "type": "number" + }, + "indices_boost": { + "type": "array", + "items": {} + }, + "query": { + "$ref": "#/components/schemas/UserDefinedObjectStructure" + } + } + }, + "PostSearchResponseContent": { + "type": "object", + "properties": { + "_scroll_id": { + "type": "string" + }, + "took": { + "type": "number" + }, + "timed_out": { + "type": "boolean" + }, + "_shards": { + "$ref": "#/components/schemas/ShardStatistics" + }, + "hits": { + "$ref": "#/components/schemas/HitsMetadata" + } + } + }, + "PostSearchWithIndexRequestContent": { + "type": "object", + "properties": { + "docvalue_fields": { + "type": "string" + }, + "explain": { + "type": "boolean" + }, + "from": { + "type": "number" + }, + "seq_no_primary_term": { + "type": "boolean" + }, + "size": { + "type": "number" + }, + "source": { + "type": "string" + }, + "stats": { + "type": "string" + }, + "terminate_after": { + "type": "number" + }, + "timeout": { + "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$" + }, + "version": { + "type": "boolean" + }, + "fields": { + "type": "array", + "items": { + "type": "string" + } + }, + "min_score": { + "type": "number" + }, + "indices_boost": { + "type": "array", + "items": {} + }, + "query": { + "$ref": "#/components/schemas/UserDefinedObjectStructure" + } + } + }, + "PostSearchWithIndexResponseContent": { + "type": "object", + "properties": { + "_scroll_id": { + "type": "string" + }, + "took": { + "type": "number" + }, + "timed_out": { + "type": "boolean" + }, + "_shards": { + "$ref": "#/components/schemas/ShardStatistics" + }, + "hits": { + "$ref": "#/components/schemas/HitsMetadata" + } + } + }, + "PutCreateIndexRequestContent": { + "type": "object", + "properties": { + "aliases": { + "$ref": "#/components/schemas/UserDefinedValueMap" + }, + "mapping": { + "$ref": "#/components/schemas/UserDefinedValueMap" + }, + "settings": { + "$ref": "#/components/schemas/UserDefinedValueMap" + } + } + }, + "PutCreateIndexResponseContent": { + "type": "object", + "properties": { + "index": { + "type": "string", + "pattern": "^[^+_\\-\\.][^\\\\, /*?\"<>| ,#\\nA-Z]+$" + }, + "shards_acknowledged": { + "type": "boolean" + }, + "acknowledged": { + "type": "boolean" + } + }, + "required": [ + "acknowledged", + "index", + "shards_acknowledged" + ] + }, + "PutIndexMappingWithIndexRequestContent": { + "type": "object", + "properties": { + "properties": {} + } + }, + "PutIndexMappingWithIndexResponseContent": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + } + } + }, + "PutUpdateClusterSettingsRequestContent": { + "type": "object", + "properties": { + "persistent": { + "$ref": "#/components/schemas/UserDefinedValueMap" + }, + "transient": { + "$ref": "#/components/schemas/UserDefinedValueMap" + } + } + }, + "PutUpdateClusterSettingsResponseContent": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + }, + "persistent": { + "$ref": "#/components/schemas/UserDefinedValueMap" + }, + "transient": { + "$ref": "#/components/schemas/UserDefinedValueMap" + } + } + }, + "Relation": { + "type": "string", + "enum": [ + "eq", + "gte" + ] + }, + "SearchType": { + "type": "string", + "enum": [ + "0", + "1" + ] + }, + "ShardStatistics": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "successful": { + "type": "number" + }, + "skipped": { + "type": "number" + }, + "failed": { + "type": "number" + } + } + }, + "SuggestMode": { + "type": "string", + "enum": [ + "0", + "1", + "2" + ] + }, + "Total": { + "type": "object", + "properties": { + "value": { + "type": "number" + }, + "relation": { + "$ref": "#/components/schemas/Relation" + } + } + }, + "UserDefinedObjectStructure": { + "type": "object", + "properties": { + "bool": {}, + "boosting": {}, + "combined_fields": {}, + "constant_score": {}, + "dis_max": {}, + "distance_feature": {}, + "exists": {}, + "function_score": {}, + "fuzzy": { + "$ref": "#/components/schemas/UserDefinedValueMap" + }, + "geo_bounding_box": {}, + "geo_distance": {}, + "geo_polygon": {}, + "geo_shape": {}, + "has_child": {}, + "has_parent": {}, + "ids": {}, + "intervals": { + "$ref": "#/components/schemas/UserDefinedValueMap" + }, + "knn": {}, + "match": { + "$ref": "#/components/schemas/UserDefinedValueMap" + }, + "match_all": {}, + "match_bool_prefix": { + "$ref": "#/components/schemas/UserDefinedValueMap" + }, + "match_none": {}, + "match_phrase": { + "$ref": "#/components/schemas/UserDefinedValueMap" + }, + "match_phrase_prefix": { + "$ref": "#/components/schemas/UserDefinedValueMap" + }, + "more_like_this": {}, + "multi_match": {}, + "nested": {}, + "parent_id": {}, + "percolate": {}, + "pinned": {}, + "prefix": { + "$ref": "#/components/schemas/UserDefinedValueMap" + }, + "query_string": {}, + "range": { + "$ref": "#/components/schemas/UserDefinedValueMap" + }, + "rank_feature": {}, + "regexp": { + "$ref": "#/components/schemas/UserDefinedValueMap" + }, + "script": {}, + "script_score": {}, + "shape": {}, + "simple_query_string": {}, + "span_containing": {}, + "field_masking_span": {}, + "span_first": {}, + "span_multi": {}, + "span_near": {}, + "span_not": {}, + "span_or": {}, + "span_term": { + "$ref": "#/components/schemas/UserDefinedValueMap" + }, + "span_within": {}, + "term": { + "$ref": "#/components/schemas/UserDefinedValueMap" + }, + "terms": {}, + "terms_set": { + "$ref": "#/components/schemas/UserDefinedValueMap" + }, + "wildcard": { + "$ref": "#/components/schemas/UserDefinedValueMap" + }, + "wrapper": {} + } + }, + "UserDefinedStructure": { + "type": "object", + "properties": { + "alias": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "type": "string" + } + }, + "filter": {}, + "index": { + "type": "string" + }, + "indices": { + "type": "array", + "items": { + "type": "string" + } + }, + "index_routing": { + "type": "string" + }, + "is_hidden": { + "type": "boolean" + }, + "is_write_index": { + "type": "boolean" + }, + "must_exist": { + "type": "string" + }, + "routing": { + "type": "string" + }, + "search_routing": { + "type": "string" + } + } + }, + "UserDefinedValueMap": { + "type": "object", + "additionalProperties": {} + }, + "Version": { + "type": "object", + "properties": { + "distribution": { + "type": "string" + }, + "number": { + "type": "string" + }, + "build_type": { + "type": "string" + }, + "build_hash": { + "type": "string" + }, + "build_date": { + "type": "string" + }, + "build_snapshot": { + "type": "boolean" + }, + "lucene_version": { + "type": "string" + }, + "minimum_wire_compatibility_version": { + "type": "string" + }, + "minimum_index_compatibility_version": { + "type": "string" + } + } + }, + "VersionType": { + "type": "string", + "enum": [ + "internal", + "external", + "external_gte" + ] + } + }, + "securitySchemes": { + "smithy.api.httpBasicAuth": { + "type": "http", + "description": "HTTP Basic authentication", + "scheme": "Basic" + } + } + }, + "security": [ + { + "smithy.api.httpBasicAuth": [] + } + ] +} diff --git a/dist/favicon-16x16.png b/dist/favicon-16x16.png new file mode 100644 index 000000000..8b194e617 Binary files /dev/null and b/dist/favicon-16x16.png differ diff --git a/dist/favicon-32x32.png b/dist/favicon-32x32.png new file mode 100644 index 000000000..249737fe4 Binary files /dev/null and b/dist/favicon-32x32.png differ diff --git a/dist/index.css b/dist/index.css new file mode 100644 index 000000000..f2376fdaa --- /dev/null +++ b/dist/index.css @@ -0,0 +1,16 @@ +html { + box-sizing: border-box; + overflow: -moz-scrollbars-vertical; + overflow-y: scroll; +} + +*, +*:before, +*:after { + box-sizing: inherit; +} + +body { + margin: 0; + background: #fafafa; +} diff --git a/dist/oauth2-redirect.html b/dist/oauth2-redirect.html new file mode 100644 index 000000000..564091718 --- /dev/null +++ b/dist/oauth2-redirect.html @@ -0,0 +1,79 @@ + + +
+>16&255,u[c++]=t>>8&255,u[c++]=255&t;2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t);1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,a=[],i=16383,s=0,l=n-o;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var o,a,i=[],s=t;ss&&(r=s-l),a=r;a>=0;a--){let r=!0;for(let n=0;n>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let a=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":case"latin1":case"binary":return x(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const C=4096;function O(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o