{"_id":"@aaryav/js-client-grpc","name":"@aaryav/js-client-grpc","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@aaryav/js-client-grpc","version":"2.0.0","engines":{"node":">=18.0.0","pnpm":">=8"},"repository":{"type":"git","url":"git+https://github.com/arya/arya-js.git","directory":"packages/js-client-grpc"},"bugs":{"url":"https://github.com/arya/arya-js/issues"},"homepage":"https://github.com/arya/arya-js#readme","license":"Apache-2.0","type":"module","exports":{".":{"types":"./dist/types/index.d.ts","require":"./dist/cjs/index.js","default":"./dist/esm/index.js"}},"types":"./dist/types/index.d.ts","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","publishConfig":{"access":"public"},"sideEffects":false,"dependencies":{"@bufbuild/connect":"^0.10.0","@bufbuild/connect-node":"^0.10.0","@bufbuild/protobuf":"^1.2.1"},"devDependencies":{"@bufbuild/protoc-gen-connect-es":"^0.10.0","@bufbuild/protoc-gen-es":"^1.2.1","@protobuf-ts/protoc":"^2.9.0","@sevinf/maybe":"^0.5.0","ts-prune":"^0.10.3","vitest":"^0.31.4"},"peerDependencies":{"typescript":">=4.1"},"scripts":{"build":"pnpm tsc:build && node scripts/post-build.js","test":"vitest","test:integration":"vitest run --config vitest.integration.config.ts","pre-check":"pnpm tsc:check && pnpm tsc:deadcode && pnpm lint && pnpm test run","pre-commit":"pnpm tsc:check && pnpm tsc:deadcode && pnpm lint-staged && pnpm test run","tsc:deadcode":"ts-prune -e -i 'src/proto|src/index.ts|vitest.config.ts|vitest.integration.config.ts'","tsc:check":"tsc --noEmit","tsc:build":"pnpm clean && tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json","lint":"eslint src","clean":"rimraf ./dist","codegen:grpc-typescript":"./scripts/generate-grpc-sources.sh"},"_id":"@aaryav/js-client-grpc@2.0.0","description":"This repository contains the gRPC client for the [Arya](https://github.com/arya/arya) vector search engine.","_integrity":"sha512-j+Q4BBirp/wSYqQGIYtfKvcp5k4tn/S2qXflgmoY7B0+GeLZj5TXYmijCRI/pWQ7aV+HLaJYNzE7NbGdzFnLtQ==","_resolved":"/private/var/folders/t0/62pch4m55wgfy0_tt7864qzc0000gn/T/3537604bb79ce0c2f5ca9f6f5179604f/aaryav-js-client-grpc-2.0.0.tgz","_from":"file:aaryav-js-client-grpc-2.0.0.tgz","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-j+Q4BBirp/wSYqQGIYtfKvcp5k4tn/S2qXflgmoY7B0+GeLZj5TXYmijCRI/pWQ7aV+HLaJYNzE7NbGdzFnLtQ==","shasum":"b939566b908a8fa2306c6a9602e7593fa9c348ec","tarball":"https://registry.npmjs.org/@aaryav/js-client-grpc/-/js-client-grpc-2.0.0.tgz","fileCount":52,"unpackedSize":1158634,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCdViC/PUUp411L0FcKS/qJJFAgaHC/XXDVbGHbNFnF9QIhALOSlUqtZtqnlN4zbWD3FNeH8EV0zQyPeDgKDoLsRHbb"}]},"_npmUser":{"name":"vasutech","email":"vasutech@gmail.com"},"directories":{},"maintainers":[{"name":"vasutech","email":"vasutech@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/js-client-grpc_2.0.0_1745084865694_0.6750933693315515"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-19T17:47:45.599Z","2.0.0":"2025-04-19T17:47:45.916Z","modified":"2025-04-19T17:47:46.230Z"},"maintainers":[{"name":"vasutech","email":"vasutech@gmail.com"}],"description":"This repository contains the gRPC client for the [Arya](https://github.com/arya/arya) vector search engine.","homepage":"https://github.com/arya/arya-js#readme","repository":{"type":"git","url":"git+https://github.com/arya/arya-js.git","directory":"packages/js-client-grpc"},"bugs":{"url":"https://github.com/arya/arya-js/issues"},"license":"Apache-2.0","readme":"# JavaScript Arya gRPC Client\n\nThis repository contains the gRPC client for the [Arya](https://github.com/arya/arya) vector search engine.\n\n## Installation\n\n```shell\nnpm install @arya/js-client-grpc\n# or\nyarn add @arya/js-client-grpc\n# or\npnpm i @arya/js-client-grpc\n```\n\n## Usage\n\nRun the Arya Docker container:\n\n```shell\ndocker run -p 6334:6334 arya/arya\n```\n\n## Instantiate a client\n\n```ts\nimport {AryaClient} from '@arya/js-client-grpc';\n\nconst client = new AryaClient({host: '127.0.0.1', port: 6334});\n// or\nconst client = new AryaClient({url: 'http://127.0.0.1:6334'});\n```\n\n## Make requests\n\nUse an endpoint from `collections` API:\n\n```ts\ntry {\n    const result = await client.api('collections').list({});\n    console.log('List of collections:', result.collections);\n} catch (err) {\n    console.error('Could not get collections:', err);\n}\n```\n\n## Support\n\nThe gRPC implementation relies on the native node module `node:https`. For the time being, no JavaScript runtime other than Node / Deno are supported (though support for web may be added). Both Deno and Node support full-duplex, HTTP trailers and all the necessary bits for gRPC. Under the hood, the client uses [`connect-es`](https://github.com/bufbuild/connect-es/) to communicate with the server.\n\n## Releases\n\nMajor and minor versions align with Arya's engine releases, whilst patch are reserved for fixes regarding the current minor release. Check out [RELEASE.md](../../RELEASE.md) for more info on release guidelines.\n\n## Contributing\n\nThese are the most relevant scripts for development:\n\n-   `pnpm build`: builds and bundles from TypeScript sources\n-   `pnpm pre-check`: type-checks sources\n-   `pnpm pre-commit`: same as pre-check, but for git hooks (husky)\n-   `pnpm test`: run unit tests\n-   `pnpm test:integration`: runs integration tests against a locally running Arya docker container\n-   `pnpm codegen:grpc-typescript`: updates generated TS classes and types from the latest remote proto files\n","readmeFilename":"README.md","_rev":"1-4a96d6d9bb516d1d63272e6fba028ccd"}