diff --git a/package.json b/package.json index 59b29dbc..058e6e96 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "pq": "pretty-quick" }, "dependencies": { + "@apache-arrow/ts": "^13.0.0", "@emotion/react": "^11.11.1", "@mantine/carousel": "^6.0.15", "@mantine/core": "^6.0.15", @@ -31,7 +32,10 @@ "immer": "^10.0.2", "js-cookie": "^3.0.5", "just-compare": "^2.3.0", + "long": "^5.2.3", "ms": "^2.1.3", + "nice-grpc-web": "^3.3.1", + "protobufjs": "^7.2.5", "react": "^18.2.0", "react-beautiful-dnd": "^13.1.1", "react-dom": "^18.2.0", @@ -57,8 +61,10 @@ "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.1", + "grpc-tools": "^1.12.4", "prettier": "^2.8.8", "pretty-quick": "^3.1.3", + "ts-proto": "^1.162.1", "typescript": "^5.1.6", "vite": "^4.3.9" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 165152a2..2861636a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,6 +5,9 @@ settings: excludeLinksFromLockfile: false dependencies: + '@apache-arrow/ts': + specifier: ^13.0.0 + version: 13.0.0 '@emotion/react': specifier: ^11.11.1 version: 11.11.1(@types/react@18.2.14)(react@18.2.0) @@ -59,9 +62,18 @@ dependencies: just-compare: specifier: ^2.3.0 version: 2.3.0 + long: + specifier: ^5.2.3 + version: 5.2.3 ms: specifier: ^2.1.3 version: 2.1.3 + nice-grpc-web: + specifier: ^3.3.1 + version: 3.3.1(ws@8.14.2) + protobufjs: + specifier: ^7.2.5 + version: 7.2.5 react: specifier: ^18.2.0 version: 18.2.0 @@ -133,12 +145,18 @@ devDependencies: eslint-plugin-react-refresh: specifier: ^0.4.1 version: 0.4.1(eslint@8.43.0) + grpc-tools: + specifier: ^1.12.4 + version: 1.12.4 prettier: specifier: ^2.8.8 version: 2.8.8 pretty-quick: specifier: ^3.1.3 version: 3.1.3(prettier@2.8.8) + ts-proto: + specifier: ^1.162.1 + version: 1.162.1 typescript: specifier: ^5.1.6 version: 5.1.6 @@ -148,6 +166,29 @@ devDependencies: packages: + /@75lb/deep-merge@1.1.1: + resolution: {integrity: sha512-xvgv6pkMGBA6GwdyJbNAnDmfAIR/DfWhrj9jgWh3TY7gRm3KO46x/GPjRg6wJ0nOepwqrNxFfojebh0Df4h4Tw==} + engines: {node: '>=12.17'} + dependencies: + lodash.assignwith: 4.2.0 + typical: 7.1.1 + dev: false + + /@apache-arrow/ts@13.0.0: + resolution: {integrity: sha512-G3nNWYu25QqXT0m/bs2MMBU+jYxoPYpPjLZJS9Lj5eF1Lg1d0juRjaoW8J/jMVWfXyFo1IYLHeEmfnuoRBB8fA==} + dependencies: + '@types/command-line-args': 5.2.0 + '@types/command-line-usage': 5.0.2 + '@types/node': 20.3.0 + '@types/pad-left': 2.1.1 + command-line-args: 5.2.1 + command-line-usage: 7.0.1 + flatbuffers: 23.5.26 + json-bignum: 0.0.3 + pad-left: 2.1.0 + tslib: 2.6.2 + dev: false + /@babel/code-frame@7.21.4: resolution: {integrity: sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==} engines: {node: '>=6.9.0'} @@ -698,6 +739,24 @@ packages: react: 18.2.0 dev: false + /@mapbox/node-pre-gyp@1.0.11: + resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} + hasBin: true + dependencies: + detect-libc: 2.0.2 + https-proxy-agent: 5.0.1 + make-dir: 3.1.0 + node-fetch: 2.7.0 + nopt: 5.0.0 + npmlog: 5.0.1 + rimraf: 3.0.2 + semver: 7.5.1 + tar: 6.2.0 + transitivePeerDependencies: + - encoding + - supports-color + dev: true + /@monaco-editor/loader@1.3.3(monaco-editor@0.39.0): resolution: {integrity: sha512-6KKF4CTzcJiS8BJwtxtfyYt9shBiEv32ateQ9T4UVogwn4HM/uPo9iJd2Dmbkpz8CM6Y0PDUpjnZzCwC+eYo2Q==} peerDependencies: @@ -741,6 +800,39 @@ packages: fastq: 1.15.0 dev: true + /@protobufjs/aspromise@1.1.2: + resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} + + /@protobufjs/base64@1.1.2: + resolution: {integrity: sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==} + + /@protobufjs/codegen@2.0.4: + resolution: {integrity: sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==} + + /@protobufjs/eventemitter@1.1.0: + resolution: {integrity: sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==} + + /@protobufjs/fetch@1.1.0: + resolution: {integrity: sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==} + dependencies: + '@protobufjs/aspromise': 1.1.2 + '@protobufjs/inquire': 1.1.0 + + /@protobufjs/float@1.0.2: + resolution: {integrity: sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==} + + /@protobufjs/inquire@1.1.0: + resolution: {integrity: sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==} + + /@protobufjs/path@1.1.2: + resolution: {integrity: sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==} + + /@protobufjs/pool@1.1.0: + resolution: {integrity: sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==} + + /@protobufjs/utf8@1.1.0: + resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==} + /@radix-ui/number@1.0.0: resolution: {integrity: sha512-Ofwh/1HX69ZfJRiRBMTy7rgjAzHmwe4kW9C9Y99HTRUcYLUuVT0KESFj15rPjRgKJs20GPq8Bm5aEDJ8DuA3vA==} dependencies: @@ -984,6 +1076,14 @@ packages: resolution: {integrity: sha512-dU54aBwaxG0H+jQ4BdrqtYFN5L7PZevvlnzyL6XeOZgfDS3+sVNCtuG3JmpTEqQSwGLYC1IEwogPGA/Iit2bOA==} dev: false + /@types/command-line-args@5.2.0: + resolution: {integrity: sha512-UuKzKpJJ/Ief6ufIaIzr3A/0XnluX7RvFgwkV89Yzvm77wCh1kFaFmqN8XEnGcN62EuHdedQjEMb8mYxFLGPyA==} + dev: false + + /@types/command-line-usage@5.0.2: + resolution: {integrity: sha512-n7RlEEJ+4x4TS7ZQddTmNSxP+zziEG0TNsMfiRIxcIVXt71ENJ9ojeXmGO3wPoTdn7pJcU2xc3CJYMktNT6DPg==} + dev: false + /@types/hoist-non-react-statics@3.3.1: resolution: {integrity: sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==} dependencies: @@ -1011,9 +1111,16 @@ packages: resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==} dev: true + /@types/node@20.3.0: + resolution: {integrity: sha512-cumHmIAf6On83X7yP+LrsEyUOf/YlociZelmpRYaGFydoaPdxdt80MAbu6vWerQT2COCp2nPvHdsbD7tHn/YlQ==} + dev: false + /@types/node@20.3.2: resolution: {integrity: sha512-vOBLVQeCQfIcF/2Y7eKFTqrMnizK5lRNQ7ykML/5RuwVXVWxYkgwS7xbt4B6fKCUPgbSL5FSsjHQpaGQP/dQmw==} - dev: true + + /@types/pad-left@2.1.1: + resolution: {integrity: sha512-Xd22WCRBydkGSApl5Bw0PhAOHKSVjNL3E3AwzKaps96IMraPqy5BvZIsBVK6JLwdybUzjHnuWVwpDd0JjTfHXA==} + dev: false /@types/parse-json@4.0.0: resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==} @@ -1204,6 +1311,14 @@ packages: - '@swc/helpers' dev: true + /abbrev@1.1.1: + resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} + dev: true + + /abort-controller-x@0.4.3: + resolution: {integrity: sha512-VtUwTNU8fpMwvWGn4xE93ywbogTYsuT+AUxAXOeelbXuQVIwNmC5YLeho9sH4vZ4ITW8414TTAOG1nW6uIVHCA==} + dev: false + /acorn-jsx@5.3.2(acorn@8.8.2): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -1218,6 +1333,15 @@ packages: hasBin: true dev: true + /agent-base@6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} + dependencies: + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: true + /ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} dependencies: @@ -1244,6 +1368,17 @@ packages: engines: {node: '>=8'} dependencies: color-convert: 2.0.1 + + /aproba@2.0.0: + resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} + dev: true + + /are-we-there-yet@2.0.0: + resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==} + engines: {node: '>=10'} + dependencies: + delegates: 1.0.0 + readable-stream: 3.6.2 dev: true /argparse@2.0.1: @@ -1257,6 +1392,16 @@ packages: tslib: 2.5.2 dev: false + /array-back@3.1.0: + resolution: {integrity: sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==} + engines: {node: '>=6'} + dev: false + + /array-back@6.2.2: + resolution: {integrity: sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==} + engines: {node: '>=12.17'} + dev: false + /array-buffer-byte-length@1.0.0: resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} dependencies: @@ -1377,6 +1522,18 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} + /case-anything@2.1.13: + resolution: {integrity: sha512-zlOQ80VrQ2Ue+ymH5OuM/DlDq64mEm+B9UTdHULv5osUMD6HalNTblf2b1u/m6QecjsnOkBpqVZ+XPwIVsy7Ng==} + engines: {node: '>=12.13'} + dev: true + + /chalk-template@0.4.0: + resolution: {integrity: sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==} + engines: {node: '>=12'} + dependencies: + chalk: 4.1.2 + dev: false + /chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -1400,6 +1557,10 @@ packages: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 + + /chownr@2.0.0: + resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} + engines: {node: '>=10'} dev: true /clsx@1.1.1: @@ -1418,7 +1579,6 @@ packages: engines: {node: '>=7.0.0'} dependencies: color-name: 1.1.4 - dev: true /color-name@1.1.3: resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} @@ -1426,6 +1586,10 @@ packages: /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + /color-support@1.1.3: + resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} + hasBin: true dev: true /combined-stream@1.0.8: @@ -1435,10 +1599,34 @@ packages: delayed-stream: 1.0.0 dev: false + /command-line-args@5.2.1: + resolution: {integrity: sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==} + engines: {node: '>=4.0.0'} + dependencies: + array-back: 3.1.0 + find-replace: 3.0.0 + lodash.camelcase: 4.3.0 + typical: 4.0.0 + dev: false + + /command-line-usage@7.0.1: + resolution: {integrity: sha512-NCyznE//MuTjwi3y84QVUGEOT+P5oto1e1Pk/jFPVdPPfsG03qpTIl3yw6etR+v73d0lXsoojRpvbru2sqePxQ==} + engines: {node: '>=12.20.0'} + dependencies: + array-back: 6.2.2 + chalk-template: 0.4.0 + table-layout: 3.0.2 + typical: 7.1.1 + dev: false + /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true + /console-control-strings@1.1.0: + resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} + dev: true + /convert-source-map@1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} dev: false @@ -1520,6 +1708,21 @@ packages: engines: {node: '>=0.4.0'} dev: false + /delegates@1.0.0: + resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} + dev: true + + /detect-libc@1.0.3: + resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==} + engines: {node: '>=0.10'} + hasBin: true + dev: true + + /detect-libc@2.0.2: + resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==} + engines: {node: '>=8'} + dev: true + /detect-node-es@1.1.0: resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} dev: false @@ -1552,6 +1755,12 @@ packages: csstype: 3.1.2 dev: false + /dprint-node@1.0.8: + resolution: {integrity: sha512-iVKnUtYfGrYcW1ZAlfR/F59cUVL8QIhWoBJoSjkkdua/dkWIgjZfiLMeTjiB06X0ZLkQ0M2C1VbUj/CxkIf1zg==} + dependencies: + detect-libc: 1.0.3 + dev: true + /embla-carousel-react@7.1.0(react@18.2.0): resolution: {integrity: sha512-tbYRPRZSDNd2QLNqYDcArAakGIxtUbhS7tkP0dGXktXHGgcX+3ji3VrOUTOftBiujZrMV8kRxtrRUe/1soloIQ==} peerDependencies: @@ -1565,6 +1774,10 @@ packages: resolution: {integrity: sha512-Bh8Pa8NWzgugLkf8sAGexQlBCNDFaej5BXiKgQdRJ1mUC9NWBrw9Z23YVPVGkguWoz5LMjZXXFVGCobl3UPt/Q==} dev: false + /emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + dev: true + /end-of-stream@1.4.4: resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} dependencies: @@ -1987,6 +2200,13 @@ packages: to-regex-range: 5.0.1 dev: true + /find-replace@3.0.0: + resolution: {integrity: sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==} + engines: {node: '>=4.0.0'} + dependencies: + array-back: 3.1.0 + dev: false + /find-root@1.1.0: resolution: {integrity: sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==} dev: false @@ -2015,6 +2235,10 @@ packages: rimraf: 3.0.2 dev: true + /flatbuffers@23.5.26: + resolution: {integrity: sha512-vE+SI9vrJDwi1oETtTIFldC/o9GsVKRM+s6EL0nQgxXlYV1Vc4Tk30hj4xGICftInKQKj1F3up2n8UbIVobISQ==} + dev: false + /flatted@3.2.7: resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} dev: true @@ -2044,6 +2268,13 @@ packages: mime-types: 2.1.35 dev: false + /fs-minipass@2.1.0: + resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} + engines: {node: '>= 8'} + dependencies: + minipass: 3.3.6 + dev: true + /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} dev: true @@ -2073,6 +2304,21 @@ packages: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} dev: true + /gauge@3.0.2: + resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==} + engines: {node: '>=10'} + dependencies: + aproba: 2.0.0 + color-support: 1.1.3 + console-control-strings: 1.1.0 + has-unicode: 2.0.1 + object-assign: 4.1.1 + signal-exit: 3.0.7 + string-width: 4.2.3 + strip-ansi: 6.0.1 + wide-align: 1.1.5 + dev: true + /get-intrinsic@1.2.1: resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} dependencies: @@ -2167,6 +2413,17 @@ packages: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true + /grpc-tools@1.12.4: + resolution: {integrity: sha512-5+mLAJJma3BjnW/KQp6JBjUMgvu7Mu3dBvBPd1dcbNIb+qiR0817zDpgPjS7gRb+l/8EVNIa3cB02xI9JLToKg==} + hasBin: true + requiresBuild: true + dependencies: + '@mapbox/node-pre-gyp': 1.0.11 + transitivePeerDependencies: + - encoding + - supports-color + dev: true + /has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} dev: true @@ -2179,7 +2436,6 @@ packages: /has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} - dev: true /has-property-descriptors@1.0.0: resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} @@ -2204,6 +2460,10 @@ packages: has-symbols: 1.0.3 dev: true + /has-unicode@2.0.1: + resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} + dev: true + /has@1.0.3: resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} engines: {node: '>= 0.4.0'} @@ -2220,6 +2480,16 @@ packages: resolution: {integrity: sha512-feERVo9iWxvnejp3SEfm/+oNG517npqL2/PIA8ORjyOZjGC7TwCRQsZylciLS64i6pJ0wRYz3rkXLRwbtFa8Ng==} dev: false + /https-proxy-agent@5.0.1: + resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} + engines: {node: '>= 6'} + dependencies: + agent-base: 6.0.2 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: true + /human-signals@1.1.1: resolution: {integrity: sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==} engines: {node: '>=8.12.0'} @@ -2320,6 +2590,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + dev: true + /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -2403,6 +2678,18 @@ packages: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true + /isomorphic-ws@5.0.0(ws@8.14.2): + resolution: {integrity: sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==} + peerDependencies: + ws: '*' + dependencies: + ws: 8.14.2 + dev: false + + /js-base64@3.7.5: + resolution: {integrity: sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA==} + dev: false + /js-cookie@3.0.5: resolution: {integrity: sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==} engines: {node: '>=14'} @@ -2418,6 +2705,11 @@ packages: argparse: 2.0.1 dev: true + /json-bignum@0.0.3: + resolution: {integrity: sha512-2WHyXj3OfHSgNyuzDbSxI1w2jgw5gkWSWhS7Qg4bWXx1nLk3jnbwfUeS0PSba3IzpTUWdHxBieELUzXRjQB2zg==} + engines: {node: '>=0.8'} + dev: false + /json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} dev: false @@ -2480,10 +2772,21 @@ packages: p-locate: 5.0.0 dev: true + /lodash.assignwith@4.2.0: + resolution: {integrity: sha512-ZznplvbvtjK2gMvnQ1BR/zqPFZmS6jbK4p+6Up4xcRYA7yMIwxHCfbTcrYxXKzzqLsQ05eJPVznEW3tuwV7k1g==} + dev: false + + /lodash.camelcase@4.3.0: + resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} + dev: false + /lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true + /long@5.2.3: + resolution: {integrity: sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==} + /loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true @@ -2497,6 +2800,13 @@ packages: yallist: 4.0.0 dev: true + /make-dir@3.1.0: + resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} + engines: {node: '>=8'} + dependencies: + semver: 6.3.0 + dev: true + /memoize-one@5.2.1: resolution: {integrity: sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==} dev: false @@ -2545,6 +2855,32 @@ packages: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: true + /minipass@3.3.6: + resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} + engines: {node: '>=8'} + dependencies: + yallist: 4.0.0 + dev: true + + /minipass@5.0.0: + resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} + engines: {node: '>=8'} + dev: true + + /minizlib@2.1.2: + resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} + engines: {node: '>= 8'} + dependencies: + minipass: 3.3.6 + yallist: 4.0.0 + dev: true + + /mkdirp@1.0.4: + resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + engines: {node: '>=10'} + hasBin: true + dev: true + /monaco-editor@0.39.0: resolution: {integrity: sha512-zhbZ2Nx93tLR8aJmL2zI1mhJpsl87HMebNBM6R8z4pLfs8pj604pIVIVwyF1TivcfNtIPpMXL+nb3DsBmE/x6Q==} dev: false @@ -2586,6 +2922,43 @@ packages: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true + /nice-grpc-common@2.0.2: + resolution: {integrity: sha512-7RNWbls5kAL1QVUOXvBsv1uO0wPQK3lHv+cY1gwkTzirnG1Nop4cBJZubpgziNbaVc/bl9QJcyvsf/NQxa3rjQ==} + dependencies: + ts-error: 1.0.6 + dev: false + + /nice-grpc-web@3.3.1(ws@8.14.2): + resolution: {integrity: sha512-KXListAFLjJ7L/GsrRW5YWT+2oZDaF8Lu19ms7+HMykDGtIksqvZwR6+EzVmunFJciiNDShJ4EXr1W6eaiZoDQ==} + dependencies: + abort-controller-x: 0.4.3 + isomorphic-ws: 5.0.0(ws@8.14.2) + js-base64: 3.7.5 + nice-grpc-common: 2.0.2 + transitivePeerDependencies: + - ws + dev: false + + /node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + dependencies: + whatwg-url: 5.0.0 + dev: true + + /nopt@5.0.0: + resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==} + engines: {node: '>=6'} + hasBin: true + dependencies: + abbrev: 1.1.1 + dev: true + /npm-run-path@4.0.1: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} @@ -2593,6 +2966,15 @@ packages: path-key: 3.1.1 dev: true + /npmlog@5.0.1: + resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==} + dependencies: + are-we-there-yet: 2.0.0 + console-control-strings: 1.1.0 + gauge: 3.0.2 + set-blocking: 2.0.0 + dev: true + /object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} @@ -2708,6 +3090,13 @@ packages: engines: {node: '>=6'} dev: true + /pad-left@2.1.0: + resolution: {integrity: sha512-HJxs9K9AztdIQIAIa/OIazRAUW/L6B9hbQDxO4X07roW3eo9XqZc2ur9bn1StH9CnbbI9EgvejHQX7CBpCF1QA==} + engines: {node: '>=0.10.0'} + dependencies: + repeat-string: 1.6.1 + dev: false + /parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -2813,6 +3202,24 @@ packages: object-assign: 4.1.1 react-is: 16.13.1 + /protobufjs@7.2.5: + resolution: {integrity: sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==} + engines: {node: '>=12.0.0'} + requiresBuild: true + dependencies: + '@protobufjs/aspromise': 1.1.2 + '@protobufjs/base64': 1.1.2 + '@protobufjs/codegen': 2.0.4 + '@protobufjs/eventemitter': 1.1.0 + '@protobufjs/fetch': 1.1.0 + '@protobufjs/float': 1.0.2 + '@protobufjs/inquire': 1.1.0 + '@protobufjs/path': 1.1.2 + '@protobufjs/pool': 1.1.0 + '@protobufjs/utf8': 1.1.0 + '@types/node': 20.3.2 + long: 5.2.3 + /proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} dev: false @@ -3037,6 +3444,15 @@ packages: loose-envify: 1.4.0 dev: false + /readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + dev: true + /redux@4.2.1: resolution: {integrity: sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==} dependencies: @@ -3056,6 +3472,11 @@ packages: functions-have-names: 1.2.3 dev: true + /repeat-string@1.6.1: + resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==} + engines: {node: '>=0.10'} + dev: false + /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -3103,6 +3524,10 @@ packages: queue-microtask: 1.2.3 dev: true + /safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + dev: true + /safe-regex-test@1.0.0: resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} dependencies: @@ -3130,6 +3555,10 @@ packages: lru-cache: 6.0.0 dev: true + /set-blocking@2.0.0: + resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + dev: true + /shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -3173,6 +3602,20 @@ packages: resolution: {integrity: sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w==} dev: false + /stream-read-all@3.0.1: + resolution: {integrity: sha512-EWZT9XOceBPlVJRrYcykW8jyRSZYbkb/0ZK36uLEmoWVO5gxBOnntNTseNzfREsqxqdfEGQrD8SXQ3QWbBmq8A==} + engines: {node: '>=10'} + dev: false + + /string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + dev: true + /string.prototype.matchall@4.0.8: resolution: {integrity: sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg==} dependencies: @@ -3211,6 +3654,12 @@ packages: es-abstract: 1.21.2 dev: true + /string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + dependencies: + safe-buffer: 5.2.1 + dev: true + /strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -3249,7 +3698,6 @@ packages: engines: {node: '>=8'} dependencies: has-flag: 4.0.0 - dev: true /supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} @@ -3259,6 +3707,32 @@ packages: resolution: {integrity: sha512-qCN98uP7i9z0fIS4amQ5zbGBOq+OSigYeGvPy7NDk8Y9yncqDZ9pRPgfsc2PJIVM9RrJj7GIfuRgmjoUU9zTHQ==} dev: false + /table-layout@3.0.2: + resolution: {integrity: sha512-rpyNZYRw+/C+dYkcQ3Pr+rLxW4CfHpXjPDnG7lYhdRoUcZTUt+KEsX+94RGp/aVp/MQU35JCITv2T/beY4m+hw==} + engines: {node: '>=12.17'} + hasBin: true + dependencies: + '@75lb/deep-merge': 1.1.1 + array-back: 6.2.2 + command-line-args: 5.2.1 + command-line-usage: 7.0.1 + stream-read-all: 3.0.1 + typical: 7.1.1 + wordwrapjs: 5.1.0 + dev: false + + /tar@6.2.0: + resolution: {integrity: sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==} + engines: {node: '>=10'} + dependencies: + chownr: 2.0.0 + fs-minipass: 2.1.0 + minipass: 5.0.0 + minizlib: 2.1.2 + mkdirp: 1.0.4 + yallist: 4.0.0 + dev: true + /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true @@ -3279,6 +3753,37 @@ packages: is-number: 7.0.0 dev: true + /tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + dev: true + + /ts-error@1.0.6: + resolution: {integrity: sha512-tLJxacIQUM82IR7JO1UUkKlYuUTmoY9HBJAmNWFzheSlDS5SPMcNIepejHJa4BpPQLAcbRhRf3GDJzyj6rbKvA==} + dev: false + + /ts-poet@6.6.0: + resolution: {integrity: sha512-4vEH/wkhcjRPFOdBwIh9ItO6jOoumVLRF4aABDX5JSNEubSqwOulihxQPqai+OkuygJm3WYMInxXQX4QwVNMuw==} + dependencies: + dprint-node: 1.0.8 + dev: true + + /ts-proto-descriptors@1.15.0: + resolution: {integrity: sha512-TYyJ7+H+7Jsqawdv+mfsEpZPTIj9siDHS6EMCzG/z3b/PZiphsX+mWtqFfFVe5/N0Th6V3elK9lQqjnrgTOfrg==} + dependencies: + long: 5.2.3 + protobufjs: 7.2.5 + dev: true + + /ts-proto@1.162.1: + resolution: {integrity: sha512-pzg5AKS04Nju6MNR2OSoQKszo5Q8FkB1SOrCvspCuIiAMDa0mJj4m5V99DFjdoyek+lx/U1x/ox/p99tOztKvg==} + hasBin: true + dependencies: + case-anything: 2.1.13 + protobufjs: 7.2.5 + ts-poet: 6.6.0 + ts-proto-descriptors: 1.15.0 + dev: true + /tsconfig-paths@3.14.2: resolution: {integrity: sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==} dependencies: @@ -3296,6 +3801,10 @@ packages: resolution: {integrity: sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA==} dev: false + /tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + dev: false + /tsutils@3.21.0(typescript@5.1.6): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} @@ -3332,6 +3841,16 @@ packages: hasBin: true dev: true + /typical@4.0.0: + resolution: {integrity: sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==} + engines: {node: '>=8'} + dev: false + + /typical@7.1.1: + resolution: {integrity: sha512-T+tKVNs6Wu7IWiAce5BgMd7OZfNYUndHwc5MknN+UHOudi7sGZzuHdCadllRuqJ3fPtgFtIH9+lt9qRv6lmpfA==} + engines: {node: '>=12.17'} + dev: false + /unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} dependencies: @@ -3421,6 +3940,10 @@ packages: tslib: 2.5.2 dev: false + /util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + dev: true + /vite@4.3.9(@types/node@20.3.2): resolution: {integrity: sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==} engines: {node: ^14.18.0 || >=16.0.0} @@ -3454,6 +3977,17 @@ packages: fsevents: 2.3.2 dev: true + /webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + dev: true + + /whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + dev: true + /which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} dependencies: @@ -3484,15 +4018,39 @@ packages: isexe: 2.0.0 dev: true + /wide-align@1.1.5: + resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} + dependencies: + string-width: 4.2.3 + dev: true + /word-wrap@1.2.3: resolution: {integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==} engines: {node: '>=0.10.0'} dev: true + /wordwrapjs@5.1.0: + resolution: {integrity: sha512-JNjcULU2e4KJwUNv6CHgI46UvDGitb6dGryHajXTDiLgg1/RiGoPSDw4kZfYnwGtEXf2ZMeIewDQgFGzkCB2Sg==} + engines: {node: '>=12.17'} + dev: false + /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: true + /ws@8.14.2: + resolution: {integrity: sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + dev: false + /yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} dev: true diff --git a/src/@types/parseable/api/about.ts b/src/@types/parseable/api/about.ts index e66ce9ae..8e137e45 100644 --- a/src/@types/parseable/api/about.ts +++ b/src/@types/parseable/api/about.ts @@ -11,4 +11,5 @@ export type AboutData = { llmActive: boolean; llmProvider: string; uiVersion: string; + grpcPort: number; }; diff --git a/src/assets/arrow.proto b/src/assets/arrow.proto new file mode 100755 index 00000000..cce76610 --- /dev/null +++ b/src/assets/arrow.proto @@ -0,0 +1,436 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +syntax = "proto3"; +import "google/protobuf/timestamp.proto"; + +option java_package = "org.apache.arrow.flight.impl"; +option go_package = "github.com/apache/arrow/go/arrow/flight/internal/flight"; +option csharp_namespace = "Apache.Arrow.Flight.Protocol"; + +package arrow.flight.protocol; + +/* + * A flight service is an endpoint for retrieving or storing Arrow data. A + * flight service can expose one or more predefined endpoints that can be + * accessed using the Arrow Flight Protocol. Additionally, a flight service + * can expose a set of actions that are available. + */ +service FlightService { + + /* + * Handshake between client and server. Depending on the server, the + * handshake may be required to determine the token that should be used for + * future operations. Both request and response are streams to allow multiple + * round-trips depending on auth mechanism. + */ + rpc Handshake(stream HandshakeRequest) returns (stream HandshakeResponse) {} + + /* + * Get a list of available streams given a particular criteria. Most flight + * services will expose one or more streams that are readily available for + * retrieval. This api allows listing the streams available for + * consumption. A user can also provide a criteria. The criteria can limit + * the subset of streams that can be listed via this interface. Each flight + * service allows its own definition of how to consume criteria. + */ + rpc ListFlights(Criteria) returns (stream FlightInfo) {} + + /* + * For a given FlightDescriptor, get information about how the flight can be + * consumed. This is a useful interface if the consumer of the interface + * already can identify the specific flight to consume. This interface can + * also allow a consumer to generate a flight stream through a specified + * descriptor. For example, a flight descriptor might be something that + * includes a SQL statement or a Pickled Python operation that will be + * executed. In those cases, the descriptor will not be previously available + * within the list of available streams provided by ListFlights but will be + * available for consumption for the duration defined by the specific flight + * service. + */ + rpc GetFlightInfo(FlightDescriptor) returns (FlightInfo) {} + + /* + * For a given FlightDescriptor, get the Schema as described in Schema.fbs::Schema + * This is used when a consumer needs the Schema of flight stream. Similar to + * GetFlightInfo this interface may generate a new flight that was not previously + * available in ListFlights. + */ + rpc GetSchema(FlightDescriptor) returns (SchemaResult) {} + + /* + * Retrieve a single stream associated with a particular descriptor + * associated with the referenced ticket. A Flight can be composed of one or + * more streams where each stream can be retrieved using a separate opaque + * ticket that the flight service uses for managing a collection of streams. + */ + rpc DoGet(Ticket) returns (stream FlightData) {} + + /* + * Push a stream to the flight service associated with a particular + * flight stream. This allows a client of a flight service to upload a stream + * of data. Depending on the particular flight service, a client consumer + * could be allowed to upload a single stream per descriptor or an unlimited + * number. In the latter, the service might implement a 'seal' action that + * can be applied to a descriptor once all streams are uploaded. + */ + rpc DoPut(stream FlightData) returns (stream PutResult) {} + + /* + * Open a bidirectional data channel for a given descriptor. This + * allows clients to send and receive arbitrary Arrow data and + * application-specific metadata in a single logical stream. In + * contrast to DoGet/DoPut, this is more suited for clients + * offloading computation (rather than storage) to a Flight service. + */ + rpc DoExchange(stream FlightData) returns (stream FlightData) {} + + /* + * Flight services can support an arbitrary number of simple actions in + * addition to the possible ListFlights, GetFlightInfo, DoGet, DoPut + * operations that are potentially available. DoAction allows a flight client + * to do a specific action against a flight service. An action includes + * opaque request and response objects that are specific to the type action + * being undertaken. + */ + rpc DoAction(Action) returns (stream Result) {} + + /* + * A flight service exposes all of the available action types that it has + * along with descriptions. This allows different flight consumers to + * understand the capabilities of the flight service. + */ + rpc ListActions(Empty) returns (stream ActionType) {} + +} + +/* + * The request that a client provides to a server on handshake. + */ +message HandshakeRequest { + + /* + * A defined protocol version + */ + uint64 protocol_version = 1; + + /* + * Arbitrary auth/handshake info. + */ + bytes payload = 2; +} + +message HandshakeResponse { + + /* + * A defined protocol version + */ + uint64 protocol_version = 1; + + /* + * Arbitrary auth/handshake info. + */ + bytes payload = 2; +} + +/* + * A message for doing simple auth. + */ +message BasicAuth { + string username = 2; + string password = 3; +} + +message Empty {} + +/* + * Describes an available action, including both the name used for execution + * along with a short description of the purpose of the action. + */ +message ActionType { + string type = 1; + string description = 2; +} + +/* + * A service specific expression that can be used to return a limited set + * of available Arrow Flight streams. + */ +message Criteria { + bytes expression = 1; +} + +/* + * An opaque action specific for the service. + */ +message Action { + string type = 1; + bytes body = 2; +} + +/* + * The request of the CancelFlightInfo action. + * + * The request should be stored in Action.body. + */ +message CancelFlightInfoRequest { + FlightInfo info = 1; +} + +/* + * The request of the RenewFlightEndpoint action. + * + * The request should be stored in Action.body. + */ +message RenewFlightEndpointRequest { + FlightEndpoint endpoint = 1; +} + +/* + * An opaque result returned after executing an action. + */ +message Result { + bytes body = 1; +} + +/* + * The result of a cancel operation. + * + * This is used by CancelFlightInfoResult.status. + */ +enum CancelStatus { + // The cancellation status is unknown. Servers should avoid using + // this value (send a NOT_FOUND error if the requested query is + // not known). Clients can retry the request. + CANCEL_STATUS_UNSPECIFIED = 0; + // The cancellation request is complete. Subsequent requests with + // the same payload may return CANCELLED or a NOT_FOUND error. + CANCEL_STATUS_CANCELLED = 1; + // The cancellation request is in progress. The client may retry + // the cancellation request. + CANCEL_STATUS_CANCELLING = 2; + // The query is not cancellable. The client should not retry the + // cancellation request. + CANCEL_STATUS_NOT_CANCELLABLE = 3; +} + +/* + * The result of the CancelFlightInfo action. + * + * The result should be stored in Result.body. + */ +message CancelFlightInfoResult { + CancelStatus status = 1; +} + +/* + * Wrap the result of a getSchema call + */ +message SchemaResult { + // The schema of the dataset in its IPC form: + // 4 bytes - an optional IPC_CONTINUATION_TOKEN prefix + // 4 bytes - the byte length of the payload + // a flatbuffer Message whose header is the Schema + bytes schema = 1; +} + +/* + * The name or tag for a Flight. May be used as a way to retrieve or generate + * a flight or be used to expose a set of previously defined flights. + */ +message FlightDescriptor { + + /* + * Describes what type of descriptor is defined. + */ + enum DescriptorType { + + // Protobuf pattern, not used. + UNKNOWN = 0; + + /* + * A named path that identifies a dataset. A path is composed of a string + * or list of strings describing a particular dataset. This is conceptually + * similar to a path inside a filesystem. + */ + PATH = 1; + + /* + * An opaque command to generate a dataset. + */ + CMD = 2; + } + + DescriptorType type = 1; + + /* + * Opaque value used to express a command. Should only be defined when + * type = CMD. + */ + bytes cmd = 2; + + /* + * List of strings identifying a particular dataset. Should only be defined + * when type = PATH. + */ + repeated string path = 3; +} + +/* + * The access coordinates for retrieval of a dataset. With a FlightInfo, a + * consumer is able to determine how to retrieve a dataset. + */ +message FlightInfo { + // The schema of the dataset in its IPC form: + // 4 bytes - an optional IPC_CONTINUATION_TOKEN prefix + // 4 bytes - the byte length of the payload + // a flatbuffer Message whose header is the Schema + bytes schema = 1; + + /* + * The descriptor associated with this info. + */ + FlightDescriptor flight_descriptor = 2; + + /* + * A list of endpoints associated with the flight. To consume the + * whole flight, all endpoints (and hence all Tickets) must be + * consumed. Endpoints can be consumed in any order. + * + * In other words, an application can use multiple endpoints to + * represent partitioned data. + * + * If the returned data has an ordering, an application can use + * "FlightInfo.ordered = true" or should return the all data in a + * single endpoint. Otherwise, there is no ordering defined on + * endpoints or the data within. + * + * A client can read ordered data by reading data from returned + * endpoints, in order, from front to back. + * + * Note that a client may ignore "FlightInfo.ordered = true". If an + * ordering is important for an application, an application must + * choose one of them: + * + * * An application requires that all clients must read data in + * returned endpoints order. + * * An application must return the all data in a single endpoint. + */ + repeated FlightEndpoint endpoint = 3; + + // Set these to -1 if unknown. + int64 total_records = 4; + int64 total_bytes = 5; + + /* + * FlightEndpoints are in the same order as the data. + */ + bool ordered = 6; +} + +/* + * A particular stream or split associated with a flight. + */ +message FlightEndpoint { + + /* + * Token used to retrieve this stream. + */ + Ticket ticket = 1; + + /* + * A list of URIs where this ticket can be redeemed via DoGet(). + * + * If the list is empty, the expectation is that the ticket can only + * be redeemed on the current service where the ticket was + * generated. + * + * If the list is not empty, the expectation is that the ticket can + * be redeemed at any of the locations, and that the data returned + * will be equivalent. In this case, the ticket may only be redeemed + * at one of the given locations, and not (necessarily) on the + * current service. + * + * In other words, an application can use multiple locations to + * represent redundant and/or load balanced services. + */ + repeated Location location = 2; + + /* + * Expiration time of this stream. If present, clients may assume + * they can retry DoGet requests. Otherwise, it is + * application-defined whether DoGet requests may be retried. + */ + google.protobuf.Timestamp expiration_time = 3; +} + +/* + * A location where a Flight service will accept retrieval of a particular + * stream given a ticket. + */ +message Location { + string uri = 1; +} + +/* + * An opaque identifier that the service can use to retrieve a particular + * portion of a stream. + * + * Tickets are meant to be single use. It is an error/application-defined + * behavior to reuse a ticket. + */ +message Ticket { + bytes ticket = 1; +} + +/* + * A batch of Arrow data as part of a stream of batches. + */ +message FlightData { + + /* + * The descriptor of the data. This is only relevant when a client is + * starting a new DoPut stream. + */ + FlightDescriptor flight_descriptor = 1; + + /* + * Header for message data as described in Message.fbs::Message. + */ + bytes data_header = 2; + + /* + * Application-defined metadata. + */ + bytes app_metadata = 3; + + /* + * The actual batch of Arrow data. Preferably handled with minimal-copies + * coming last in the definition to help with sidecar patterns (it is + * expected that some implementations will fetch this field off the wire + * with specialized code to avoid extra memory copies). + */ + bytes data_body = 1000; +} + +/** + * The response message associated with the submission of a DoPut. + */ +message PutResult { + bytes app_metadata = 1; +} \ No newline at end of file diff --git a/src/assets/arrow.ts b/src/assets/arrow.ts new file mode 100644 index 00000000..24107916 --- /dev/null +++ b/src/assets/arrow.ts @@ -0,0 +1,1703 @@ +/* eslint-disable */ +import type { CallContext, CallOptions } from "nice-grpc-common"; +import * as _m0 from "protobufjs/minimal"; +import { Timestamp } from "./google/protobuf/timestamp"; +import Long from "long"; +export const protobufPackage = "arrow.flight.protocol"; + +/** + * The result of a cancel operation. + * + * This is used by CancelFlightInfoResult.status. + */ +export enum CancelStatus { + /** + * CANCEL_STATUS_UNSPECIFIED - The cancellation status is unknown. Servers should avoid using + * this value (send a NOT_FOUND error if the requested query is + * not known). Clients can retry the request. + */ + CANCEL_STATUS_UNSPECIFIED = 0, + /** + * CANCEL_STATUS_CANCELLED - The cancellation request is complete. Subsequent requests with + * the same payload may return CANCELLED or a NOT_FOUND error. + */ + CANCEL_STATUS_CANCELLED = 1, + /** + * CANCEL_STATUS_CANCELLING - The cancellation request is in progress. The client may retry + * the cancellation request. + */ + CANCEL_STATUS_CANCELLING = 2, + /** + * CANCEL_STATUS_NOT_CANCELLABLE - The query is not cancellable. The client should not retry the + * cancellation request. + */ + CANCEL_STATUS_NOT_CANCELLABLE = 3, + UNRECOGNIZED = -1, +} + +/** The request that a client provides to a server on handshake. */ +export interface HandshakeRequest { + /** A defined protocol version */ + protocolVersion: number; + /** Arbitrary auth/handshake info. */ + payload: Uint8Array; +} + +export interface HandshakeResponse { + /** A defined protocol version */ + protocolVersion: number; + /** Arbitrary auth/handshake info. */ + payload: Uint8Array; +} + +/** A message for doing simple auth. */ +export interface BasicAuth { + username: string; + password: string; +} + +export interface Empty { +} + +/** + * Describes an available action, including both the name used for execution + * along with a short description of the purpose of the action. + */ +export interface ActionType { + type: string; + description: string; +} + +/** + * A service specific expression that can be used to return a limited set + * of available Arrow Flight streams. + */ +export interface Criteria { + expression: Uint8Array; +} + +/** An opaque action specific for the service. */ +export interface Action { + type: string; + body: Uint8Array; +} + +/** + * The request of the CancelFlightInfo action. + * + * The request should be stored in Action.body. + */ +export interface CancelFlightInfoRequest { + info: FlightInfo | undefined; +} + +/** + * The request of the RenewFlightEndpoint action. + * + * The request should be stored in Action.body. + */ +export interface RenewFlightEndpointRequest { + endpoint: FlightEndpoint | undefined; +} + +/** An opaque result returned after executing an action. */ +export interface Result { + body: Uint8Array; +} + +/** + * The result of the CancelFlightInfo action. + * + * The result should be stored in Result.body. + */ +export interface CancelFlightInfoResult { + status: CancelStatus; +} + +/** Wrap the result of a getSchema call */ +export interface SchemaResult { + /** + * The schema of the dataset in its IPC form: + * 4 bytes - an optional IPC_CONTINUATION_TOKEN prefix + * 4 bytes - the byte length of the payload + * a flatbuffer Message whose header is the Schema + */ + schema: Uint8Array; +} + +/** + * The name or tag for a Flight. May be used as a way to retrieve or generate + * a flight or be used to expose a set of previously defined flights. + */ +export interface FlightDescriptor { + type: FlightDescriptor_DescriptorType; + /** + * Opaque value used to express a command. Should only be defined when + * type = CMD. + */ + cmd: Uint8Array; + /** + * List of strings identifying a particular dataset. Should only be defined + * when type = PATH. + */ + path: string[]; +} + +/** Describes what type of descriptor is defined. */ +export enum FlightDescriptor_DescriptorType { + /** UNKNOWN - Protobuf pattern, not used. */ + UNKNOWN = 0, + /** + * PATH - A named path that identifies a dataset. A path is composed of a string + * or list of strings describing a particular dataset. This is conceptually + * similar to a path inside a filesystem. + */ + PATH = 1, + /** CMD - An opaque command to generate a dataset. */ + CMD = 2, + UNRECOGNIZED = -1, +} + +/** + * The access coordinates for retrieval of a dataset. With a FlightInfo, a + * consumer is able to determine how to retrieve a dataset. + */ +export interface FlightInfo { + /** + * The schema of the dataset in its IPC form: + * 4 bytes - an optional IPC_CONTINUATION_TOKEN prefix + * 4 bytes - the byte length of the payload + * a flatbuffer Message whose header is the Schema + */ + schema: Uint8Array; + /** The descriptor associated with this info. */ + flightDescriptor: + | FlightDescriptor + | undefined; + /** + * A list of endpoints associated with the flight. To consume the + * whole flight, all endpoints (and hence all Tickets) must be + * consumed. Endpoints can be consumed in any order. + * + * In other words, an application can use multiple endpoints to + * represent partitioned data. + * + * If the returned data has an ordering, an application can use + * "FlightInfo.ordered = true" or should return the all data in a + * single endpoint. Otherwise, there is no ordering defined on + * endpoints or the data within. + * + * A client can read ordered data by reading data from returned + * endpoints, in order, from front to back. + * + * Note that a client may ignore "FlightInfo.ordered = true". If an + * ordering is important for an application, an application must + * choose one of them: + * + * * An application requires that all clients must read data in + * returned endpoints order. + * * An application must return the all data in a single endpoint. + */ + endpoint: FlightEndpoint[]; + /** Set these to -1 if unknown. */ + totalRecords: number; + totalBytes: number; + /** FlightEndpoints are in the same order as the data. */ + ordered: boolean; +} + +/** A particular stream or split associated with a flight. */ +export interface FlightEndpoint { + /** Token used to retrieve this stream. */ + ticket: + | Ticket + | undefined; + /** + * A list of URIs where this ticket can be redeemed via DoGet(). + * + * If the list is empty, the expectation is that the ticket can only + * be redeemed on the current service where the ticket was + * generated. + * + * If the list is not empty, the expectation is that the ticket can + * be redeemed at any of the locations, and that the data returned + * will be equivalent. In this case, the ticket may only be redeemed + * at one of the given locations, and not (necessarily) on the + * current service. + * + * In other words, an application can use multiple locations to + * represent redundant and/or load balanced services. + */ + location: Location[]; + /** + * Expiration time of this stream. If present, clients may assume + * they can retry DoGet requests. Otherwise, it is + * application-defined whether DoGet requests may be retried. + */ + expirationTime: Date | undefined; +} + +/** + * A location where a Flight service will accept retrieval of a particular + * stream given a ticket. + */ +export interface Location { + uri: string; +} + +/** + * An opaque identifier that the service can use to retrieve a particular + * portion of a stream. + * + * Tickets are meant to be single use. It is an error/application-defined + * behavior to reuse a ticket. + */ +export interface Ticket { + ticket: Uint8Array; +} + +/** A batch of Arrow data as part of a stream of batches. */ +export interface FlightData { + /** + * The descriptor of the data. This is only relevant when a client is + * starting a new DoPut stream. + */ + flightDescriptor: + | FlightDescriptor + | undefined; + /** Header for message data as described in Message.fbs::Message. */ + dataHeader: Uint8Array; + /** Application-defined metadata. */ + appMetadata: Uint8Array; + /** + * The actual batch of Arrow data. Preferably handled with minimal-copies + * coming last in the definition to help with sidecar patterns (it is + * expected that some implementations will fetch this field off the wire + * with specialized code to avoid extra memory copies). + */ + dataBody: Uint8Array; +} + +/** The response message associated with the submission of a DoPut. */ +export interface PutResult { + appMetadata: Uint8Array; +} + +function createBaseHandshakeRequest(): HandshakeRequest { + return { protocolVersion: 0, payload: new Uint8Array(0) }; +} + +export const HandshakeRequest = { + encode(message: HandshakeRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.protocolVersion !== 0) { + writer.uint32(8).uint64(message.protocolVersion); + } + if (message.payload.length !== 0) { + writer.uint32(18).bytes(message.payload); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): HandshakeRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseHandshakeRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.protocolVersion = longToNumber(reader.uint64() as Long); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.payload = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + create(base?: DeepPartial): HandshakeRequest { + return HandshakeRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): HandshakeRequest { + const message = createBaseHandshakeRequest(); + message.protocolVersion = object.protocolVersion ?? 0; + message.payload = object.payload ?? new Uint8Array(0); + return message; + }, +}; + +function createBaseHandshakeResponse(): HandshakeResponse { + return { protocolVersion: 0, payload: new Uint8Array(0) }; +} + +export const HandshakeResponse = { + encode(message: HandshakeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.protocolVersion !== 0) { + writer.uint32(8).uint64(message.protocolVersion); + } + if (message.payload.length !== 0) { + writer.uint32(18).bytes(message.payload); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): HandshakeResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseHandshakeResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.protocolVersion = longToNumber(reader.uint64() as Long); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.payload = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + create(base?: DeepPartial): HandshakeResponse { + return HandshakeResponse.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): HandshakeResponse { + const message = createBaseHandshakeResponse(); + message.protocolVersion = object.protocolVersion ?? 0; + message.payload = object.payload ?? new Uint8Array(0); + return message; + }, +}; + +function createBaseBasicAuth(): BasicAuth { + return { username: "", password: "" }; +} + +export const BasicAuth = { + encode(message: BasicAuth, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.username !== "") { + writer.uint32(18).string(message.username); + } + if (message.password !== "") { + writer.uint32(26).string(message.password); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): BasicAuth { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseBasicAuth(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (tag !== 18) { + break; + } + + message.username = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.password = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + create(base?: DeepPartial): BasicAuth { + return BasicAuth.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): BasicAuth { + const message = createBaseBasicAuth(); + message.username = object.username ?? ""; + message.password = object.password ?? ""; + return message; + }, +}; + +function createBaseEmpty(): Empty { + return {}; +} + +export const Empty = { + encode(_: Empty, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Empty { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseEmpty(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + create(base?: DeepPartial): Empty { + return Empty.fromPartial(base ?? {}); + }, + fromPartial(_: DeepPartial): Empty { + const message = createBaseEmpty(); + return message; + }, +}; + +function createBaseActionType(): ActionType { + return { type: "", description: "" }; +} + +export const ActionType = { + encode(message: ActionType, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.type !== "") { + writer.uint32(10).string(message.type); + } + if (message.description !== "") { + writer.uint32(18).string(message.description); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ActionType { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseActionType(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.type = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.description = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + create(base?: DeepPartial): ActionType { + return ActionType.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): ActionType { + const message = createBaseActionType(); + message.type = object.type ?? ""; + message.description = object.description ?? ""; + return message; + }, +}; + +function createBaseCriteria(): Criteria { + return { expression: new Uint8Array(0) }; +} + +export const Criteria = { + encode(message: Criteria, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.expression.length !== 0) { + writer.uint32(10).bytes(message.expression); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Criteria { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCriteria(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.expression = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + create(base?: DeepPartial): Criteria { + return Criteria.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): Criteria { + const message = createBaseCriteria(); + message.expression = object.expression ?? new Uint8Array(0); + return message; + }, +}; + +function createBaseAction(): Action { + return { type: "", body: new Uint8Array(0) }; +} + +export const Action = { + encode(message: Action, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.type !== "") { + writer.uint32(10).string(message.type); + } + if (message.body.length !== 0) { + writer.uint32(18).bytes(message.body); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Action { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAction(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.type = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.body = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + create(base?: DeepPartial): Action { + return Action.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): Action { + const message = createBaseAction(); + message.type = object.type ?? ""; + message.body = object.body ?? new Uint8Array(0); + return message; + }, +}; + +function createBaseCancelFlightInfoRequest(): CancelFlightInfoRequest { + return { info: undefined }; +} + +export const CancelFlightInfoRequest = { + encode(message: CancelFlightInfoRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.info !== undefined) { + FlightInfo.encode(message.info, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CancelFlightInfoRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCancelFlightInfoRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.info = FlightInfo.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + create(base?: DeepPartial): CancelFlightInfoRequest { + return CancelFlightInfoRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): CancelFlightInfoRequest { + const message = createBaseCancelFlightInfoRequest(); + message.info = (object.info !== undefined && object.info !== null) + ? FlightInfo.fromPartial(object.info) + : undefined; + return message; + }, +}; + +function createBaseRenewFlightEndpointRequest(): RenewFlightEndpointRequest { + return { endpoint: undefined }; +} + +export const RenewFlightEndpointRequest = { + encode(message: RenewFlightEndpointRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.endpoint !== undefined) { + FlightEndpoint.encode(message.endpoint, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RenewFlightEndpointRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRenewFlightEndpointRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.endpoint = FlightEndpoint.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + create(base?: DeepPartial): RenewFlightEndpointRequest { + return RenewFlightEndpointRequest.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): RenewFlightEndpointRequest { + const message = createBaseRenewFlightEndpointRequest(); + message.endpoint = (object.endpoint !== undefined && object.endpoint !== null) + ? FlightEndpoint.fromPartial(object.endpoint) + : undefined; + return message; + }, +}; + +function createBaseResult(): Result { + return { body: new Uint8Array(0) }; +} + +export const Result = { + encode(message: Result, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.body.length !== 0) { + writer.uint32(10).bytes(message.body); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Result { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseResult(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.body = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + create(base?: DeepPartial): Result { + return Result.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): Result { + const message = createBaseResult(); + message.body = object.body ?? new Uint8Array(0); + return message; + }, +}; + +function createBaseCancelFlightInfoResult(): CancelFlightInfoResult { + return { status: 0 }; +} + +export const CancelFlightInfoResult = { + encode(message: CancelFlightInfoResult, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.status !== 0) { + writer.uint32(8).int32(message.status); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): CancelFlightInfoResult { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCancelFlightInfoResult(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.status = reader.int32() as any; + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + create(base?: DeepPartial): CancelFlightInfoResult { + return CancelFlightInfoResult.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): CancelFlightInfoResult { + const message = createBaseCancelFlightInfoResult(); + message.status = object.status ?? 0; + return message; + }, +}; + +function createBaseSchemaResult(): SchemaResult { + return { schema: new Uint8Array(0) }; +} + +export const SchemaResult = { + encode(message: SchemaResult, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.schema.length !== 0) { + writer.uint32(10).bytes(message.schema); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SchemaResult { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSchemaResult(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.schema = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + create(base?: DeepPartial): SchemaResult { + return SchemaResult.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): SchemaResult { + const message = createBaseSchemaResult(); + message.schema = object.schema ?? new Uint8Array(0); + return message; + }, +}; + +function createBaseFlightDescriptor(): FlightDescriptor { + return { type: 0, cmd: new Uint8Array(0), path: [] }; +} + +export const FlightDescriptor = { + encode(message: FlightDescriptor, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.type !== 0) { + writer.uint32(8).int32(message.type); + } + if (message.cmd.length !== 0) { + writer.uint32(18).bytes(message.cmd); + } + for (const v of message.path) { + writer.uint32(26).string(v!); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): FlightDescriptor { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseFlightDescriptor(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.type = reader.int32() as any; + continue; + case 2: + if (tag !== 18) { + break; + } + + message.cmd = reader.bytes(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.path.push(reader.string()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + create(base?: DeepPartial): FlightDescriptor { + return FlightDescriptor.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): FlightDescriptor { + const message = createBaseFlightDescriptor(); + message.type = object.type ?? 0; + message.cmd = object.cmd ?? new Uint8Array(0); + message.path = object.path?.map((e) => e) || []; + return message; + }, +}; + +function createBaseFlightInfo(): FlightInfo { + return { + schema: new Uint8Array(0), + flightDescriptor: undefined, + endpoint: [], + totalRecords: 0, + totalBytes: 0, + ordered: false, + }; +} + +export const FlightInfo = { + encode(message: FlightInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.schema.length !== 0) { + writer.uint32(10).bytes(message.schema); + } + if (message.flightDescriptor !== undefined) { + FlightDescriptor.encode(message.flightDescriptor, writer.uint32(18).fork()).ldelim(); + } + for (const v of message.endpoint) { + FlightEndpoint.encode(v!, writer.uint32(26).fork()).ldelim(); + } + if (message.totalRecords !== 0) { + writer.uint32(32).int64(message.totalRecords); + } + if (message.totalBytes !== 0) { + writer.uint32(40).int64(message.totalBytes); + } + if (message.ordered === true) { + writer.uint32(48).bool(message.ordered); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): FlightInfo { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseFlightInfo(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.schema = reader.bytes(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.flightDescriptor = FlightDescriptor.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.endpoint.push(FlightEndpoint.decode(reader, reader.uint32())); + continue; + case 4: + if (tag !== 32) { + break; + } + + message.totalRecords = longToNumber(reader.int64() as Long); + continue; + case 5: + if (tag !== 40) { + break; + } + + message.totalBytes = longToNumber(reader.int64() as Long); + continue; + case 6: + if (tag !== 48) { + break; + } + + message.ordered = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + create(base?: DeepPartial): FlightInfo { + return FlightInfo.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): FlightInfo { + const message = createBaseFlightInfo(); + message.schema = object.schema ?? new Uint8Array(0); + message.flightDescriptor = (object.flightDescriptor !== undefined && object.flightDescriptor !== null) + ? FlightDescriptor.fromPartial(object.flightDescriptor) + : undefined; + message.endpoint = object.endpoint?.map((e) => FlightEndpoint.fromPartial(e)) || []; + message.totalRecords = object.totalRecords ?? 0; + message.totalBytes = object.totalBytes ?? 0; + message.ordered = object.ordered ?? false; + return message; + }, +}; + +function createBaseFlightEndpoint(): FlightEndpoint { + return { ticket: undefined, location: [], expirationTime: undefined }; +} + +export const FlightEndpoint = { + encode(message: FlightEndpoint, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.ticket !== undefined) { + Ticket.encode(message.ticket, writer.uint32(10).fork()).ldelim(); + } + for (const v of message.location) { + Location.encode(v!, writer.uint32(18).fork()).ldelim(); + } + if (message.expirationTime !== undefined) { + Timestamp.encode(toTimestamp(message.expirationTime), writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): FlightEndpoint { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseFlightEndpoint(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.ticket = Ticket.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.location.push(Location.decode(reader, reader.uint32())); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.expirationTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + create(base?: DeepPartial): FlightEndpoint { + return FlightEndpoint.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): FlightEndpoint { + const message = createBaseFlightEndpoint(); + message.ticket = (object.ticket !== undefined && object.ticket !== null) + ? Ticket.fromPartial(object.ticket) + : undefined; + message.location = object.location?.map((e) => Location.fromPartial(e)) || []; + message.expirationTime = object.expirationTime ?? undefined; + return message; + }, +}; + +function createBaseLocation(): Location { + return { uri: "" }; +} + +export const Location = { + encode(message: Location, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.uri !== "") { + writer.uint32(10).string(message.uri); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Location { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseLocation(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.uri = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + create(base?: DeepPartial): Location { + return Location.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): Location { + const message = createBaseLocation(); + message.uri = object.uri ?? ""; + return message; + }, +}; + +function createBaseTicket(): Ticket { + return { ticket: new Uint8Array(0) }; +} + +export const Ticket = { + encode(message: Ticket, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.ticket.length !== 0) { + writer.uint32(10).bytes(message.ticket); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Ticket { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTicket(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.ticket = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + create(base?: DeepPartial): Ticket { + return Ticket.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): Ticket { + const message = createBaseTicket(); + message.ticket = object.ticket ?? new Uint8Array(0); + return message; + }, +}; + +function createBaseFlightData(): FlightData { + return { + flightDescriptor: undefined, + dataHeader: new Uint8Array(0), + appMetadata: new Uint8Array(0), + dataBody: new Uint8Array(0), + }; +} + +export const FlightData = { + encode(message: FlightData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.flightDescriptor !== undefined) { + FlightDescriptor.encode(message.flightDescriptor, writer.uint32(10).fork()).ldelim(); + } + if (message.dataHeader.length !== 0) { + writer.uint32(18).bytes(message.dataHeader); + } + if (message.appMetadata.length !== 0) { + writer.uint32(26).bytes(message.appMetadata); + } + if (message.dataBody.length !== 0) { + writer.uint32(8002).bytes(message.dataBody); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): FlightData { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseFlightData(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.flightDescriptor = FlightDescriptor.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.dataHeader = reader.bytes(); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.appMetadata = reader.bytes(); + continue; + case 1000: + if (tag !== 8002) { + break; + } + + message.dataBody = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + create(base?: DeepPartial): FlightData { + return FlightData.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): FlightData { + const message = createBaseFlightData(); + message.flightDescriptor = (object.flightDescriptor !== undefined && object.flightDescriptor !== null) + ? FlightDescriptor.fromPartial(object.flightDescriptor) + : undefined; + message.dataHeader = object.dataHeader ?? new Uint8Array(0); + message.appMetadata = object.appMetadata ?? new Uint8Array(0); + message.dataBody = object.dataBody ?? new Uint8Array(0); + return message; + }, +}; + +function createBasePutResult(): PutResult { + return { appMetadata: new Uint8Array(0) }; +} + +export const PutResult = { + encode(message: PutResult, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.appMetadata.length !== 0) { + writer.uint32(10).bytes(message.appMetadata); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): PutResult { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePutResult(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.appMetadata = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + create(base?: DeepPartial): PutResult { + return PutResult.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): PutResult { + const message = createBasePutResult(); + message.appMetadata = object.appMetadata ?? new Uint8Array(0); + return message; + }, +}; + +/** + * A flight service is an endpoint for retrieving or storing Arrow data. A + * flight service can expose one or more predefined endpoints that can be + * accessed using the Arrow Flight Protocol. Additionally, a flight service + * can expose a set of actions that are available. + */ +export type FlightServiceDefinition = typeof FlightServiceDefinition; +export const FlightServiceDefinition = { + name: "FlightService", + fullName: "arrow.flight.protocol.FlightService", + methods: { + /** + * Handshake between client and server. Depending on the server, the + * handshake may be required to determine the token that should be used for + * future operations. Both request and response are streams to allow multiple + * round-trips depending on auth mechanism. + */ + handshake: { + name: "Handshake", + requestType: HandshakeRequest, + requestStream: true, + responseType: HandshakeResponse, + responseStream: true, + options: {}, + }, + /** + * Get a list of available streams given a particular criteria. Most flight + * services will expose one or more streams that are readily available for + * retrieval. This api allows listing the streams available for + * consumption. A user can also provide a criteria. The criteria can limit + * the subset of streams that can be listed via this interface. Each flight + * service allows its own definition of how to consume criteria. + */ + listFlights: { + name: "ListFlights", + requestType: Criteria, + requestStream: false, + responseType: FlightInfo, + responseStream: true, + options: {}, + }, + /** + * For a given FlightDescriptor, get information about how the flight can be + * consumed. This is a useful interface if the consumer of the interface + * already can identify the specific flight to consume. This interface can + * also allow a consumer to generate a flight stream through a specified + * descriptor. For example, a flight descriptor might be something that + * includes a SQL statement or a Pickled Python operation that will be + * executed. In those cases, the descriptor will not be previously available + * within the list of available streams provided by ListFlights but will be + * available for consumption for the duration defined by the specific flight + * service. + */ + getFlightInfo: { + name: "GetFlightInfo", + requestType: FlightDescriptor, + requestStream: false, + responseType: FlightInfo, + responseStream: false, + options: {}, + }, + /** + * For a given FlightDescriptor, get the Schema as described in Schema.fbs::Schema + * This is used when a consumer needs the Schema of flight stream. Similar to + * GetFlightInfo this interface may generate a new flight that was not previously + * available in ListFlights. + */ + getSchema: { + name: "GetSchema", + requestType: FlightDescriptor, + requestStream: false, + responseType: SchemaResult, + responseStream: false, + options: {}, + }, + /** + * Retrieve a single stream associated with a particular descriptor + * associated with the referenced ticket. A Flight can be composed of one or + * more streams where each stream can be retrieved using a separate opaque + * ticket that the flight service uses for managing a collection of streams. + */ + doGet: { + name: "DoGet", + requestType: Ticket, + requestStream: false, + responseType: FlightData, + responseStream: true, + options: {}, + }, + /** + * Push a stream to the flight service associated with a particular + * flight stream. This allows a client of a flight service to upload a stream + * of data. Depending on the particular flight service, a client consumer + * could be allowed to upload a single stream per descriptor or an unlimited + * number. In the latter, the service might implement a 'seal' action that + * can be applied to a descriptor once all streams are uploaded. + */ + doPut: { + name: "DoPut", + requestType: FlightData, + requestStream: true, + responseType: PutResult, + responseStream: true, + options: {}, + }, + /** + * Open a bidirectional data channel for a given descriptor. This + * allows clients to send and receive arbitrary Arrow data and + * application-specific metadata in a single logical stream. In + * contrast to DoGet/DoPut, this is more suited for clients + * offloading computation (rather than storage) to a Flight service. + */ + doExchange: { + name: "DoExchange", + requestType: FlightData, + requestStream: true, + responseType: FlightData, + responseStream: true, + options: {}, + }, + /** + * Flight services can support an arbitrary number of simple actions in + * addition to the possible ListFlights, GetFlightInfo, DoGet, DoPut + * operations that are potentially available. DoAction allows a flight client + * to do a specific action against a flight service. An action includes + * opaque request and response objects that are specific to the type action + * being undertaken. + */ + doAction: { + name: "DoAction", + requestType: Action, + requestStream: false, + responseType: Result, + responseStream: true, + options: {}, + }, + /** + * A flight service exposes all of the available action types that it has + * along with descriptions. This allows different flight consumers to + * understand the capabilities of the flight service. + */ + listActions: { + name: "ListActions", + requestType: Empty, + requestStream: false, + responseType: ActionType, + responseStream: true, + options: {}, + }, + }, +} as const; + +export interface FlightServiceImplementation { + /** + * Handshake between client and server. Depending on the server, the + * handshake may be required to determine the token that should be used for + * future operations. Both request and response are streams to allow multiple + * round-trips depending on auth mechanism. + */ + handshake( + request: AsyncIterable, + context: CallContext & CallContextExt, + ): ServerStreamingMethodResult>; + /** + * Get a list of available streams given a particular criteria. Most flight + * services will expose one or more streams that are readily available for + * retrieval. This api allows listing the streams available for + * consumption. A user can also provide a criteria. The criteria can limit + * the subset of streams that can be listed via this interface. Each flight + * service allows its own definition of how to consume criteria. + */ + listFlights( + request: Criteria, + context: CallContext & CallContextExt, + ): ServerStreamingMethodResult>; + /** + * For a given FlightDescriptor, get information about how the flight can be + * consumed. This is a useful interface if the consumer of the interface + * already can identify the specific flight to consume. This interface can + * also allow a consumer to generate a flight stream through a specified + * descriptor. For example, a flight descriptor might be something that + * includes a SQL statement or a Pickled Python operation that will be + * executed. In those cases, the descriptor will not be previously available + * within the list of available streams provided by ListFlights but will be + * available for consumption for the duration defined by the specific flight + * service. + */ + getFlightInfo(request: FlightDescriptor, context: CallContext & CallContextExt): Promise>; + /** + * For a given FlightDescriptor, get the Schema as described in Schema.fbs::Schema + * This is used when a consumer needs the Schema of flight stream. Similar to + * GetFlightInfo this interface may generate a new flight that was not previously + * available in ListFlights. + */ + getSchema(request: FlightDescriptor, context: CallContext & CallContextExt): Promise>; + /** + * Retrieve a single stream associated with a particular descriptor + * associated with the referenced ticket. A Flight can be composed of one or + * more streams where each stream can be retrieved using a separate opaque + * ticket that the flight service uses for managing a collection of streams. + */ + doGet(request: Ticket, context: CallContext & CallContextExt): ServerStreamingMethodResult>; + /** + * Push a stream to the flight service associated with a particular + * flight stream. This allows a client of a flight service to upload a stream + * of data. Depending on the particular flight service, a client consumer + * could be allowed to upload a single stream per descriptor or an unlimited + * number. In the latter, the service might implement a 'seal' action that + * can be applied to a descriptor once all streams are uploaded. + */ + doPut( + request: AsyncIterable, + context: CallContext & CallContextExt, + ): ServerStreamingMethodResult>; + /** + * Open a bidirectional data channel for a given descriptor. This + * allows clients to send and receive arbitrary Arrow data and + * application-specific metadata in a single logical stream. In + * contrast to DoGet/DoPut, this is more suited for clients + * offloading computation (rather than storage) to a Flight service. + */ + doExchange( + request: AsyncIterable, + context: CallContext & CallContextExt, + ): ServerStreamingMethodResult>; + /** + * Flight services can support an arbitrary number of simple actions in + * addition to the possible ListFlights, GetFlightInfo, DoGet, DoPut + * operations that are potentially available. DoAction allows a flight client + * to do a specific action against a flight service. An action includes + * opaque request and response objects that are specific to the type action + * being undertaken. + */ + doAction(request: Action, context: CallContext & CallContextExt): ServerStreamingMethodResult>; + /** + * A flight service exposes all of the available action types that it has + * along with descriptions. This allows different flight consumers to + * understand the capabilities of the flight service. + */ + listActions( + request: Empty, + context: CallContext & CallContextExt, + ): ServerStreamingMethodResult>; +} + +export interface FlightServiceClient { + /** + * Handshake between client and server. Depending on the server, the + * handshake may be required to determine the token that should be used for + * future operations. Both request and response are streams to allow multiple + * round-trips depending on auth mechanism. + */ + handshake( + request: AsyncIterable>, + options?: CallOptions & CallOptionsExt, + ): AsyncIterable; + /** + * Get a list of available streams given a particular criteria. Most flight + * services will expose one or more streams that are readily available for + * retrieval. This api allows listing the streams available for + * consumption. A user can also provide a criteria. The criteria can limit + * the subset of streams that can be listed via this interface. Each flight + * service allows its own definition of how to consume criteria. + */ + listFlights(request: DeepPartial, options?: CallOptions & CallOptionsExt): AsyncIterable; + /** + * For a given FlightDescriptor, get information about how the flight can be + * consumed. This is a useful interface if the consumer of the interface + * already can identify the specific flight to consume. This interface can + * also allow a consumer to generate a flight stream through a specified + * descriptor. For example, a flight descriptor might be something that + * includes a SQL statement or a Pickled Python operation that will be + * executed. In those cases, the descriptor will not be previously available + * within the list of available streams provided by ListFlights but will be + * available for consumption for the duration defined by the specific flight + * service. + */ + getFlightInfo(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; + /** + * For a given FlightDescriptor, get the Schema as described in Schema.fbs::Schema + * This is used when a consumer needs the Schema of flight stream. Similar to + * GetFlightInfo this interface may generate a new flight that was not previously + * available in ListFlights. + */ + getSchema(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; + /** + * Retrieve a single stream associated with a particular descriptor + * associated with the referenced ticket. A Flight can be composed of one or + * more streams where each stream can be retrieved using a separate opaque + * ticket that the flight service uses for managing a collection of streams. + */ + doGet(request: DeepPartial, options?: CallOptions & CallOptionsExt): AsyncIterable; + /** + * Push a stream to the flight service associated with a particular + * flight stream. This allows a client of a flight service to upload a stream + * of data. Depending on the particular flight service, a client consumer + * could be allowed to upload a single stream per descriptor or an unlimited + * number. In the latter, the service might implement a 'seal' action that + * can be applied to a descriptor once all streams are uploaded. + */ + doPut( + request: AsyncIterable>, + options?: CallOptions & CallOptionsExt, + ): AsyncIterable; + /** + * Open a bidirectional data channel for a given descriptor. This + * allows clients to send and receive arbitrary Arrow data and + * application-specific metadata in a single logical stream. In + * contrast to DoGet/DoPut, this is more suited for clients + * offloading computation (rather than storage) to a Flight service. + */ + doExchange( + request: AsyncIterable>, + options?: CallOptions & CallOptionsExt, + ): AsyncIterable; + /** + * Flight services can support an arbitrary number of simple actions in + * addition to the possible ListFlights, GetFlightInfo, DoGet, DoPut + * operations that are potentially available. DoAction allows a flight client + * to do a specific action against a flight service. An action includes + * opaque request and response objects that are specific to the type action + * being undertaken. + */ + doAction(request: DeepPartial, options?: CallOptions & CallOptionsExt): AsyncIterable; + /** + * A flight service exposes all of the available action types that it has + * along with descriptions. This allows different flight consumers to + * understand the capabilities of the flight service. + */ + listActions(request: DeepPartial, options?: CallOptions & CallOptionsExt): AsyncIterable; +} + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +function toTimestamp(date: Date): Timestamp { + const seconds = date.getTime() / 1_000; + const nanos = (date.getTime() % 1_000) * 1_000_000; + return { seconds, nanos }; +} + +function fromTimestamp(t: Timestamp): Date { + let millis = (t.seconds || 0) * 1_000; + millis += (t.nanos || 0) / 1_000_000; + return new globalThis.Date(millis); +} + +function longToNumber(long: Long): number { + if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} + +if (_m0.util.Long !== Long) { + _m0.util.Long = Long as any; + _m0.configure(); +} + +export type ServerStreamingMethodResult = { [Symbol.asyncIterator](): AsyncIterator }; diff --git a/src/assets/google/protobuf/timestamp.ts b/src/assets/google/protobuf/timestamp.ts new file mode 100644 index 00000000..039f4ecb --- /dev/null +++ b/src/assets/google/protobuf/timestamp.ts @@ -0,0 +1,188 @@ +/* eslint-disable */ +import * as _m0 from "protobufjs/minimal"; +import Long from "long"; + +export const protobufPackage = "google.protobuf"; + +/** + * A Timestamp represents a point in time independent of any time zone or local + * calendar, encoded as a count of seconds and fractions of seconds at + * nanosecond resolution. The count is relative to an epoch at UTC midnight on + * January 1, 1970, in the proleptic Gregorian calendar which extends the + * Gregorian calendar backwards to year one. + * + * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + * second table is needed for interpretation, using a [24-hour linear + * smear](https://developers.google.com/time/smear). + * + * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + * restricting to that range, we ensure that we can convert to and from [RFC + * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + * + * # Examples + * + * Example 1: Compute Timestamp from POSIX `time()`. + * + * Timestamp timestamp; + * timestamp.set_seconds(time(NULL)); + * timestamp.set_nanos(0); + * + * Example 2: Compute Timestamp from POSIX `gettimeofday()`. + * + * struct timeval tv; + * gettimeofday(&tv, NULL); + * + * Timestamp timestamp; + * timestamp.set_seconds(tv.tv_sec); + * timestamp.set_nanos(tv.tv_usec * 1000); + * + * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + * + * FILETIME ft; + * GetSystemTimeAsFileTime(&ft); + * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + * + * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + * Timestamp timestamp; + * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + * + * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + * + * long millis = System.currentTimeMillis(); + * + * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + * .setNanos((int) ((millis % 1000) * 1000000)).build(); + * + * Example 5: Compute Timestamp from Java `Instant.now()`. + * + * Instant now = Instant.now(); + * + * Timestamp timestamp = + * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + * .setNanos(now.getNano()).build(); + * + * Example 6: Compute Timestamp from current time in Python. + * + * timestamp = Timestamp() + * timestamp.GetCurrentTime() + * + * # JSON Mapping + * + * In JSON format, the Timestamp type is encoded as a string in the + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" + * where {year} is always expressed using four digits while {month}, {day}, + * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional + * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + * is required. A proto3 JSON serializer should always use UTC (as indicated by + * "Z") when printing the Timestamp type and a proto3 JSON parser should be + * able to accept both UTC and other timezones (as indicated by an offset). + * + * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + * 01:30 UTC on January 15, 2017. + * + * In JavaScript, one can convert a Date object to this format using the + * standard + * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + * method. In Python, a standard `datetime.datetime` object can be converted + * to this format using + * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + * the Joda Time's [`ISODateTimeFormat.dateTime()`]( + * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D + * ) to obtain a formatter capable of generating timestamps in this format. + */ +export interface Timestamp { + /** + * Represents seconds of UTC time since Unix epoch + * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + * 9999-12-31T23:59:59Z inclusive. + */ + seconds: number; + /** + * Non-negative fractions of a second at nanosecond resolution. Negative + * second values with fractions must still have non-negative nanos values + * that count forward in time. Must be from 0 to 999,999,999 + * inclusive. + */ + nanos: number; +} + +function createBaseTimestamp(): Timestamp { + return { seconds: 0, nanos: 0 }; +} + +export const Timestamp = { + encode(message: Timestamp, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.seconds !== 0) { + writer.uint32(8).int64(message.seconds); + } + if (message.nanos !== 0) { + writer.uint32(16).int32(message.nanos); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Timestamp { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTimestamp(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.seconds = longToNumber(reader.int64() as Long); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.nanos = reader.int32(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + create(base?: DeepPartial): Timestamp { + return Timestamp.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): Timestamp { + const message = createBaseTimestamp(); + message.seconds = object.seconds ?? 0; + message.nanos = object.nanos ?? 0; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +function longToNumber(long: Long): number { + if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} + +if (_m0.util.Long !== Long) { + _m0.util.Long = Long as any; + _m0.configure(); +} diff --git a/src/components/Navbar/index.tsx b/src/components/Navbar/index.tsx index 4691be08..63efb617 100644 --- a/src/components/Navbar/index.tsx +++ b/src/components/Navbar/index.tsx @@ -13,6 +13,7 @@ import { IconTrash, IconInfoCircle, IconUserCog, + IconServerBolt, } from '@tabler/icons-react'; import { FC, useEffect } from 'react'; import { useNavbarStyles } from './styles'; @@ -34,9 +35,13 @@ import Cookies from 'js-cookie'; import { NAVBAR_WIDTH } from '@/constants/theme'; const baseURL = import.meta.env.VITE_PARSEABLE_URL ?? '/'; +const parseable_session = import.meta.env.VITE_PARSEABLE_SESSION ?? 'session'; +const parseable_user = import.meta.env.VITE_PARSEABLE_USER ?? 'username'; + const links = [ { icon: IconZoomCode, label: 'Query', pathname: '/query', requiredAccess: ['Query', 'GetSchema'] }, { icon: IconTableShortcut, label: 'Logs', pathname: '/logs', requiredAccess: ['Query', 'GetSchema'] }, + { icon: IconServerBolt, label: 'Live Tail', pathname: '/live-tail', requiredAccess: ['Query', 'GetSchema'] }, { icon: IconReportAnalytics, label: 'Stats', pathname: '/stats', requiredAccess: ['GetStats'] }, { icon: IconSettings, label: 'Config', pathname: '/config', requiredAccess: ['PutAlert'] }, ]; @@ -48,7 +53,7 @@ const Navbar: FC = (props) => { const { streamName } = useParams(); const location = useLocation(); - const username = Cookies.get('username'); + const username = Cookies.get(parseable_user); const { state: { subNavbarTogle }, @@ -76,8 +81,8 @@ const Navbar: FC = (props) => { }, [subNavbarTogle.get()]); const onSignOut = () => { - Cookies.remove('session'); - Cookies.remove('username'); + Cookies.remove(parseable_session); + Cookies.remove(parseable_user); window.location.href = `${baseURL}api/v1/o/logout?redirect=${window.location.origin}/login`; }; @@ -94,7 +99,7 @@ const Navbar: FC = (props) => { setActiveStream(''); setSearchValue(''); setDisableLink(true); - navigate("/"); + navigate('/'); } else if (streamName) { if (streamName === deleteStream && userSepecficStreams) { setDeleteStream(''); @@ -115,7 +120,7 @@ const Navbar: FC = (props) => { } else if (userSepecficStreams && Boolean(userSepecficStreams.length)) { if (location.pathname === USERS_MANAGEMENT_ROUTE) { handleChangeWithoutRiderection(userSepecficStreams[0].name, location.pathname); - navigate("/users"); + navigate('/users'); } else { handleChange(userSepecficStreams[0].name); } @@ -275,7 +280,7 @@ const Navbar: FC = (props) => { label="Users" icon={} onClick={() => { - navigate("/users"); + navigate('/users'); setCurrentPage(USERS_MANAGEMENT_ROUTE); }} /> diff --git a/src/components/Navbar/infoModal.tsx b/src/components/Navbar/infoModal.tsx index 582b067b..14a1a4c5 100644 --- a/src/components/Navbar/infoModal.tsx +++ b/src/components/Navbar/infoModal.tsx @@ -59,7 +59,7 @@ type InfoModalProps = { const InfoModal: FC = (props) => { const { opened, close } = props; const { - state: { subLLMActive }, + state: { subInstanceConfig }, } = useHeaderContext(); const { data, loading, error, getAbout, resetData } = useGetAbout(); @@ -83,9 +83,9 @@ const InfoModal: FC = (props) => { useEffect(() => { if (data) { - subLLMActive.set(data.llmActive); + subInstanceConfig.set(data); } - }, [data?.llmActive]); + }, [data]); const { classes } = useInfoModalStyles(); const { diff --git a/src/constants/routes.ts b/src/constants/routes.ts index 148faaba..5e678857 100644 --- a/src/constants/routes.ts +++ b/src/constants/routes.ts @@ -5,5 +5,6 @@ export const ALL_ROUTE = '/*'; export const QUERY_ROUTE = '/:streamName/query'; export const STATS_ROUTE = '/:streamName/stats'; export const CONFIG_ROUTE = '/:streamName/config'; +export const LIVE_TAIL_ROUTE = '/:streamName/live-tail'; export const USERS_MANAGEMENT_ROUTE = '/users'; export const OIDC_NOT_CONFIGURED_ROUTE = '/oidc-not-configured'; diff --git a/src/hooks/useDoGetLiveTail.tsx b/src/hooks/useDoGetLiveTail.tsx new file mode 100644 index 00000000..70b6b040 --- /dev/null +++ b/src/hooks/useDoGetLiveTail.tsx @@ -0,0 +1,98 @@ +import { FetchTransport, Metadata, createChannel, createClient } from 'nice-grpc-web'; +import { AsyncRecordBatchStreamReader } from '@apache-arrow/ts'; + +import { type FlightServiceClient, FlightServiceDefinition, FlightData } from '@/assets/arrow'; +import useMountedState from './useMountedState'; +import { useEffect } from 'react'; +import { parseLogData } from '@/utils'; + +// Function to convert FlightData to a Uint8Array +function flightDataToUint8Array(data: FlightData): Uint8Array { + const token = new Uint8Array([0xff, 0xff, 0xff, 0xff]); + const length = new Uint8Array(new Uint32Array([data.dataHeader.length]).buffer); + return new Uint8Array([...token, ...length, ...data.dataHeader, ...data.dataBody]); +} + +// Create a ReadableStream from the async iterable +function createFlightDataReadableStream(dataIterable: AsyncIterable): ReadableStream { + return new ReadableStream({ + async start(controller) { + for await (const flightData of dataIterable) { + const uint8ArrayData = flightDataToUint8Array(flightData); + controller.enqueue(uint8ArrayData); + } + controller.close(); // Signal the end of the stream + }, + }); +} + +export const useDoGetLiveTail = () => { + const [data, setData] = useMountedState([]); + const [error, setError] = useMountedState(null); + const [loading, setLoading] = useMountedState(false); + const [search, setSearch] = useMountedState(''); + const [tailData, setTailData] = useMountedState([]); + + function livetail(currentStreamName: string, grpcPort: number | null) { + if (currentStreamName && grpcPort) { + const grpcUrl = new URL(window.location.origin); + grpcUrl.port = String(grpcPort); + + const transport = FetchTransport({credentials: 'include'}) + const channel = createChannel(grpcUrl.origin, transport); + const client: FlightServiceClient = createClient(FlightServiceDefinition, channel, ); + + let encoder = new TextEncoder(); + let iter = client.doGet( + { ticket: encoder.encode(JSON.stringify({ stream: currentStreamName })) } + ); + + let task = async function () { + let decoder = await AsyncRecordBatchStreamReader.from(createFlightDataReadableStream(iter)); + for await (const resp of decoder) { + // setData((prevData) => [resp.toArray()[0].toJSON(), ...prevData.slice(0, 99)]); + setTailData((prevData) => [resp.toArray()[0].toJSON(), ...prevData.slice(0, 99)]); + } + return 'done'; + }; + + task().then((x: any) => { + console.log(x); + }); + } + } + + const doGetLiveTail = async (streamName: string, grpcPort: number) => { + try { + setLoading(true); + setError(null); + livetail(streamName, grpcPort); + } catch { + setError('Failed to get ALert'); + } finally { + setLoading(false); + } + }; + + useEffect(() => { + if (search === '') { + setData(tailData); + } else { + const searchText = search.trim().toLowerCase(); + tailData.map((log) => { + for (const key in log) { + const logValue = parseLogData(log[key], key); + if (logValue?.toString().toLowerCase().includes(searchText)) { + setData((prevData) => [log, ...prevData.slice(0, 99)]); + } + } + }); + } + }, [search, tailData]); + + const resetData = () => { + setData([]); + }; + + return { data, error, loading, doGetLiveTail, resetData, setSearch }; +}; diff --git a/src/hooks/useGetLogStreamList.tsx b/src/hooks/useGetLogStreamList.tsx index e8b5b47e..50d3e248 100644 --- a/src/hooks/useGetLogStreamList.tsx +++ b/src/hooks/useGetLogStreamList.tsx @@ -11,6 +11,10 @@ import { useNavigate } from 'react-router-dom'; import { LOGIN_ROUTE } from '@/constants/routes'; import Cookies from 'js-cookie'; + +const parseable_session = import.meta.env.VITE_PARSEABLE_SESSION ?? 'session'; +const parseable_user= import.meta.env.VITE_PARSEABLE_USER ?? 'username'; + export const useGetLogStreamList = () => { const [data, setData] = useMountedState(null); const [error, setError] = useMountedState(null); @@ -63,9 +67,9 @@ export const useGetLogStreamList = () => { } case StatusCodes.UNAUTHORIZED: { setError('Unauthorized'); - Cookies.remove('session'); - Cookies.remove('username'); - + Cookies.remove(parseable_session); + Cookies.remove(parseable_user); + notifications.update({ id: 'load-data', color: 'red', diff --git a/src/hooks/useLoginForm.ts b/src/hooks/useLoginForm.ts index be9da874..7558bc06 100644 --- a/src/hooks/useLoginForm.ts +++ b/src/hooks/useLoginForm.ts @@ -11,12 +11,14 @@ import { useEffect } from 'react'; import Cookies from 'js-cookie'; import { getQueryParam } from '@/utils'; +const parseable_session = import.meta.env.VITE_PARSEABLE_SESSION ?? 'session'; + export const useLoginForm = () => { const notificationId = useId(); const queryParams = getQueryParam(); const [loading, setLoading] = useMountedState(false); const [error, setError] = useMountedState(null); - const auth = Cookies.get('session'); + const auth = Cookies.get(parseable_session); const nav = useNavigate(); const location = useLocation(); diff --git a/src/hooks/usePutUserRole.tsx b/src/hooks/usePutUserRole.tsx index 74f7132b..3376398d 100644 --- a/src/hooks/usePutUserRole.tsx +++ b/src/hooks/usePutUserRole.tsx @@ -5,6 +5,9 @@ import { notifications } from '@mantine/notifications'; import { IconCheck, IconFileAlert } from '@tabler/icons-react'; import Cookies from 'js-cookie'; +const parseable_session = import.meta.env.VITE_PARSEABLE_SESSION ?? 'session'; +const parseable_user= import.meta.env.VITE_PARSEABLE_USER ?? 'username'; + export const usePutUserRole = () => { const [data, setData] = useMountedState(null); const [error, setError] = useMountedState(null); @@ -41,8 +44,8 @@ export const usePutUserRole = () => { default: { setError(res.data); console.error(res); - Cookies.remove('session'); - Cookies.remove('username'); + Cookies.remove(parseable_session); + Cookies.remove(parseable_user); notifications.update({ id: 'load-data', color: 'red', diff --git a/src/layouts/MainLayout/Context.tsx b/src/layouts/MainLayout/Context.tsx index fe53fd1b..2ef5cc3e 100644 --- a/src/layouts/MainLayout/Context.tsx +++ b/src/layouts/MainLayout/Context.tsx @@ -1,3 +1,4 @@ +import { AboutData } from '@/@types/parseable/api/about'; import { SortOrder, type LogsQuery, type LogsSearch, type LogSelectedTimeRange } from '@/@types/parseable/api/query'; import useSubscribeState, { SubData } from '@/hooks/useSubscribeState'; import dayjs from 'dayjs'; @@ -46,7 +47,7 @@ interface HeaderContextState { subLogSelectedTimeRange: SubData; subNavbarTogle: SubData; subCreateUserModalTogle: SubData; - subLLMActive: SubData; + subInstanceConfig: SubData; } // eslint-disable-next-line @typescript-eslint/no-empty-interface @@ -83,7 +84,7 @@ const MainLayoutPageProvider: FC = ({ children }) => { const subRefreshInterval = useSubscribeState(null); const subNavbarTogle = useSubscribeState(false); const subCreateUserModalTogle = useSubscribeState(false); - const subLLMActive = useSubscribeState(false); + const subInstanceConfig = useSubscribeState(null); const state: HeaderContextState = { subLogQuery, subLogSearch, @@ -91,7 +92,7 @@ const MainLayoutPageProvider: FC = ({ children }) => { subLogSelectedTimeRange, subNavbarTogle, subCreateUserModalTogle, - subLLMActive, + subInstanceConfig, }; const methods: HeaderContextMethods = {}; diff --git a/src/pages/LiveTail/index.tsx b/src/pages/LiveTail/index.tsx new file mode 100644 index 00000000..0d4c51ff --- /dev/null +++ b/src/pages/LiveTail/index.tsx @@ -0,0 +1,122 @@ +import { Box, Button, ScrollArea, Table, Text, TextInput } from '@mantine/core'; +import { useDocumentTitle } from '@mantine/hooks'; +import { FC, useEffect } from 'react'; +import { useLiveTailStyles } from './styles'; +import { useHeaderContext } from '@/layouts/MainLayout/Context'; +import useMountedState from '@/hooks/useMountedState'; +import { useDoGetLiveTail } from '@/hooks/useDoGetLiveTail'; +import { useGetLogStreamSchema } from '@/hooks/useGetLogStreamSchema'; +import { HEADER_HEIGHT, NAVBAR_WIDTH } from '@/constants/theme'; + +(BigInt.prototype as any).toJSON = function () { + return this.toString(); +}; + +const LiveTail: FC = () => { + useDocumentTitle('Parseable | Live Tail'); + const { + state: { subLogQuery, subInstanceConfig }, + } = useHeaderContext(); + const [currentStreamName, setCurrentStreamName] = useMountedState(subLogQuery.get().streamName); + const [grpcPort, setGrpcPort] = useMountedState(subInstanceConfig.get()?.grpcPort ?? null); + const { data, doGetLiveTail, error, loading, resetData, setSearch } = useDoGetLiveTail(); + const { data: schema, loading: schemaLoading, getDataSchema, resetData: resetSchema } = useGetLogStreamSchema(); + const [tablerData, setTablerData] = useMountedState([]); + + useEffect(() => { + const Streamlistener = subLogQuery.subscribe((state) => { + if (state) { + console.log(grpcPort, currentStreamName); + setCurrentStreamName(state.streamName); + } + }); + const portListener = subInstanceConfig.subscribe((state) => { + if (state) { + setGrpcPort(state.grpcPort); + } + }); + + return () => { + Streamlistener(); + portListener(); + }; + }, [subLogQuery, subInstanceConfig]); + + useEffect(() => { + if (currentStreamName && grpcPort) { + doGetLiveTail(currentStreamName, grpcPort); + getDataSchema(currentStreamName); + } + }, [currentStreamName, grpcPort]); + + useEffect(() => { + return () => { + resetData(); + resetSchema(); + }; + }, []); + + const { classes } = useLiveTailStyles(); + const { container } = classes; + + const rows = tablerData.map((element: any, i) => ( + + {schema?.fields?.map((field, i) => ( + {element[field.name] ?? 'N/A'} + ))} + + )); + + useEffect(() => { + if (tablerData.length < 10) { + setTablerData(data); + } + }, [data]); + + const headerRows = schema?.fields?.map((element) => {element.name}); + return ( + + ({ + background: theme.colors.gray[0], + + display: 'flex', + alignItems: 'center', + justifyContent: 'space-between', + borderBottom: `1px solid ${theme.colors.gray[2]}`, + paddingLeft: theme.spacing.md, + paddingRight: theme.spacing.md, + })}> + Live Tail + { + console.log(event.currentTarget.value); + setSearch(event.currentTarget.value); + resetData(); + setTablerData([]); + }}> + + + + + + + {headerRows} + + {rows} +
+
+
+ ); +}; + +export default LiveTail; diff --git a/src/pages/LiveTail/styles.tsx b/src/pages/LiveTail/styles.tsx new file mode 100644 index 00000000..92323500 --- /dev/null +++ b/src/pages/LiveTail/styles.tsx @@ -0,0 +1,12 @@ +import { heights } from '@/components/Mantine/sizing'; +import { HEADER_HEIGHT } from '@/constants/theme'; +import { createStyles } from '@mantine/core'; +export const useLiveTailStyles = createStyles(() => { + return { + container: { + flex: 1, + position: 'relative', + maxHeight: `calc(${heights.screen} - ${HEADER_HEIGHT * 2}px)`, + }, + }; +}); diff --git a/src/pages/Query/QueryCodeEditor.tsx b/src/pages/Query/QueryCodeEditor.tsx index 5f6935c0..f6761ab5 100644 --- a/src/pages/Query/QueryCodeEditor.tsx +++ b/src/pages/Query/QueryCodeEditor.tsx @@ -15,7 +15,7 @@ import { usePostLLM } from '@/hooks/usePostLLM'; const QueryCodeEditor: FC = () => { const { - state: { subLogQuery, subRefreshInterval, subLogSelectedTimeRange, subLLMActive }, + state: { subLogQuery, subRefreshInterval, subLogSelectedTimeRange, subInstanceConfig }, } = useHeaderContext(); const { state: { result, subSchemaToggle }, @@ -29,7 +29,7 @@ const QueryCodeEditor: FC = () => { const [currentStreamName, setCurrentStreamName] = useMountedState(subLogQuery.get().streamName); const [query, setQuery] = useMountedState(''); const [aiQuery, setAiQuery] = useMountedState(''); - const [isLlmActive, setIsLlmActive] = useMountedState(subLLMActive.get()); + const [isLlmActive, setIsLlmActive] = useMountedState(subInstanceConfig.get()?.llmActive); const { data: resAIQuery, postLLMQuery } = usePostLLM(); const handleAIGenerate = useCallback(() => { @@ -65,7 +65,9 @@ const QueryCodeEditor: FC = () => { useEffect(() => { const listener = subSchemaToggle.subscribe(setIsSchemaOpen); - const subLLMActiveListener = subLLMActive.subscribe(setIsLlmActive); + const subLLMActiveListener = subInstanceConfig.subscribe((state) => { + setIsLlmActive(state?.llmActive); + }); const refreshIntervalListener = subRefreshInterval.subscribe(setRefreshInterval); const subQueryListener = subLogQuery.subscribe((state) => { if (state.streamName) { diff --git a/src/routes/PrivateRoute.tsx b/src/routes/PrivateRoute.tsx index 6d1ee552..e61dc965 100644 --- a/src/routes/PrivateRoute.tsx +++ b/src/routes/PrivateRoute.tsx @@ -2,10 +2,10 @@ import { LOGIN_ROUTE } from '@/constants/routes'; import type { FC } from 'react'; import { Navigate, Outlet, useLocation } from 'react-router-dom'; import Cookies from 'js-cookie'; - +const parseable_session = import.meta.env.VITE_PARSEABLE_SESSION ?? 'session'; const PrivateRoute: FC = () => { - const auth = Cookies.get('session') + const auth = Cookies.get(parseable_session); const { pathname } = useLocation(); return auth ? ( diff --git a/src/routes/elements.tsx b/src/routes/elements.tsx index 43457dbf..1a3e72fa 100644 --- a/src/routes/elements.tsx +++ b/src/routes/elements.tsx @@ -79,3 +79,13 @@ export const UsersElement: FC = () => { ); }; + +const LiveTail = lazy(() => import('@/pages/LiveTail')); + +export const LiveTailElement: FC = () => { + return ( + + + + ); +}; diff --git a/src/routes/index.tsx b/src/routes/index.tsx index 3161bd4d..63eebf01 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -2,6 +2,7 @@ import { ALL_ROUTE, CONFIG_ROUTE, HOME_ROUTE, + LIVE_TAIL_ROUTE, LOGIN_ROUTE, LOGS_ROUTE, OIDC_NOT_CONFIGURED_ROUTE, @@ -23,6 +24,7 @@ import { StatsElement, ConfigElement, UsersElement, + LiveTailElement, } from './elements'; import AccessSpecificRoute from './AccessSpecificRoute'; import OIDCNotConFigured from '@/pages/Errors/OIDC'; @@ -44,6 +46,7 @@ const AppRouter: FC = () => { }> } /> } /> + } /> }>