{"_id":"@add-context/pinecone-client","_rev":"2-e3c7917b5932a4a4cab0729db2e2d0b3","name":"@add-context/pinecone-client","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.2":{"name":"@add-context/pinecone-client","version":"1.0.2","description":"Pinecone.io client powered by fetch","types":"dist/index.d.ts","main":"dist/index.cjs.js","module":"dist/index.js","author":{"name":"Riley Tomasek","email":"hi@rile.yt","url":"https://rile.yt"},"scripts":{"build":"rm -rf dist && node build.js && tsc -b","lint":"eslint src","prepare":"yarn build","prepublishOnly":"yarn lint && yarn typecheck","release":"np","test:native":"tsx ./test/test-native.ts","test:polyfill":"tsx ./test/test-polyfill.ts","typecheck":"tsc"},"license":"MIT","private":false,"dependencies":{"ky":"^0.32.2"},"devDependencies":{"@types/node":"^18.11.13","cross-fetch":"^3.1.5","esbuild":"^0.16.4","eslint":"^8.29.0","eslint-config-hckrs":"^0.0.3","np":"^7.6.2","prettier":"^2.8.1","tsx":"^3.12.1","type-fest":"^3.3.0","typescript":"^4.9.4"},"publishConfig":{"registry":"https://registry.npmjs.org"},"prettier":{"singleQuote":true},"volta":{"node":"18.12.1","yarn":"1.22.19"},"licenseText":"MIT License\n\nCopyright (c) 2022 Riley Tomasek\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@add-context/pinecone-client@1.0.2","dist":{"shasum":"faa38bc6db23ea298525db4d22cdc21bf9f1bf7f","integrity":"sha512-CIDYRhCaIYAUyijySs0B84fH6eqj19kmX5NhXpuBegcQK4wAXZ37AOFDoAbUc9OtnaM2fwztrjw4qMjBk5qh0A==","tarball":"https://registry.npmjs.org/@add-context/pinecone-client/-/pinecone-client-1.0.2.tgz","fileCount":19,"unpackedSize":115938,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8gUzBXZP22Wg5P54lMF/clzVuvYn2o8tk1BslkvGGvgIgH6yTEw3XdSCHfSKonW1YNFDislhnHee+nKxrogP1Oao="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtLRyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpAjw//WLaqlhlTDHaNLULC+XiLFJrCIDvJRn72zkZU8fLZVDPqecKJ\r\n8+9f4q4dKHd92wrJ2qDCTVpAxj5UTVoTiB+Y9lmMKhta2w8Tgi39JoPVokoB\r\nPx1Ss9jc81xZlrsNqc60DhFUMoDlN4yuMhl9dfMvTMhhzm7jEwJpkgE4t/ka\r\n6Pi4Andrs/UwbuJjrF0IL43XRMg4gfVxS2x9oeEKWoWnXD5an8U4w2d/2Tyo\r\nnCX97tofF6pfP6XvLTOaeVsVsm/6etPIgZ+vZtGx754rJEkHTXqxUCYcaAjp\r\nNbefrqNl+0E3HMOQRBVobXdeWitTpXNoygAPBk9VPuN5F4YyT2E5oKwmura8\r\nRBLKrVPUwoC5Qg/oFmYXEQQOP7gmMg5sim/9GXn/ooS1Mj2JC3bTaCeV2gad\r\nUh0K+eJy9tuq36dUM8ARrWBl0xHSKS+EIGtX13zWlttmTU5dkzaiqKtHOZKq\r\nkZbwpRFfC/Nb4gxRQPtfpORC/tHvKQC0a0TCRa5t1GHNHS/qxbRkR1zVlfi+\r\niTAX2FOdUw9+/0A3faJJmml4x6e3tnkDbrCDGSzD9h8GhsvqHd5uUJtJCsJJ\r\nXdlMXm+x8hCKN9DiIncGjNuMwzU5lHRFe2cSdQCAt1S/AxYMlJb31NFPqK3F\r\nsRs3FX3XZJ8eFhW5JE2by/yE5xCAHgfvAPI=\r\n=k0Pp\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"samheutmaker","email":"samheutmaker@gmail.com"},"directories":{},"maintainers":[{"name":"samheutmaker","email":"samheutmaker@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pinecone-client_1.0.2_1672787058787_0.7944932266530695"},"_hasShrinkwrap":false},"1.0.4":{"name":"@add-context/pinecone-client","version":"1.0.4","description":"Pinecone.io client powered by fetch","types":"dist/index.d.ts","main":"dist/index.cjs.js","module":"dist/index.js","author":{"name":"Riley Tomasek","email":"hi@rile.yt","url":"https://rile.yt"},"scripts":{"build":"rm -rf dist && node build.js && tsc -b","lint":"eslint src","prepare":"yarn build","prepublishOnly":"yarn lint && yarn typecheck","release":"np","test:native":"tsx ./test/test-native.ts","test:polyfill":"tsx ./test/test-polyfill.ts","typecheck":"tsc"},"license":"MIT","private":false,"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"dependencies":{"ky":"^0.32.2"},"devDependencies":{"@types/node":"^18.11.13","cross-fetch":"^3.1.5","esbuild":"^0.16.4","eslint":"^8.29.0","eslint-config-hckrs":"^0.0.3","np":"^7.6.2","prettier":"^2.8.1","tsx":"^3.12.1","type-fest":"^3.3.0","typescript":"^4.9.4"},"prettier":{"singleQuote":true},"volta":{"node":"18.12.1","yarn":"1.22.19"},"licenseText":"MIT License\n\nCopyright (c) 2022 Riley Tomasek\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@add-context/pinecone-client@1.0.4","dist":{"shasum":"aed3929d76c668a4225a48ac37676a6fb0425a22","integrity":"sha512-Ov2Lx2+lkXFnh9BdLWJffO27bSSk6gXlpp889TWzNLqbrmXdX3sMvIUcLc9nRqpNOyheWjNey2hRTT41G/GcQw==","tarball":"https://registry.npmjs.org/@add-context/pinecone-client/-/pinecone-client-1.0.4.tgz","fileCount":19,"unpackedSize":116587,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICmUj3Tc3DFGDkJDOqPlXQxksI9XnnVXuBNRuWS7vIhAAiEA3jJj9/UlK1g/QC6pfiD1pB17pL8AXnawGQqpiTcX4sY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtLx8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpyVA//YxGJHIhNT/YC/UqTusSNjheK7rpQOk3XOYGXbFP9scOhvh2o\r\nyqaPjj+3jP/WlSaCtgIP/jdRHG/vuSszlV4Sp/dNR1TTPVxiOMe5BjYZwe6q\r\nS08iq0eSTsHpgLl9OyPH/ENQFd/M2LXDlxNup7wJoXxUiK9rqbnRhAYkNZas\r\njcHCtR1m5hX0R8aH3iHFKbBR6KOs2uvCNd/aigeX4otHMFRhFHKmq3II9gfM\r\nPtkt++6JkeQDefvKgKiIZrEdZxKAc71MptSMyYHfgHur1C/o3OM9hnCG1kkP\r\njN0yu8ljVPD0EV+bvurJCBfEK3aNkeR/jFIzTyuyYcDP2YbtyiCJyZ3TveLu\r\ngClwXHfZd8siAG/VnaJz2nWGD65wUindz56dXpNv8ysFoUtPVLzygLUxog9q\r\n7Sx4CKZSu+rfC6ehw8n+DabCSr1nmiPHvoAXUTHeB0+lrGqEctjtRdZM8DQb\r\nWW5F0WzWvOtOpyDjtsEnO7waMzhrElr2tQf7DFQnHQR6cfDLwGQPNMXj0dWE\r\nJazbM4SrJsmpfNT3VwuKkQHNVd25Y71gMCsNZIJcUBNuQ84HmFTev3rR9DAv\r\nftsPw65dH4V2eDDrE3gCrwJ6d9deo0ymhoLYNxhi3ituhWVWFrDb/7bTazii\r\nGxD7czocoKx38AMZRJQ+mqgIBNCJNHwuOuo=\r\n=kCK7\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"samheutmaker","email":"samheutmaker@gmail.com"},"directories":{},"maintainers":[{"name":"samheutmaker","email":"samheutmaker@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pinecone-client_1.0.4_1672789116175_0.7075766898374816"},"_hasShrinkwrap":false}},"time":{"created":"2023-01-03T23:04:18.787Z","1.0.2":"2023-01-03T23:04:18.947Z","modified":"2023-01-03T23:38:36.490Z","1.0.4":"2023-01-03T23:38:36.388Z"},"maintainers":[{"name":"samheutmaker","email":"samheutmaker@gmail.com"}],"description":"Pinecone.io client powered by fetch","author":{"name":"Riley Tomasek","email":"hi@rile.yt","url":"https://rile.yt"},"license":"MIT","readme":"# Pinecone.io Client\n\n[![Build Status](https://github.com/rileytomasek/pinecone-client/actions/workflows/main.yml/badge.svg)](https://github.com/rileytomasek/pinecone-client/actions/workflows/main.yml) [![npm version](https://img.shields.io/npm/v/pinecone-client.svg?color=0c0)](https://www.npmjs.com/package/pinecone-client)\n\nA fetch based client for the [Pinecone.io](https://www.pinecone.io/) vector database with excellent TypeScript support.\n\n## Highlights\n\n- Support for all vector operation endpoints\n- Fully typed metadata with TypeScript generics\n- Automatically remove null metadata values (Pinecone doesn't nulls)\n- Supports modern fetch based runtimes (Cloudlflare workers, Deno, etc)\n- In-editor documentation with IntelliSense/TS server\n- Tiny package size. [Less than 5kb gzipped](https://bundlephobia.com/package/pinecone-client)\n- Full [e2e test coverage](/test)\n\n## Example Usage\n\n```ts\nimport { PineconeClient } from 'pinecone-client';\n\n// Specify the type of your metadata\ntype Metadata = { size: number, tags?: string[] | null };\n\n// Instantiate a client\nconst pinecone = new PineconeClient<Metadata>({ namespace: 'test' });\n\n// Upsert vectors with metadata.\nawait pinecone.upsert({\n  vectors: [\n    { id: '1', values: [1, 2, 3], metadata: { size: 3, tags: ['a', 'b', 'c'] } },\n    { id: '2', values: [4, 5, 6], metadata: { size: 10, tags: null } },\n  ],\n});\n\n// Query vectors with metadata filters.\nconst { matches } = await pinecone.query({\n  topK: 2,\n  id: '2',\n  filter: { size: { $lt: 20 } },\n  includeMetadata: true,\n});\n\n// typeof matches = {\n//   id: string;\n//   score: number;\n//   metadata: Metadata;\n// }[];\n```\n\n## Install\n\nInstallation depends on runtime support for the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).\n\n### With Fetch\n\nRuntime examples: Deno, Node v18+, Cloudflare Workers, browsers\n\n```sh\nnpm install pinecone-client\n```\n\n```ts\nimport { PineconeClient } from 'pinecone-client';\n\nconst pinecone = new PineconeClient({ /* ... */ });\n```\n\n### Without Fetch\n\nFor runtimes like Node.js v17 and below that don't support fetch, you will need to polyfill fetch. I suggest using [cross-fetch](https://github.com/lquixada/cross-fetch).\n\n```sh\nnpm install pinecone-client cross-fetch\n```\n\n```ts\nimport 'cross-fetch/polyfill';\nimport { PineconeClient } from 'pinecone-client';\n\nconst pinecone = new PineconeClient({ /* ... */ });\n```\n\n## Setup\n\nOnce installed, you need to create an instance of the `PineconeClient` class to make API calls.\n\n```ts\nimport { PineconeClient } from 'pinecone-client';\n\n// A type representing your metadata\ntype Metadata = {};\n\nconst pinecone = new PineconeClient<Metadata>({\n  apiKey: '<your api key>',\n  baseUrl: '<your index url>'\n  namespace: 'testing',\n});\n```\n\nBoth apiKey and baseUrl are optional and will be read from the following environment variables:\n- `process.env.PINECONE_API_KEY`\n- `process.env.PINECONE_BASE_URL`\n\n## API\n\nThe client supports all of the vector operations from the Pinecone API using the same method names and parameters. It also supports creating and deleting indexes.\n\nFor detailed documentation with links to the Pinecone docs, see [the source code](/src/pinecone-client.ts).\n\n### Supported methods:\n\n- `pinecone.delete()`\n- `pinecone.describeIndexStats()`\n- `pinecone.fetch()`\n- `pinecone.query()`\n- `pinecone.update()`\n- `pinecone.upsert()`\n- `pinecone.createIndex()`\n- `pinecone.deleteIndex()`\n\nYou can also find more example usage in the [e2e tests](/test/e2e-tests.ts).\n","readmeFilename":"readme.md"}