{"_id":"stripe-replit-sync","_rev":"15-a5540523ff760204ecf5fe74d3a15314","name":"stripe-replit-sync","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.0":{"name":"stripe-replit-sync","version":"0.0.0","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"Supabase","email":"https://supabase.com/"},"_id":"stripe-replit-sync@0.0.0","maintainers":[{"name":"depombo","email":"f@backmesh.com"}],"homepage":"https://github.com/tx-stripe/stripe-sync-engine#readme","bugs":{"url":"https://github.com/tx-stripe/stripe-sync-engine/issues"},"dist":{"shasum":"56daef0e33bbe0dfe1dbf15780b3c2a1618e6f0a","tarball":"https://registry.npmjs.org/stripe-replit-sync/-/stripe-replit-sync-0.0.0.tgz","fileCount":48,"integrity":"sha512-2H4gHw5AR4sZUwHfufS0u+7pFdXjPHxmF0uT6WV59mOCt8PwU9Bpqqt4+e/IJm2P+qDCF9VWV/v00PRVX65NIA==","signatures":[{"sig":"MEQCIHDlgWq1tcqq3T21bUJs+GWGMhPW3IwOI5n1pHQulRjiAiAIDy9Th+29hWtuufY9eT0B5hFjrJ0KpFfVImCvd4ru2Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":209607},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"8b7821138b31e58bf1b307a08d5cc55b82f8400a","private":false,"scripts":{"lint":"eslint src --ext .ts","build":"tsup src/index.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean"},"_npmUser":{"name":"depombo","email":"f@backmesh.com"},"repository":{"url":"git+https://github.com/tx-stripe/stripe-sync-engine.git","type":"git"},"_npmVersion":"10.9.2","description":"Stripe Sync Engine to sync Stripe data based on webhooks to Postgres","directories":{},"_nodeVersion":"22.14.0","dependencies":{"pg":"^8.16.3","yesql":"^7.0.0","pg-node-migrations":"0.0.8"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"^8.15.5","@types/yesql":"^4.1.4"},"peerDependencies":{"stripe":"> 11"},"_npmOperationalInternal":{"tmp":"tmp/stripe-replit-sync_0.0.0_1763081918777_0.7571733183976752","host":"s3://npm-registry-packages-npm-production"}},"0.0.1":{"name":"stripe-replit-sync","version":"0.0.1","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"Supabase","email":"https://supabase.com/"},"_id":"stripe-replit-sync@0.0.1","maintainers":[{"name":"depombo","email":"f@backmesh.com"}],"homepage":"https://github.com/tx-stripe/stripe-sync-engine#readme","bugs":{"url":"https://github.com/tx-stripe/stripe-sync-engine/issues"},"dist":{"shasum":"6d46fe029b809007f5ec55a3b9e51f347b4bbc11","tarball":"https://registry.npmjs.org/stripe-replit-sync/-/stripe-replit-sync-0.0.1.tgz","fileCount":48,"integrity":"sha512-PULVffNQE4Daq70XRA1MLCKBRWb+TxCCuZe7aBFi2oyOJ/oYmdcqGREevBSKJEy5A0UCnJgCGsFYVGbRppe8Yg==","signatures":[{"sig":"MEQCIG9WJm3UIGPMjPTELhoBDAat2AVbruej9VzzsdmYRHrRAiBHGIEPXsu9KwiU5KyZRC0DM4e9rNKjynTkyHTRRl64WQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":214301},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"gitHead":"5f8f11d96a7819a867b8a55861c320a5c9121790","private":false,"scripts":{"lint":"eslint src --ext .ts","build":"tsup src/index.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean"},"_npmUser":{"name":"depombo","email":"f@backmesh.com"},"repository":{"url":"git+https://github.com/tx-stripe/stripe-sync-engine.git","type":"git"},"_npmVersion":"10.9.2","description":"Stripe Sync Engine to sync Stripe data based on webhooks to Postgres","directories":{},"_nodeVersion":"22.14.0","dependencies":{"pg":"^8.16.3","yesql":"^7.0.0","pg-node-migrations":"0.0.8"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"^8.15.5","@types/yesql":"^4.1.4"},"peerDependencies":{"stripe":"> 11"},"_npmOperationalInternal":{"tmp":"tmp/stripe-replit-sync_0.0.1_1763086019239_0.6288438408160355","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"stripe-replit-sync","version":"0.0.2","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"Supabase","email":"https://supabase.com/"},"_id":"stripe-replit-sync@0.0.2","maintainers":[{"name":"depombo","email":"f@backmesh.com"}],"homepage":"https://github.com/tx-stripe/stripe-sync-engine#readme","bugs":{"url":"https://github.com/tx-stripe/stripe-sync-engine/issues"},"dist":{"shasum":"8fa6f0e1d29fdc21abda84d93a2e7239a743d33f","tarball":"https://registry.npmjs.org/stripe-replit-sync/-/stripe-replit-sync-0.0.2.tgz","fileCount":48,"integrity":"sha512-w+MzWKBdfPWtwxBTk7ZTvr/ByvJy73OHwWeigYArGeYpK421nr39t46OCzkqPDt12SKgt5wNVipvnZEqtultNA==","signatures":[{"sig":"MEYCIQC6pSjz8Nnk1YhgihcI2iET8m2HcOmsCmJJ10PxyWcqhwIhALJZ5kjJryofTrRX1elEZgECj6AoaYS7p4Tyke6TpiUl","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":213346},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"gitHead":"f955c95cdde2698c63c751c8616c7c9bc9d095ef","private":false,"scripts":{"lint":"eslint src --ext .ts","build":"tsup src/index.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean"},"_npmUser":{"name":"depombo","email":"f@backmesh.com"},"repository":{"url":"git+https://github.com/tx-stripe/stripe-sync-engine.git","type":"git"},"_npmVersion":"10.9.2","description":"Stripe Sync Engine to sync Stripe data based on webhooks to Postgres","directories":{},"_nodeVersion":"22.14.0","dependencies":{"pg":"^8.16.3","yesql":"^7.0.0","pg-node-migrations":"0.0.8"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"^8.15.5","@types/yesql":"^4.1.4"},"peerDependencies":{"stripe":"> 11"},"_npmOperationalInternal":{"tmp":"tmp/stripe-replit-sync_0.0.2_1763086553490_0.2009029737067356","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"stripe-replit-sync","version":"0.0.3","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"Supabase","email":"https://supabase.com/"},"_id":"stripe-replit-sync@0.0.3","maintainers":[{"name":"depombo","email":"f@backmesh.com"}],"homepage":"https://github.com/tx-stripe/stripe-sync-engine#readme","bugs":{"url":"https://github.com/tx-stripe/stripe-sync-engine/issues"},"dist":{"shasum":"f52f2be175e1025cea4ae98a506d2db15beb1c72","tarball":"https://registry.npmjs.org/stripe-replit-sync/-/stripe-replit-sync-0.0.3.tgz","fileCount":52,"integrity":"sha512-qkWgbjmW6rzp6jGLcTqq5LHxali+izD7QArMPJnRDVKEfCBIk9MZrTcdGbchCxQpTpkj1t0ajXFktYMydouZDQ==","signatures":[{"sig":"MEUCIFoqb3E7t87WSssG4EvErydeqsKHLAgqPq3mZaTe3JbSAiEA142LDMt6cjRzJbkh0iFM8Y2fXKq8SuAlvBFJwqHob0w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":343838},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"gitHead":"b7f4e9543e6e7bf4827bb0adfa408fb337c560d9","private":false,"scripts":{"lint":"eslint src --ext .ts","build":"tsup src/index.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean"},"_npmUser":{"name":"depombo","email":"f@backmesh.com"},"repository":{"url":"git+https://github.com/tx-stripe/stripe-sync-engine.git","type":"git"},"_npmVersion":"10.9.2","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"22.14.0","dependencies":{"pg":"^8.16.3","yesql":"^7.0.0","pg-node-migrations":"0.0.8"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"^8.15.5","@types/yesql":"^4.1.4"},"peerDependencies":{"stripe":"> 11"},"_npmOperationalInternal":{"tmp":"tmp/stripe-replit-sync_0.0.3_1763191444525_0.4389539362712187","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"stripe-replit-sync","version":"0.0.4","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"Supabase","email":"https://supabase.com/"},"_id":"stripe-replit-sync@0.0.4","maintainers":[{"name":"depombo","email":"f@backmesh.com"}],"homepage":"https://github.com/tx-stripe/stripe-sync-engine#readme","bugs":{"url":"https://github.com/tx-stripe/stripe-sync-engine/issues"},"dist":{"shasum":"3fc8368d565bffee2c9bfdc476d6583ff0844453","tarball":"https://registry.npmjs.org/stripe-replit-sync/-/stripe-replit-sync-0.0.4.tgz","fileCount":53,"integrity":"sha512-ydq2nL+KUjHz4GwHvCkXUNiApU8MdgnY9zlZw3UONkEZvJYXsvkTJ1qKT0u07mu37/2m2XsVjqbg+DGIUaKcYg==","signatures":[{"sig":"MEUCIA9osnIrh+OewcOecMi6ddYVN0/2bp6za7e0sQmj8mgvAiEAkVnAOAiUBeoM848YZLNNxid0jvxK12Z0GfNGMvrcrWA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":380591},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"gitHead":"c94084575e19d435bbace26e90b253eef3e33d4c","private":false,"scripts":{"lint":"eslint src --ext .ts","build":"tsup src/index.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean"},"_npmUser":{"name":"depombo","email":"f@backmesh.com"},"repository":{"url":"git+https://github.com/tx-stripe/stripe-sync-engine.git","type":"git"},"_npmVersion":"10.9.2","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"22.14.0","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","yesql":"^7.0.0","pg-node-migrations":"0.0.8"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@vitest/ui":"^4.0.9","@types/node":"^24.10.1","@types/yesql":"^4.1.4"},"peerDependencies":{"stripe":"> 11"},"_npmOperationalInternal":{"tmp":"tmp/stripe-replit-sync_0.0.4_1763368601495_0.040011147444295236","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"stripe-replit-sync","version":"0.0.5","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"Supabase","email":"https://supabase.com/"},"_id":"stripe-replit-sync@0.0.5","maintainers":[{"name":"tonyxiao","email":"tonyx.ca@gmail.com"},{"name":"depombo","email":"f@backmesh.com"}],"homepage":"https://github.com/tx-stripe/stripe-sync-engine#readme","bugs":{"url":"https://github.com/tx-stripe/stripe-sync-engine/issues"},"dist":{"shasum":"5febf13b8a59240ec0d48e6a0af3546c4faab451","tarball":"https://registry.npmjs.org/stripe-replit-sync/-/stripe-replit-sync-0.0.5.tgz","fileCount":55,"integrity":"sha512-AXEpozkSaKYw3ArcP1fBDcAI+HV8un74o6sazLHhkQUuK7iSRwM5e1AZWfhQIWZlBtC18TPx89uUSB6N8MDq1Q==","signatures":[{"sig":"MEYCIQCOZsRY6bZd85/k7kgU1oi+GrI//9LcKaxQIiMBYD8+4QIhAKli/CmYc5b2uuuSYrH8iEaZDmYRSj1mLS/WlSgILKm4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":505012},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"gitHead":"010fe5d4616132d732a99981e4b13637bafe8095","private":false,"scripts":{"lint":"eslint src --ext .ts","build":"tsup src/index.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean"},"_npmUser":{"name":"depombo","email":"f@backmesh.com"},"repository":{"url":"git+https://github.com/tx-stripe/stripe-sync-engine.git","type":"git"},"_npmVersion":"10.9.2","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"22.14.0","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","yesql":"^7.0.0","pg-node-migrations":"0.0.8"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@vitest/ui":"^4.0.9","@types/node":"^24.10.1","@types/yesql":"^4.1.4"},"peerDependencies":{"stripe":"> 11"},"_npmOperationalInternal":{"tmp":"tmp/stripe-replit-sync_0.0.5_1763428484398_0.05146233286494484","host":"s3://npm-registry-packages-npm-production"}},"0.0.6":{"name":"stripe-replit-sync","version":"0.0.6","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"Supabase","email":"https://supabase.com/"},"_id":"stripe-replit-sync@0.0.6","maintainers":[{"name":"tonyxiao","email":"tonyx.ca@gmail.com"},{"name":"depombo","email":"f@backmesh.com"}],"homepage":"https://github.com/tx-stripe/stripe-sync-engine#readme","bugs":{"url":"https://github.com/tx-stripe/stripe-sync-engine/issues"},"dist":{"shasum":"efecba22ecfdd7c4bea468dfb544ba97f1285307","tarball":"https://registry.npmjs.org/stripe-replit-sync/-/stripe-replit-sync-0.0.6.tgz","fileCount":55,"integrity":"sha512-PFKpEiCTPFrjwyiKuy+pJb5nHqYENx6/CHK+g+Ap5w9JvVXUVa9iCOGTE4r143WWE1oco2DCITiRqpTXJH0EGA==","signatures":[{"sig":"MEYCIQDHkwRwknE1v7VZk9+a4p0ZmsacTZaPLaXEGbeVtFwshQIhAJd4T57pcou9TutZj2Ihpihr9VBAAoDmH2QVLLwhVI6N","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":503663},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"gitHead":"b42f7eeaf86f5cecf2f768fd768ea58245348fff","private":false,"scripts":{"lint":"eslint src --ext .ts","build":"tsup src/index.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean"},"_npmUser":{"name":"depombo","email":"f@backmesh.com"},"repository":{"url":"git+https://github.com/tx-stripe/stripe-sync-engine.git","type":"git"},"_npmVersion":"10.9.2","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"22.14.0","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","yesql":"^7.0.0","pg-node-migrations":"0.0.8"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@vitest/ui":"^4.0.9","@types/node":"^24.10.1","@types/yesql":"^4.1.4"},"peerDependencies":{"stripe":"> 11"},"_npmOperationalInternal":{"tmp":"tmp/stripe-replit-sync_0.0.6_1763446880549_0.5942583046643914","host":"s3://npm-registry-packages-npm-production"}},"0.0.7":{"name":"stripe-replit-sync","version":"0.0.7","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"Supabase","email":"https://supabase.com/"},"_id":"stripe-replit-sync@0.0.7","maintainers":[{"name":"tonyxiao","email":"tonyx.ca@gmail.com"},{"name":"depombo","email":"f@backmesh.com"}],"homepage":"https://github.com/tx-stripe/stripe-sync-engine#readme","bugs":{"url":"https://github.com/tx-stripe/stripe-sync-engine/issues"},"dist":{"shasum":"560a43903cc3ced88e36a0233bb5ce07617c4e9d","tarball":"https://registry.npmjs.org/stripe-replit-sync/-/stripe-replit-sync-0.0.7.tgz","fileCount":55,"integrity":"sha512-TAXdRc9x+mq+EFmzF7XLJQJWn5IK6yc7TlSSJ9DjbTKEaP+NN4m6nd4CUQ3cUrPWXSo5NJrBVhu3/R6AaZ7Mog==","signatures":[{"sig":"MEQCIGaL3Ueb3/1FxMy0H7ENcfhqlnqkve1EN52Kw7f66VVlAiA5MZjbNEnMIvWxHAvRRRvCJBi9QJYBY9P5txJjKognMw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":503272},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"gitHead":"b42f7eeaf86f5cecf2f768fd768ea58245348fff","private":false,"scripts":{"lint":"eslint src --ext .ts","build":"tsup src/index.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean"},"_npmUser":{"name":"depombo","email":"f@backmesh.com"},"repository":{"url":"git+https://github.com/tx-stripe/stripe-sync-engine.git","type":"git"},"_npmVersion":"10.9.2","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"22.14.0","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","yesql":"^7.0.0","pg-node-migrations":"0.0.8"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@vitest/ui":"^4.0.9","@types/node":"^24.10.1","@types/yesql":"^4.1.4"},"peerDependencies":{"stripe":"> 11"},"_npmOperationalInternal":{"tmp":"tmp/stripe-replit-sync_0.0.7_1763447098214_0.7024903178612236","host":"s3://npm-registry-packages-npm-production"}},"0.0.8":{"name":"stripe-replit-sync","version":"0.0.8","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"Supabase","email":"https://supabase.com/"},"_id":"stripe-replit-sync@0.0.8","maintainers":[{"name":"tonyxiao","email":"tonyx.ca@gmail.com"},{"name":"depombo","email":"f@backmesh.com"}],"homepage":"https://github.com/tx-stripe/stripe-sync-engine#readme","bugs":{"url":"https://github.com/tx-stripe/stripe-sync-engine/issues"},"dist":{"shasum":"9f9a6ae023699f6a08b3fbdc8812c86f6c5611a6","tarball":"https://registry.npmjs.org/stripe-replit-sync/-/stripe-replit-sync-0.0.8.tgz","fileCount":55,"integrity":"sha512-27Y5TrHLPCdqllVk2EZzSu8Atl/PvpXi72KC/XFWnOJ6iubzzWEac8NmpyWkvUx2wCE6mCeTkTl6AniSDAh8xg==","signatures":[{"sig":"MEUCIQCeqn2j+X4OOL75WOzIWGF741uO+VIrq3awHqHYHesAzwIgYZm86etOu2r3H4l2qSYhPKJhKIQIjq7IqFmaB0q0bTI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/stripe-replit-sync@0.0.8","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":505778},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"gitHead":"6c22f5cc89629fc01a285851c5d4a12f893f8f44","private":false,"scripts":{"lint":"eslint src --ext .ts","build":"tsup src/index.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:5113de53-af8b-4b01-8527-16e4bcb982a9"}},"repository":{"url":"git+https://github.com/tx-stripe/stripe-sync-engine.git","type":"git"},"_npmVersion":"11.6.2","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"24.11.1","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","yesql":"^7.0.0","pg-node-migrations":"0.0.8"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@vitest/ui":"^4.0.9","@types/node":"^24.10.1","@types/yesql":"^4.1.4"},"peerDependencies":{"stripe":"> 11"},"_npmOperationalInternal":{"tmp":"tmp/stripe-replit-sync_0.0.8_1763523861889_0.4882952864355792","host":"s3://npm-registry-packages-npm-production"}},"0.0.9":{"name":"stripe-replit-sync","version":"0.0.9","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"Supabase","email":"https://supabase.com/"},"_id":"stripe-replit-sync@0.0.9","maintainers":[{"name":"tonyxiao","email":"tonyx.ca@gmail.com"},{"name":"depombo","email":"f@backmesh.com"}],"homepage":"https://github.com/tx-stripe/stripe-sync-engine#readme","bugs":{"url":"https://github.com/tx-stripe/stripe-sync-engine/issues"},"dist":{"shasum":"a04a94b28343fbc729792aad2e3558738e5d0c41","tarball":"https://registry.npmjs.org/stripe-replit-sync/-/stripe-replit-sync-0.0.9.tgz","fileCount":56,"integrity":"sha512-c6Re6qzFRcwgTldVXd7+ej/uFt+F5ift3ESssaaDRy4xTg2Ck0asYz/BuqPQ9BX8II2JliE/t28hn/Y0gfxtZQ==","signatures":[{"sig":"MEUCIQDJKAelEqEhRPARdFVvYH2Kfc+c/PHqnFgUN2WVhQL6WQIgJZmyDjUnCxQ78ir6HOUGSs3kw+6/4hbtF8IhQtXj4V8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/stripe-replit-sync@0.0.9","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":508960},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"gitHead":"1c0224af8cb773309b748b33201c578fdbf53bd4","private":false,"scripts":{"lint":"eslint src --ext .ts","build":"tsup src/index.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:5113de53-af8b-4b01-8527-16e4bcb982a9"}},"repository":{"url":"git+https://github.com/tx-stripe/stripe-sync-engine.git","type":"git"},"_npmVersion":"11.6.3","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"24.11.1","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","yesql":"^7.0.0","pg-node-migrations":"0.0.8"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@vitest/ui":"^4.0.9","@types/node":"^24.10.1","@types/yesql":"^4.1.4"},"peerDependencies":{"stripe":"> 11"},"_npmOperationalInternal":{"tmp":"tmp/stripe-replit-sync_0.0.9_1763597141532_0.8088589306256586","host":"s3://npm-registry-packages-npm-production"}},"0.0.10":{"name":"stripe-replit-sync","version":"0.0.10","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"Supabase","email":"https://supabase.com/"},"_id":"stripe-replit-sync@0.0.10","maintainers":[{"name":"tonyxiao","email":"tonyx.ca@gmail.com"},{"name":"depombo","email":"f@backmesh.com"}],"homepage":"https://github.com/tx-stripe/stripe-sync-engine#readme","bugs":{"url":"https://github.com/tx-stripe/stripe-sync-engine/issues"},"dist":{"shasum":"1e8aa0c9f5032e6c3eb636fb9669f394ee1cb8dd","tarball":"https://registry.npmjs.org/stripe-replit-sync/-/stripe-replit-sync-0.0.10.tgz","fileCount":57,"integrity":"sha512-wZugiVECQXLzFY8wSlfrWE4PF7eYYdG4I3trlK/ZVqlGdk9hjdrAyes/X/hty/Da1RhXaaH5QWbsE0y5qRd1Zg==","signatures":[{"sig":"MEYCIQCW8okKTsSp9gqu9te/vQdzQOSWiNEbXhGqtfxSVQMV9QIhAOR+CJTFdHaD89DH6kTK087j/2iAIPgp5Tj1rMLdLBcf","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/stripe-replit-sync@0.0.10","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":524600},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"gitHead":"c8862e03d8af0e6a3753ba6f746598e627d1d2dc","private":false,"scripts":{"lint":"eslint src --ext .ts","build":"tsup src/index.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:5113de53-af8b-4b01-8527-16e4bcb982a9"}},"repository":{"url":"git+https://github.com/tx-stripe/stripe-sync-engine.git","type":"git"},"_npmVersion":"11.6.3","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"24.11.1","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","yesql":"^7.0.0","pg-node-migrations":"0.0.8"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@vitest/ui":"^4.0.9","@types/node":"^24.10.1","@types/yesql":"^4.1.4"},"peerDependencies":{"stripe":"> 11"},"_npmOperationalInternal":{"tmp":"tmp/stripe-replit-sync_0.0.10_1763673388250_0.8625653496869117","host":"s3://npm-registry-packages-npm-production"}},"0.0.11":{"name":"stripe-replit-sync","version":"0.0.11","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"Supabase","email":"https://supabase.com/"},"_id":"stripe-replit-sync@0.0.11","maintainers":[{"name":"tonyxiao","email":"tonyx.ca@gmail.com"},{"name":"depombo","email":"f@backmesh.com"}],"homepage":"https://github.com/tx-stripe/stripe-sync-engine#readme","bugs":{"url":"https://github.com/tx-stripe/stripe-sync-engine/issues"},"dist":{"shasum":"8745941645719e6ee9650980c46d940bcd44aa48","tarball":"https://registry.npmjs.org/stripe-replit-sync/-/stripe-replit-sync-0.0.11.tgz","fileCount":57,"integrity":"sha512-8aiW/ddC5wJ3DvsK2j+OMHtw+BFw1dVkrZWPC7u3WHjg1Z+tbiCOZVJDonS/LGDknhb3uja0GsZuG+p+2/t9VQ==","signatures":[{"sig":"MEQCIBc7edNggdOsLaKsugC6q7iwubo+2s7tlRzyrGdCAnQ6AiB0dheNrVHg0sxUkWU+OtOHnjFKbyOK9ObvrRIUEc620g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/stripe-replit-sync@0.0.11","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":526026},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"gitHead":"78a2ad09bdcf48cdc354a3a0e7c553b4d5132e7b","private":false,"scripts":{"lint":"eslint src --ext .ts","build":"tsup src/index.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:5113de53-af8b-4b01-8527-16e4bcb982a9"}},"repository":{"url":"git+https://github.com/tx-stripe/stripe-sync-engine.git","type":"git"},"_npmVersion":"11.6.3","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"24.11.1","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","yesql":"^7.0.0","pg-node-migrations":"0.0.8"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@vitest/ui":"^4.0.9","@types/node":"^24.10.1","@types/yesql":"^4.1.4"},"peerDependencies":{"stripe":"> 11"},"_npmOperationalInternal":{"tmp":"tmp/stripe-replit-sync_0.0.11_1763679536667_0.5710871440163301","host":"s3://npm-registry-packages-npm-production"}},"0.0.12":{"name":"stripe-replit-sync","version":"0.0.12","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"Supabase","email":"https://supabase.com/"},"_id":"stripe-replit-sync@0.0.12","maintainers":[{"name":"tonyxiao","email":"tonyx.ca@gmail.com"},{"name":"depombo","email":"f@backmesh.com"}],"homepage":"https://github.com/tx-stripe/stripe-sync-engine#readme","bugs":{"url":"https://github.com/tx-stripe/stripe-sync-engine/issues"},"dist":{"shasum":"f30e1fb98fbb8c12f3e3cef7325832440d17344b","tarball":"https://registry.npmjs.org/stripe-replit-sync/-/stripe-replit-sync-0.0.12.tgz","fileCount":57,"integrity":"sha512-zUn077vkcYnCie5VP1AfS8QlB+ZGgPp49gPC+NxH5gSHjdSLjaxJ/poBS7SYByPuZWpGo6QMoNf4kzPMMaSP7g==","signatures":[{"sig":"MEQCIHPGNdkb1ob0UTyUgBxvOMwI97Gu6za/+UnUMTTPYnEfAiBO6gs5fmjv8Kz+Owb6WVEekLytsw7az5OwMQkSiL14jg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/stripe-replit-sync@0.0.12","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":525160},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"gitHead":"fd85bf9c985733e606ac6e0af976b1452b133cfe","private":false,"scripts":{"lint":"eslint src --ext .ts","build":"tsup src/index.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:5113de53-af8b-4b01-8527-16e4bcb982a9"}},"repository":{"url":"git+https://github.com/tx-stripe/stripe-sync-engine.git","type":"git"},"_npmVersion":"11.6.3","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"24.11.1","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","yesql":"^7.0.0","pg-node-migrations":"0.0.8"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@vitest/ui":"^4.0.9","@types/node":"^24.10.1","@types/yesql":"^4.1.4"},"peerDependencies":{"stripe":"> 11"},"_npmOperationalInternal":{"tmp":"tmp/stripe-replit-sync_0.0.12_1763683116309_0.20939194833366348","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"stripe-replit-sync","version":"1.0.0","private":false,"description":"Stripe Sync Engine to sync Stripe data to Postgres","type":"module","main":"./dist/index.cjs","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"scripts":{"clean":"rimraf dist","prebuild":"npm run clean","build":"tsup src/index.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","lint":"eslint src --ext .ts"},"dependencies":{"pg":"^8.16.3","pg-node-migrations":"0.0.8","ws":"^8.18.0","yesql":"^7.0.0"},"peerDependencies":{"stripe":"> 11"},"devDependencies":{"@types/node":"^24.10.1","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@types/yesql":"^4.1.4","@vitest/ui":"^4.0.9","vitest":"^3.2.4"},"repository":{"type":"git","url":"git+https://github.com/tx-stripe/stripe-sync-engine.git"},"homepage":"https://github.com/tx-stripe/stripe-sync-engine#readme","bugs":{"url":"https://github.com/tx-stripe/stripe-sync-engine/issues"},"keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"Supabase","email":"https://supabase.com/"},"gitHead":"f93f4543aac5bf15ebf5d04b89ef8d0700f5d896","types":"./dist/index.d.ts","_id":"stripe-replit-sync@1.0.0","_nodeVersion":"24.11.1","_npmVersion":"11.6.3","dist":{"integrity":"sha512-Bkbih3k+IX/GugN8bKWNpwDiI2xkSLOAR+P34W7pjaR8fXyVay/QqztbrvbHZcU1JlfXncmBhuODY5TYY6DXlw==","shasum":"45c03c66d00152a29f4c20b36ed6a8b339859d6b","tarball":"https://registry.npmjs.org/stripe-replit-sync/-/stripe-replit-sync-1.0.0.tgz","fileCount":59,"unpackedSize":534727,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/stripe-replit-sync@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGJQq6BZm3Pv0ESkisfbqBO44PW3UMrcf6VuDL7IjNK2AiEAux1LTGwoy3tfYbLS7cexavtgPbwFpVMcDO40mzE+p9Y="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:5113de53-af8b-4b01-8527-16e4bcb982a9"}},"directories":{},"maintainers":[{"name":"tonyxiao","email":"tonyx.ca@gmail.com"},{"name":"depombo","email":"f@backmesh.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/stripe-replit-sync_1.0.0_1764013462286_0.25635829625196993"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-14T00:58:38.694Z","modified":"2025-11-24T19:44:22.854Z","0.0.0":"2025-11-14T00:58:38.987Z","0.0.1":"2025-11-14T02:06:59.472Z","0.0.2":"2025-11-14T02:15:53.732Z","0.0.3":"2025-11-15T07:24:04.740Z","0.0.4":"2025-11-17T08:36:41.706Z","0.0.5":"2025-11-18T01:14:44.587Z","0.0.6":"2025-11-18T06:21:20.724Z","0.0.7":"2025-11-18T06:24:58.423Z","0.0.8":"2025-11-19T03:44:22.074Z","0.0.9":"2025-11-20T00:05:41.749Z","0.0.10":"2025-11-20T21:16:28.479Z","0.0.11":"2025-11-20T22:58:56.933Z","0.0.12":"2025-11-20T23:58:36.501Z","1.0.0":"2025-11-24T19:44:22.483Z"},"bugs":{"url":"https://github.com/tx-stripe/stripe-sync-engine/issues"},"author":{"name":"Supabase","email":"https://supabase.com/"},"homepage":"https://github.com/tx-stripe/stripe-sync-engine#readme","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"repository":{"type":"git","url":"git+https://github.com/tx-stripe/stripe-sync-engine.git"},"description":"Stripe Sync Engine to sync Stripe data to Postgres","maintainers":[{"name":"tonyxiao","email":"tonyx.ca@gmail.com"},{"name":"depombo","email":"f@backmesh.com"}],"readme":"# Stripe Sync Engine\n\n![GitHub License](https://img.shields.io/github/license/tx-stripe/stripe-sync-engine)\n![NPM Version](https://img.shields.io/npm/v/stripe-replit-sync)\n\nA TypeScript library to synchronize Stripe data into a PostgreSQL database, designed for use in Node.js backends and serverless environments.\n\n## Features\n\n- Programmatic management of Stripe webhooks for real-time updates\n- Sync Stripe objects (customers, invoices, products, etc.) to your PostgreSQL database\n\n## Installation\n\n```sh\nnpm install stripe-replit-sync stripe\n# or\npnpm add stripe-replit-sync stripe\n# or\nyarn add stripe-replit-sync stripe\n```\n\n## Usage\n\n```ts\nimport { StripeSync } from 'stripe-replit-sync'\n\nconst sync = new StripeSync({\n  poolConfig: {\n    connectionString: 'postgres://user:pass@host:port/db',\n    max: 10, // Maximum number of connections\n  },\n  stripeSecretKey: 'sk_test_...',\n  stripeWebhookSecret: 'whsec_...',\n  // logger: <a pino logger>\n})\n\n// Example: process a Stripe webhook\nawait sync.processWebhook(payload, signature)\n```\n\n## Low-Level API (Advanced)\n\nFor more control, you can use the `StripeSync` class directly:\n\n```ts\nimport { StripeSync } from 'stripe-experiment-sync'\n\nconst sync = new StripeSync({\n  poolConfig: {\n    connectionString: 'postgres://user:pass@host:port/db',\n    max: 10, // Maximum number of connections\n  },\n  stripeSecretKey: 'sk_test_...',\n  stripeWebhookSecret: 'whsec_...',\n  // logger: <a pino logger>\n})\n\n// Example: process a Stripe webhook\nawait sync.processWebhook(payload, signature)\n```\n\n### Processing Webhooks\n\nThe `processWebhook` method validates and processes Stripe webhook events:\n\n```typescript\n// Process a webhook event with signature validation\nawait sync.processWebhook(payload, signature)\n\n// Or process an event directly (no signature validation):\nawait sync.processEvent(event)\n```\n\n### Managed Webhook Endpoints\n\nThe library provides methods to create and manage webhook endpoints:\n\n```typescript\n// Create or reuse an existing webhook endpoint for a URL\nconst webhook = await sync.findOrCreateManagedWebhook('https://example.com/stripe-webhooks', {\n  enabled_events: ['*'], // or specific events like ['customer.created', 'invoice.paid']\n  description: 'My app webhook',\n})\n\n// Create a new webhook endpoint (always creates new)\nconst webhook = await sync.createManagedWebhook('https://example.com/stripe-webhooks', {\n  enabled_events: ['customer.created', 'customer.updated'],\n})\n\n// Get a managed webhook by ID\nconst webhook = await sync.getManagedWebhook('we_xxx')\n\n// Delete a managed webhook\nawait sync.deleteManagedWebhook('we_xxx')\n```\n\n**Note:** The library automatically manages webhook endpoints for you. When you call `findOrCreateManagedWebhook()` with a URL, it will reuse an existing webhook if one is found in the database, or create a new one if needed. Old or orphaned webhooks from this package are automatically cleaned up.\n\n**Race Condition Protection:** The library uses PostgreSQL advisory locks to prevent race conditions when multiple instances call `findOrCreateManagedWebhook()` concurrently for the same URL. A unique constraint on `(url, account_id)` provides an additional safety net at the database level.\n\n## Configuration\n\n| Option                          | Type    | Description                                                                                                                                                                                                                                                                                              |\n| ------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `databaseUrl`                   | string  | **Deprecated:** Use `poolConfig` with a connection string instead.                                                                                                                                                                                                                                       |\n| `stripeSecretKey`               | string  | Stripe secret key                                                                                                                                                                                                                                                                                        |\n| `stripeWebhookSecret`           | string  | Stripe webhook signing secret                                                                                                                                                                                                                                                                            |\n| `stripeApiVersion`              | string  | Stripe API version (default: `2020-08-27`)                                                                                                                                                                                                                                                               |\n| `autoExpandLists`               | boolean | Fetch all list items from Stripe (not just the default 10)                                                                                                                                                                                                                                               |\n| `backfillRelatedEntities`       | boolean | Ensure related entities are present for foreign key integrity                                                                                                                                                                                                                                            |\n| `revalidateObjectsViaStripeApi` | Array   | Always fetch latest entity from Stripe instead of trusting webhook payload, possible values: charge, credit_note, customer, dispute, invoice, payment_intent, payment_method, plan, price, product, refund, review, radar.early_fraud_warning, setup_intent, subscription, subscription_schedule, tax_id |\n| `poolConfig`                    | object  | Configuration for PostgreSQL connection pooling. Supports options like `connectionString`, `max`, and `keepAlive`. For more details, refer to the [Node-Postgres Pool API documentation](https://node-postgres.com/apis/pool).                                                                           |\n| `maxPostgresConnections`        | number  | **Deprecated:** Use `poolConfig.max` instead to configure the maximum number of PostgreSQL connections.                                                                                                                                                                                                  |\n| `logger`                        | Logger  | Logger instance (pino)                                                                                                                                                                                                                                                                                   |\n\n## Database Schema\n\nThe library will create and manage a `stripe` schema in your PostgreSQL database, with tables for all supported Stripe objects (products, customers, invoices, etc.).\n\n> **Important:** The library uses a fixed schema name of `stripe`. This cannot be configured as the SQL migrations hardcode this schema name.\n\n> **Note:** Fields and tables prefixed with an underscore (`_`) are reserved for internal metadata managed by the sync engine and should not be modified directly. These include fields like `_account`, `_cursor`, `_synced_at`, and tables like `_migrations`, `_accounts`, and `_sync_status`.\n\n### Migrations\n\nMigrations are included in the `db/migrations` directory. You can run them using the provided `runMigrations` function:\n\n```ts\nimport { runMigrations } from 'stripe-replit-sync'\n\nawait runMigrations({ databaseUrl: 'postgres://...' })\n```\n\n## Account Management\n\n### Getting Current Account\n\nRetrieve the currently authenticated Stripe account:\n\n```ts\nconst account = await sync.getCurrentAccount()\nconsole.log(account.id) // e.g., \"acct_xxx\"\n```\n\n### Listing Synced Accounts\n\nGet all Stripe accounts that have been synced to the database:\n\n```ts\nconst accounts = await sync.getAllSyncedAccounts()\n// Returns array of Stripe account objects from database\n```\n\n### Deleting Synced Account Data\n\n**⚠️ DANGEROUS:** Delete all synced data for a specific Stripe account from the database. This operation cannot be undone!\n\n```ts\n// Preview what will be deleted (dry-run mode)\nconst preview = await sync.dangerouslyDeleteSyncedAccountData('acct_xxx', {\n  dryRun: true,\n  useTransaction: true,\n})\nconsole.log(preview.deletedRecordCounts) // Shows count per table\n\n// Actually delete the data\nconst result = await sync.dangerouslyDeleteSyncedAccountData('acct_xxx', {\n  dryRun: false, // default\n  useTransaction: true, // default - wraps deletion in transaction\n})\n```\n\nOptions:\n\n- `dryRun` (default: `false`): If true, only counts records without deleting\n- `useTransaction` (default: `true`): If true, wraps all deletions in a database transaction for atomicity\n\nThe method returns:\n\n- `deletedAccountId`: The account ID that was deleted\n- `deletedRecordCounts`: Object mapping table names to number of records deleted\n- `warnings`: Array of warning messages (e.g., if you're deleting your cached account)\n\n## Backfilling and Syncing Data\n\n### Syncing a Single Entity\n\nYou can sync or update a single Stripe entity by its ID using the `syncSingleEntity` method:\n\n```ts\nawait sync.syncSingleEntity('cus_12345')\n```\n\nThe entity type is detected automatically based on the Stripe ID prefix (e.g., `cus_` for customer, `prod_` for product). `ent_` is not supported at the moment.\n\n### Backfilling Data\n\nTo backfill Stripe data (e.g., all products created after a certain date), use the `syncBackfill` method:\n\n```ts\nawait sync.syncBackfill({\n  object: 'product',\n  created: { gte: 1643872333 }, // Unix timestamp\n})\n```\n\n- `object` can be one of: `all`, `charge`, `customer`, `dispute`, `invoice`, `payment_method`, `payment_intent`, `plan`, `price`, `product`, `setup_intent`, `subscription`.\n- `created` is a Stripe RangeQueryParam and supports `gt`, `gte`, `lt`, `lte`.\n\nThe sync engine automatically tracks per-account cursors in the `_sync_status` table. When you call sync methods without an explicit `created` filter, they will automatically resume from the last synced position for that account and resource. This enables incremental syncing that can resume after interruptions.\n\n> **Note:**\n> For large Stripe accounts (more than 10,000 objects), it is recommended to write a script that loops through each day and sets the `created` date filters to the start and end of day. This avoids timeouts and memory issues when syncing large datasets.\n","readmeFilename":"README.md"}