diff --git a/package.json b/package.json index 59b29dbc..9841f293 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "pq": "pretty-quick" }, "dependencies": { + "@apache-arrow/ts": "^14.0.2", "@emotion/react": "^11.11.1", "@mantine/carousel": "^6.0.15", "@mantine/core": "^6.0.15", @@ -31,7 +32,11 @@ "immer": "^10.0.2", "js-cookie": "^3.0.5", "just-compare": "^2.3.0", + "long": "^5.2.3", + "nice-grpc-common": "^2.0.2", "ms": "^2.1.3", + "nice-grpc-web": "^3.3.2", + "protobufjs": "^7.2.5", "react": "^18.2.0", "react-beautiful-dnd": "^13.1.1", "react-dom": "^18.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 165152a2..89bcca13 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,6 +5,9 @@ settings: excludeLinksFromLockfile: false dependencies: + '@apache-arrow/ts': + specifier: ^14.0.2 + version: 14.0.2 '@emotion/react': specifier: ^11.11.1 version: 11.11.1(@types/react@18.2.14)(react@18.2.0) @@ -59,9 +62,21 @@ 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-common: + specifier: ^2.0.2 + version: 2.0.2 + nice-grpc-web: + specifier: ^3.3.2 + version: 3.3.2(ws@8.16.0) + protobufjs: + specifier: ^7.2.5 + version: 7.2.5 react: specifier: ^18.2.0 version: 18.2.0 @@ -148,6 +163,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@14.0.2: + resolution: {integrity: sha512-CtwAvLkK0CZv7xsYeCo91ml6PvlfzAmAJZkRYuz2GNBwfYufj5SVi0iuSMwIMkcU/szVwvLdzORSLa5PlF/2ug==} + 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'} @@ -741,6 +779,49 @@ packages: fastq: 1.15.0 dev: true + /@protobufjs/aspromise@1.1.2: + resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} + dev: false + + /@protobufjs/base64@1.1.2: + resolution: {integrity: sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==} + dev: false + + /@protobufjs/codegen@2.0.4: + resolution: {integrity: sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==} + dev: false + + /@protobufjs/eventemitter@1.1.0: + resolution: {integrity: sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==} + dev: false + + /@protobufjs/fetch@1.1.0: + resolution: {integrity: sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==} + dependencies: + '@protobufjs/aspromise': 1.1.2 + '@protobufjs/inquire': 1.1.0 + dev: false + + /@protobufjs/float@1.0.2: + resolution: {integrity: sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==} + dev: false + + /@protobufjs/inquire@1.1.0: + resolution: {integrity: sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==} + dev: false + + /@protobufjs/path@1.1.2: + resolution: {integrity: sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==} + dev: false + + /@protobufjs/pool@1.1.0: + resolution: {integrity: sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==} + dev: false + + /@protobufjs/utf8@1.1.0: + resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==} + dev: false + /@radix-ui/number@1.0.0: resolution: {integrity: sha512-Ofwh/1HX69ZfJRiRBMTy7rgjAzHmwe4kW9C9Y99HTRUcYLUuVT0KESFj15rPjRgKJs20GPq8Bm5aEDJ8DuA3vA==} dependencies: @@ -984,6 +1065,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 +1100,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 +1300,10 @@ packages: - '@swc/helpers' 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: @@ -1244,7 +1344,6 @@ packages: engines: {node: '>=8'} dependencies: color-convert: 2.0.1 - dev: true /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} @@ -1257,6 +1356,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 +1486,13 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} + /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,7 +1516,6 @@ packages: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 - dev: true /clsx@1.1.1: resolution: {integrity: sha512-6/bPho624p3S2pMyvP5kKBPXnI3ufHLObBFCfgx+LkeR5lg2XYy2hqZqUf45ypD8COn2bhgGJSUE+l5dhNBieA==} @@ -1418,7 +1533,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,7 +1540,6 @@ packages: /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - dev: true /combined-stream@1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} @@ -1435,6 +1548,26 @@ 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 @@ -1987,6 +2120,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 +2155,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 @@ -2179,7 +2323,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==} @@ -2403,6 +2546,18 @@ packages: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true + /isomorphic-ws@5.0.0(ws@8.16.0): + resolution: {integrity: sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==} + peerDependencies: + ws: '*' + dependencies: + ws: 8.16.0 + 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 +2573,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 +2640,22 @@ 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==} + dev: false + /loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true @@ -2586,6 +2758,23 @@ 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.2(ws@8.16.0): + resolution: {integrity: sha512-qetU+H6y6jVvI5NZdtTls9UdqdCNwhr4UxqL5SfH6v8ISxucxDVPRYxnZaoZyWjMRvRgAKiQDIMu0bB0oedD0A==} + dependencies: + abort-controller-x: 0.4.3 + isomorphic-ws: 5.0.0(ws@8.16.0) + js-base64: 3.7.5 + nice-grpc-common: 2.0.2 + transitivePeerDependencies: + - ws + dev: false + /npm-run-path@4.0.1: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} @@ -2708,6 +2897,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 +3009,25 @@ 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 + dev: false + /proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} dev: false @@ -3056,6 +3271,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'} @@ -3173,6 +3393,11 @@ packages: resolution: {integrity: sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w==} dev: false + /stream-read-all@3.0.1: + resolution: {integrity: sha512-EWZT9XOceBPlVJRrYcykW8jyRSZYbkb/0ZK36uLEmoWVO5gxBOnntNTseNzfREsqxqdfEGQrD8SXQ3QWbBmq8A==} + engines: {node: '>=10'} + dev: false + /string.prototype.matchall@4.0.8: resolution: {integrity: sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg==} dependencies: @@ -3249,7 +3474,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 +3483,20 @@ 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 + /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true @@ -3279,6 +3517,10 @@ packages: is-number: 7.0.0 dev: true + /ts-error@1.0.6: + resolution: {integrity: sha512-tLJxacIQUM82IR7JO1UUkKlYuUTmoY9HBJAmNWFzheSlDS5SPMcNIepejHJa4BpPQLAcbRhRf3GDJzyj6rbKvA==} + dev: false + /tsconfig-paths@3.14.2: resolution: {integrity: sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==} dependencies: @@ -3296,6 +3538,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 +3578,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: @@ -3489,10 +3745,28 @@ packages: 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.16.0: + resolution: {integrity: sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==} + 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/assets/arrow.proto b/src/assets/arrow.proto new file mode 100644 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..7191303b --- /dev/null +++ b/src/assets/arrow.ts @@ -0,0 +1,1700 @@ +/* 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..c7bc99cd --- /dev/null +++ b/src/assets/google/protobuf/timestamp.ts @@ -0,0 +1,192 @@ +/* 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/Header/Dropdown.tsx b/src/components/Header/Dropdown.tsx new file mode 100644 index 00000000..0dcaa733 --- /dev/null +++ b/src/components/Header/Dropdown.tsx @@ -0,0 +1,15 @@ +import { type FC } from 'react'; +import { Select } from '@mantine/core'; + +type DropdownProps = { + data: string[]; + onChange: (value: string) => void; +}; + +const Dropdown: FC = (props) => { + const { data, onChange } = props; + + return