{"_id":"@asaidimu/remote-store-pocketbase","_rev":"2-f674107412d4814bf8d70ec60f391cf7","name":"@asaidimu/remote-store-pocketbase","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@asaidimu/remote-store-pocketbase","version":"1.0.0","keywords":["react-query","react","pocketbase","typescript"],"author":{"name":"Saidimu","email":"47994458+asaidimu@users.noreply.github.com"},"license":"MIT","_id":"@asaidimu/remote-store-pocketbase@1.0.0","maintainers":[{"name":"asaidimu","email":"lolokilesaidimu@gmail.com"}],"homepage":"https://github.com/asaidimu/remote-store#readme","bugs":{"url":"https://github.com/asaidimu/remote-store/issues"},"dist":{"shasum":"9bbc3aff54524f70d235501285446b64de405e7d","tarball":"https://registry.npmjs.org/@asaidimu/remote-store-pocketbase/-/remote-store-pocketbase-1.0.0.tgz","fileCount":5,"integrity":"sha512-L6hqYI2zLbG1+vvk3beRwY4/0SzJC+mz1dEbo0ICtqvC03JIaHt8fkdYMSrpCLYh9wO4lbMCIv7leWzFmIEjEQ==","signatures":[{"sig":"MEYCIQCQQ/2XcFc1jg5Y3aI1WuVEYdFawXrycn3aS2yyNGuw6wIhANWInfYuMLSuOLRsYb+49WK3DhAWLQz1H9MYCtrtvNBZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7078},"main":"index.js","types":"index.d.ts","gitHead":"935b7e0439dcbae8a5318d264015f41eb12561d1","_npmUser":{"name":"asaidimu","email":"lolokilesaidimu@gmail.com"},"repository":{"url":"git+https://github.com/asaidimu/remote-store.git","type":"git"},"_npmVersion":"10.9.2","description":"A PocketBase adapter for the remote-store library that provides a consistent interface for working with PocketBase collections.","directories":{},"_nodeVersion":"20.8.1","dependencies":{"pocketbase":"^0.25.0","@tanstack/react-query":"^5.63.0"},"publishConfig":{"tag":"latest","access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/remote-store-pocketbase_1.0.0_1736589379210_0.3214227389618858","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@asaidimu/remote-store-pocketbase","version":"1.0.1","keywords":["react-query","react","pocketbase","typescript"],"author":{"name":"Saidimu","email":"47994458+asaidimu@users.noreply.github.com"},"license":"MIT","_id":"@asaidimu/remote-store-pocketbase@1.0.1","maintainers":[{"name":"asaidimu","email":"lolokilesaidimu@gmail.com"}],"homepage":"https://github.com/asaidimu/remote-store#readme","bugs":{"url":"https://github.com/asaidimu/remote-store/issues"},"dist":{"shasum":"12104ba9891e65cc2da6bd404a95fc74aabd7775","tarball":"https://registry.npmjs.org/@asaidimu/remote-store-pocketbase/-/remote-store-pocketbase-1.0.1.tgz","fileCount":5,"integrity":"sha512-aSjIU193NUhDzDL8BZ5izDN22G2Ji9r6ak/Emp0fHu+7EHloChCio983IDapEyBsUnav5KyZRSa4N0N6HvOWBQ==","signatures":[{"sig":"MEYCIQCnWtc5NyAjMhpb7Y68bHVrYZBrJcsQWhi18sw1MPUgWgIhALUkrYC2/VnHo1UHMScOQwXRod0PVNZQ59UasBqehpI2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7431},"main":"index.js","types":"index.d.ts","gitHead":"873997dafc8bd5d6a0a625a529f7fe8a1ee0c64a","_npmUser":{"name":"asaidimu","email":"lolokilesaidimu@gmail.com"},"repository":{"url":"git+https://github.com/asaidimu/remote-store.git","type":"git"},"_npmVersion":"10.9.2","description":"A PocketBase adapter for the remote-store library that provides a consistent interface for working with PocketBase collections.","directories":{},"_nodeVersion":"20.8.1","dependencies":{"pocketbase":"^0.25.0","@tanstack/react-query":"^5.63.0"},"publishConfig":{"tag":"latest","access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/remote-store-pocketbase_1.0.1_1736597068181_0.7909048062172281","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@asaidimu/remote-store-pocketbase","version":"1.0.2","description":"A PocketBase adapter for the remote-store library that provides a consistent interface for working with PocketBase collections.","main":"index.js","types":"index.d.ts","keywords":["react-query","react","pocketbase","typescript"],"author":{"name":"Saidimu","email":"47994458+asaidimu@users.noreply.github.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/asaidimu/remote-store.git"},"bugs":{"url":"https://github.com/asaidimu/remote-store/issues"},"homepage":"https://github.com/asaidimu/remote-store#readme","publishConfig":{"registry":"https://registry.npmjs.org/","tag":"latest","access":"public"},"dependencies":{"@asaidimu/remote-store":"^1.0.6","@tanstack/react-query":"^5.66.0","pocketbase":"^0.25.1"},"_id":"@asaidimu/remote-store-pocketbase@1.0.2","gitHead":"1a62b8729d10e8792e6c6fc4b7803f0467c19d86","_nodeVersion":"20.8.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-Mv5uKcO8+M/uyQsXKPUPmjnmXgVlSwKZtp55CUeX50FLVL9My+G7cX7YVHTvPKKnoOoy/0O/kVGBkRO9ufjXOw==","shasum":"34b1226c3f74284a17f7ab96df63e270f7c3dd46","tarball":"https://registry.npmjs.org/@asaidimu/remote-store-pocketbase/-/remote-store-pocketbase-1.0.2.tgz","fileCount":5,"unpackedSize":7471,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCvWoJb9Vl47AKlM0rU8y6drruFs6L70k0C4/k3Xyee5gIhAKjh+dTcpK56RfBerJluys3dL77gwUFM6sZaRyrVSnwY"}]},"_npmUser":{"name":"asaidimu","email":"lolokilesaidimu@gmail.com"},"directories":{},"maintainers":[{"name":"asaidimu","email":"lolokilesaidimu@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/remote-store-pocketbase_1.0.2_1738489929546_0.10525576711914231"},"_hasShrinkwrap":false}},"time":{"created":"2025-01-11T09:56:19.055Z","modified":"2025-02-02T09:52:09.948Z","1.0.0":"2025-01-11T09:56:19.393Z","1.0.1":"2025-01-11T12:04:28.414Z","1.0.2":"2025-02-02T09:52:09.749Z"},"bugs":{"url":"https://github.com/asaidimu/remote-store/issues"},"author":{"name":"Saidimu","email":"47994458+asaidimu@users.noreply.github.com"},"license":"MIT","homepage":"https://github.com/asaidimu/remote-store#readme","keywords":["react-query","react","pocketbase","typescript"],"repository":{"type":"git","url":"git+https://github.com/asaidimu/remote-store.git"},"description":"A PocketBase adapter for the remote-store library that provides a consistent interface for working with PocketBase collections.","maintainers":[{"name":"asaidimu","email":"lolokilesaidimu@gmail.com"}],"readme":"# @asaidimu/remote-store-pocketbase\n\nA PocketBase adapter for the remote-store library that provides a consistent interface for working with PocketBase collections.\n\n## Installation\n\n```bash\nnpm install @asaidimu/remote-store-pocketbase pocketbase\n```\n\n## Usage\n\n```typescript\nimport PocketBase from 'pocketbase';\nimport { createPocketBaseStore } from '@asaidimu/remote-store-pocketbase';\n\n// Initialize PocketBase client\nconst pb = new PocketBase('http://127.0.0.1:8090');\n\n// Define your record type\ninterface User extends RemoteStoreRecord {\n  name: string;\n  email: string;\n  avatar?: string;\n}\n\n// Create a store instance\nconst userStore = createPocketBaseStore<User>({\n  collection: 'users',\n  pb,\n});\n\n// Use the store\nasync function example() {\n  // Create a user\n  const user = await userStore.create({\n    data: {\n      name: 'John Doe',\n      email: 'john@example.com',\n    }\n  });\n\n  // Upload an avatar\n  const avatarFile = new File([''], 'avatar.png');\n  await userStore.upload({\n    id: user.id,\n    field: 'avatar',\n    file: avatarFile\n  });\n\n  // List users with pagination\n  const users = await userStore.list({\n    page: 1,\n    pageSize: 20,\n    filter: 'name=\"John Doe\"',\n    select: ['name', 'email'],\n    include: ['profile']\n  });\n}\n```\n\n## API\n\n### `createPocketBaseStore(options)`\n\nCreates a new store instance for interacting with a PocketBase collection.\n\n#### Options\n\n- `collection: string` - The name of the PocketBase collection\n- `pb: PocketBase` - An initialized PocketBase client instance\n\n#### Returns\n\nReturns a `BaseStore<T>` instance with the following methods:\n\n- `find({ filter, options? })` - Find first record matching the filter\n- `read({ id, options? })` - Read a record by ID\n- `list({ filter?, page?, pageSize?, ...options })` - List records with pagination\n- `create({ data })` - Create a new record\n- `update({ id, data })` - Update an existing record\n- `delete({ id })` - Delete a record\n- `upload({ id, field, file })` - Upload a file for a record\n\n## License\n\nMIT\n","readmeFilename":"README.md"}