{"_id":"@paymentsdb/sync-engine","_rev":"17-492822c8a04c92a4cbfa0073b10e7131","name":"@paymentsdb/sync-engine","dist-tags":{"latest":"0.0.17"},"versions":{"0.0.1":{"name":"@paymentsdb/sync-engine","version":"0.0.1","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"PaymentsDB","email":"https://paymentsdb.com/"},"license":"Apache-2.0","_id":"@paymentsdb/sync-engine@0.0.1","maintainers":[{"name":"ramonpretzel","email":"ramon@withpretzel.com"}],"homepage":"https://github.com/stripe-experiments/sync-engine#readme","bugs":{"url":"https://github.com/stripe-experiments/sync-engine/issues"},"bin":{"sync-engine":"dist/cli/index.js"},"dist":{"shasum":"7bc503373f7ef1835a63b59f07c83cf028ef82d6","tarball":"https://registry.npmjs.org/@paymentsdb/sync-engine/-/sync-engine-0.0.1.tgz","fileCount":85,"integrity":"sha512-hbg5snCSZZDL3YSqX195iUhwNCnngeYFY2Lw9mbsVk1WfhmbmzTkC6m4IK2DgUaRvyoszVoc7KAJ8qcNC+oPGQ==","signatures":[{"sig":"MEUCIH14aT0kwnGjHru2upF5iuplLGi4qoKBgXQYsh7IbKgJAiEAyxDAeB1dRHGIh2fI4uiQLr6y7xO4UQaL04vYmBmSrWg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1287774},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./cli":{"types":"./dist/cli/lib.d.ts","import":"./dist/cli/lib.js","require":"./dist/cli/lib.cjs"},"./supabase":{"types":"./dist/supabase/index.d.ts","import":"./dist/supabase/index.js","require":"./dist/supabase/index.cjs"}},"gitHead":"bc37adf0ad1bac05135f2d2bd83b247e8d874fa4","private":false,"scripts":{"lint":"eslint src --ext .ts","test":"vitest","build":"tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean"},"_npmUser":{"name":"ramonpretzel","email":"ramon@withpretzel.com"},"repository":{"url":"git+https://github.com/stripe-experiments/sync-engine.git","type":"git"},"_npmVersion":"10.9.0","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"23.1.0","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","chalk":"^5.3.0","yesql":"^7.0.0","dotenv":"^16.4.7","stripe":"^17.7.0","express":"^4.18.2","inquirer":"^12.3.0","commander":"^12.1.0","papaparse":"5.4.1","@ngrok/ngrok":"^1.4.1","pg-node-migrations":"0.0.8","supabase-management-js":"^0.1.6"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","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","@types/express":"^4.17.21","@types/inquirer":"^9.0.7","@types/papaparse":"5.3.16"},"_npmOperationalInternal":{"tmp":"tmp/sync-engine_0.0.1_1770046829950_0.6888838109201065","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@paymentsdb/sync-engine","version":"0.0.2","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"PaymentsDB","email":"https://paymentsdb.com/"},"license":"Apache-2.0","_id":"@paymentsdb/sync-engine@0.0.2","maintainers":[{"name":"ramonpretzel","email":"ramon@withpretzel.com"}],"homepage":"https://github.com/stripe-experiments/sync-engine#readme","bugs":{"url":"https://github.com/stripe-experiments/sync-engine/issues"},"bin":{"sync-engine":"dist/cli/index.js"},"dist":{"shasum":"bcaec807cbbc3a72673f9b403d1b0b1d56d7e705","tarball":"https://registry.npmjs.org/@paymentsdb/sync-engine/-/sync-engine-0.0.2.tgz","fileCount":85,"integrity":"sha512-X6yluvKwqQ86felY5mZ/Wsje4uEndhhVHMQcupCePI/eyyFTW0E4RqSAd332u/8BCsFivtTGmRQfwS6EgA5www==","signatures":[{"sig":"MEUCIBMZ+jmWlgfLuFoMEO0eOksuBIoUTbZ3k3t3E7MWQtfoAiEA1jcSNReG5bKaq+mjpSSrdsQS00P76iT++cz+O8i0L3E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1288035},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./cli":{"types":"./dist/cli/lib.d.ts","import":"./dist/cli/lib.js","require":"./dist/cli/lib.cjs"},"./supabase":{"types":"./dist/supabase/index.d.ts","import":"./dist/supabase/index.js","require":"./dist/supabase/index.cjs"}},"gitHead":"3ec29fc04f16ae8aca99dea3c6b1a22acce04f80","private":false,"scripts":{"lint":"eslint src --ext .ts","test":"vitest","build":"tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean"},"_npmUser":{"name":"ramonpretzel","email":"ramon@withpretzel.com"},"repository":{"url":"git+https://github.com/stripe-experiments/sync-engine.git","type":"git"},"_npmVersion":"10.9.0","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"23.1.0","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","chalk":"^5.3.0","yesql":"^7.0.0","dotenv":"^16.4.7","stripe":"^17.7.0","express":"^4.18.2","inquirer":"^12.3.0","commander":"^12.1.0","papaparse":"5.4.1","@ngrok/ngrok":"^1.4.1","pg-node-migrations":"0.0.8","supabase-management-js":"^0.1.6"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","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","@types/express":"^4.17.21","@types/inquirer":"^9.0.7","@types/papaparse":"5.3.16"},"_npmOperationalInternal":{"tmp":"tmp/sync-engine_0.0.2_1770050538552_0.8259889184071352","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@paymentsdb/sync-engine","version":"0.0.3","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"PaymentsDB","email":"https://paymentsdb.com/"},"license":"Apache-2.0","_id":"@paymentsdb/sync-engine@0.0.3","maintainers":[{"name":"ramonpretzel","email":"ramon@withpretzel.com"}],"homepage":"https://github.com/stripe-experiments/sync-engine#readme","bugs":{"url":"https://github.com/stripe-experiments/sync-engine/issues"},"bin":{"sync-engine":"dist/cli/index.js"},"dist":{"shasum":"8dd65ee440c88a1048ccbf6c1f55824712b47ce6","tarball":"https://registry.npmjs.org/@paymentsdb/sync-engine/-/sync-engine-0.0.3.tgz","fileCount":85,"integrity":"sha512-7D4T4s8pBwVLPGn4es3C9x2RwKQB/bRxReX0o1fmgAlif4zDWbKsjJFhxfToq/rK14oBuPTGeEDDv09q5Zw/pg==","signatures":[{"sig":"MEMCIFXQ44d1s6QRe/5RqDMmHQGbhUE5C+4lQrMufWTQ3bOhAh9kXEViVElwUzsBQWFNsPmJ95iZFPciHCiV0Zuim+J+","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1288185},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./cli":{"types":"./dist/cli/lib.d.ts","import":"./dist/cli/lib.js","require":"./dist/cli/lib.cjs"},"./supabase":{"types":"./dist/supabase/index.d.ts","import":"./dist/supabase/index.js","require":"./dist/supabase/index.cjs"}},"gitHead":"3ec29fc04f16ae8aca99dea3c6b1a22acce04f80","private":false,"scripts":{"lint":"eslint src --ext .ts","test":"vitest","build":"tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean"},"_npmUser":{"name":"ramonpretzel","email":"ramon@withpretzel.com"},"repository":{"url":"git+https://github.com/stripe-experiments/sync-engine.git","type":"git"},"_npmVersion":"10.9.0","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"23.1.0","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","chalk":"^5.3.0","yesql":"^7.0.0","dotenv":"^16.4.7","stripe":"^17.7.0","express":"^4.18.2","inquirer":"^12.3.0","commander":"^12.1.0","papaparse":"5.4.1","@ngrok/ngrok":"^1.4.1","pg-node-migrations":"0.0.8","supabase-management-js":"^0.1.6"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","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","@types/express":"^4.17.21","@types/inquirer":"^9.0.7","@types/papaparse":"5.3.16"},"_npmOperationalInternal":{"tmp":"tmp/sync-engine_0.0.3_1770051736765_0.42901732548769744","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@paymentsdb/sync-engine","version":"0.0.4","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"PaymentsDB","email":"https://paymentsdb.com/"},"license":"Apache-2.0","_id":"@paymentsdb/sync-engine@0.0.4","maintainers":[{"name":"ramonpretzel","email":"ramon@withpretzel.com"}],"homepage":"https://github.com/stripe-experiments/sync-engine#readme","bugs":{"url":"https://github.com/stripe-experiments/sync-engine/issues"},"bin":{"sync-engine":"dist/cli/index.js"},"dist":{"shasum":"2cb2acb0e801b6ea627e0ee83d67f68fccb293fb","tarball":"https://registry.npmjs.org/@paymentsdb/sync-engine/-/sync-engine-0.0.4.tgz","fileCount":85,"integrity":"sha512-byedtJjSCbhRBavBFcx3ST/7ej+HTn9yaKBHRA4G057OgngRP9aHdU5DbZf22ObuStbYYjpiZrQ6s0NKplRaoA==","signatures":[{"sig":"MEUCIQCjglaB98D77T6CzCX4sbupb3idMIyRGK0Wwn25TK86DwIgcT0vdDWPadmYxBXkunEQYkOJkrUWsJOyjw53kN9zftw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1291946},"main":"./dist/index.cjs","type":"module","_from":"file:paymentsdb-sync-engine-0.0.4.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./cli":{"types":"./dist/cli/lib.d.ts","import":"./dist/cli/lib.js","require":"./dist/cli/lib.cjs"},"./supabase":{"types":"./dist/supabase/index.d.ts","import":"./dist/supabase/index.js","require":"./dist/supabase/index.cjs"}},"private":false,"scripts":{"lint":"eslint src --ext .ts","test":"vitest","build":"tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean"},"_npmUser":{"name":"ramonpretzel","email":"ramon@withpretzel.com"},"_resolved":"/private/var/folders/ys/mprbfspj4kqc7cpycxc0mpww0000gn/T/b8b5f716e021346942298e699901f04f/paymentsdb-sync-engine-0.0.4.tgz","_integrity":"sha512-byedtJjSCbhRBavBFcx3ST/7ej+HTn9yaKBHRA4G057OgngRP9aHdU5DbZf22ObuStbYYjpiZrQ6s0NKplRaoA==","repository":{"url":"git+https://github.com/stripe-experiments/sync-engine.git","type":"git"},"_npmVersion":"11.1.0","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"22.13.1","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","chalk":"^5.3.0","yesql":"^7.0.0","dotenv":"^16.4.7","stripe":"^17.7.0","express":"^4.18.2","inquirer":"^12.3.0","commander":"^12.1.0","papaparse":"5.4.1","@ngrok/ngrok":"^1.4.1","pg-node-migrations":"0.0.8","supabase-management-js":"^0.1.6"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","tsup":"^8.5.0","rimraf":"^6.0.1","vitest":"^3.2.4","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@vitest/ui":"^4.0.9","typescript":"^5.9.2","@types/node":"^24.10.1","@types/yesql":"^4.1.4","@types/express":"^4.17.21","@types/inquirer":"^9.0.7","@types/papaparse":"5.3.16"},"_npmOperationalInternal":{"tmp":"tmp/sync-engine_0.0.4_1770113971450_0.7882165193246633","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@paymentsdb/sync-engine","version":"0.0.5","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"PaymentsDB","email":"https://paymentsdb.com/"},"license":"Apache-2.0","_id":"@paymentsdb/sync-engine@0.0.5","maintainers":[{"name":"ramonpretzel","email":"ramon@withpretzel.com"}],"homepage":"https://github.com/stripe-experiments/sync-engine#readme","bugs":{"url":"https://github.com/stripe-experiments/sync-engine/issues"},"bin":{"sync-engine":"dist/cli/index.js"},"dist":{"shasum":"a295916300196bf644380db7941905bd6fecd238","tarball":"https://registry.npmjs.org/@paymentsdb/sync-engine/-/sync-engine-0.0.5.tgz","fileCount":87,"integrity":"sha512-XujTeasNbLS+fSSnBpj6Kls1PDt3Bn4+hDAZqKYttFpJrtjCU0p5q1XA7pJbwABdIrpUQ95esshrFIMxCQ0QMQ==","signatures":[{"sig":"MEQCIEYtKODH3HURBfGhYe2XxOYyHbsbZuQWNeEebH9HkzIRAiAqqkOh2+LMEY1MfE9UIpR93JbOCPxiW7t10kI46HSPqQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5275810},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./cli":{"types":"./dist/cli/lib.d.ts","import":"./dist/cli/lib.js","require":"./dist/cli/lib.cjs"},"./supabase":{"types":"./dist/supabase/index.d.ts","import":"./dist/supabase/index.js","require":"./dist/supabase/index.cjs"}},"gitHead":"88f9efbb9d7fc909bd2866481dd4fff59a5dd24d","private":false,"scripts":{"lint":"eslint src --ext .ts","test":"vitest","build":"tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean","test:integration":"TEST_POSTGRES_DB_URL=postgresql://postgres:postgres@localhost:55432/postgres vitest run src/stripeSync*integration.test.ts","generate:sigma-schema":"tsx src/sigma/schema/fetch-schema.ts"},"_npmUser":{"name":"ramonpretzel","email":"ramon@withpretzel.com"},"repository":{"url":"git+https://github.com/stripe-experiments/sync-engine.git","type":"git"},"_npmVersion":"11.1.0","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"22.13.1","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","chalk":"^5.3.0","yesql":"^7.0.0","dotenv":"^16.4.7","stripe":"^17.7.0","express":"^4.18.2","inquirer":"^12.3.0","commander":"^12.1.0","papaparse":"5.4.1","@ngrok/ngrok":"^1.4.1","pg-node-migrations":"0.0.8","supabase-management-js":"^0.1.6"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.21.0","devDependencies":{"tsx":"^4.21.0","tsup":"^8.5.0","rimraf":"^6.0.1","vitest":"^3.2.4","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@vitest/ui":"^4.0.9","typescript":"^5.9.2","@types/node":"^24.10.1","@types/yesql":"^4.1.4","@types/express":"^4.17.21","@types/inquirer":"^9.0.7","@types/papaparse":"5.3.16"},"_npmOperationalInternal":{"tmp":"tmp/sync-engine_0.0.5_1770234651562_0.5056185669363078","host":"s3://npm-registry-packages-npm-production"}},"0.0.6":{"name":"@paymentsdb/sync-engine","version":"0.0.6","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"PaymentsDB","email":"https://paymentsdb.com/"},"license":"Apache-2.0","_id":"@paymentsdb/sync-engine@0.0.6","maintainers":[{"name":"ramonpretzel","email":"ramon@withpretzel.com"}],"homepage":"https://github.com/stripe-experiments/sync-engine#readme","bugs":{"url":"https://github.com/stripe-experiments/sync-engine/issues"},"bin":{"sync-engine":"dist/cli/index.js"},"dist":{"shasum":"4a5ce6f94cb48009dee52ea6b35322282655bdff","tarball":"https://registry.npmjs.org/@paymentsdb/sync-engine/-/sync-engine-0.0.6.tgz","fileCount":87,"integrity":"sha512-bZJcbb2e1aM6XdQxdbPMokXNKBUI+irZr1DQviz4qixHHpDpI/IPx8E8NTbXAfLpK6Mnp+WnN/7tjPEB4tBYAg==","signatures":[{"sig":"MEUCIQDyADyXl5VLQqiP3lfdu8dtmVWY+4xV75GPLRKRA0AMkwIgcavB8+AboABPQMUcAuq46/P0kR9CQecJdY79T/HcQp8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5347696},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./cli":{"types":"./dist/cli/lib.d.ts","import":"./dist/cli/lib.js","require":"./dist/cli/lib.cjs"},"./supabase":{"types":"./dist/supabase/index.d.ts","import":"./dist/supabase/index.js","require":"./dist/supabase/index.cjs"}},"gitHead":"7b868571b0de37aa007fac9a0352ee762e23e444","private":false,"scripts":{"lint":"eslint src --ext .ts","test":"vitest","build":"tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean","test:integration":"TEST_POSTGRES_DB_URL=postgresql://postgres:postgres@localhost:55432/postgres vitest run src/stripeSync*integration.test.ts","generate:sigma-schema":"tsx src/sigma/schema/fetch-schema.ts"},"_npmUser":{"name":"ramonpretzel","email":"ramon@withpretzel.com"},"repository":{"url":"git+https://github.com/stripe-experiments/sync-engine.git","type":"git"},"_npmVersion":"11.1.0","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"22.13.1","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","chalk":"^5.3.0","yesql":"^7.0.0","dotenv":"^16.4.7","stripe":"^17.7.0","express":"^4.18.2","inquirer":"^12.3.0","commander":"^12.1.0","papaparse":"5.4.1","@ngrok/ngrok":"^1.4.1","pg-node-migrations":"0.0.8","supabase-management-js":"^0.1.6"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.21.0","devDependencies":{"tsx":"^4.21.0","tsup":"^8.5.0","rimraf":"^6.0.1","vitest":"^3.2.4","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@vitest/ui":"^4.0.9","typescript":"^5.9.2","@types/node":"^24.10.1","@types/yesql":"^4.1.4","@types/express":"^4.17.21","@types/inquirer":"^9.0.7","@types/papaparse":"5.3.16"},"_npmOperationalInternal":{"tmp":"tmp/sync-engine_0.0.6_1770662715684_0.7523734597944793","host":"s3://npm-registry-packages-npm-production"}},"0.0.7":{"name":"@paymentsdb/sync-engine","version":"0.0.7","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"PaymentsDB","email":"https://paymentsdb.com/"},"license":"Apache-2.0","_id":"@paymentsdb/sync-engine@0.0.7","maintainers":[{"name":"ramonpretzel","email":"ramon@withpretzel.com"}],"homepage":"https://github.com/stripe-experiments/sync-engine#readme","bugs":{"url":"https://github.com/stripe-experiments/sync-engine/issues"},"bin":{"sync-engine":"dist/cli/index.js"},"dist":{"shasum":"33dc566bf6d958b45631bd1b02a8370d03911595","tarball":"https://registry.npmjs.org/@paymentsdb/sync-engine/-/sync-engine-0.0.7.tgz","fileCount":87,"integrity":"sha512-VaFc6vK0epAKZxFwUZDWlIvwL/BJnCkW5LbTGRq5LTUlUx+fKyxD16Kus7mwdfleneFGlrRZytB2ia+XYT6uxg==","signatures":[{"sig":"MEYCIQCMmltYvR1p7rYpgVpCEYYQ9Mw0DB/O5aif0CkZtyVYYwIhAItq7HDXq7xdvpR4tRikvq63wRvIdUlaPOtXpcpIYzNY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5348939},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./cli":{"types":"./dist/cli/lib.d.ts","import":"./dist/cli/lib.js","require":"./dist/cli/lib.cjs"},"./supabase":{"types":"./dist/supabase/index.d.ts","import":"./dist/supabase/index.js","require":"./dist/supabase/index.cjs"}},"gitHead":"91bcd4823e508e9f18e6824a6a8da995a4d07b95","private":false,"scripts":{"lint":"eslint src --ext .ts","test":"vitest","build":"tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean","test:integration":"TEST_POSTGRES_DB_URL=postgresql://postgres:postgres@localhost:55432/postgres vitest run src/stripeSync*integration.test.ts","generate:sigma-schema":"tsx src/sigma/schema/fetch-schema.ts"},"_npmUser":{"name":"ramonpretzel","email":"ramon@withpretzel.com"},"repository":{"url":"git+https://github.com/stripe-experiments/sync-engine.git","type":"git"},"_npmVersion":"11.1.0","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"22.13.1","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","chalk":"^5.3.0","yesql":"^7.0.0","dotenv":"^16.4.7","stripe":"^17.7.0","express":"^4.18.2","inquirer":"^12.3.0","commander":"^12.1.0","papaparse":"5.4.1","@ngrok/ngrok":"^1.4.1","pg-node-migrations":"0.0.8","supabase-management-js":"^0.1.6"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.21.0","devDependencies":{"tsx":"^4.21.0","tsup":"^8.5.0","rimraf":"^6.0.1","vitest":"^3.2.4","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@vitest/ui":"^4.0.9","typescript":"^5.9.2","@types/node":"^24.10.1","@types/yesql":"^4.1.4","@types/express":"^4.17.21","@types/inquirer":"^9.0.7","@types/papaparse":"5.3.16"},"_npmOperationalInternal":{"tmp":"tmp/sync-engine_0.0.7_1770707841987_0.7268889678748538","host":"s3://npm-registry-packages-npm-production"}},"0.0.8":{"name":"@paymentsdb/sync-engine","version":"0.0.8","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"PaymentsDB","email":"https://paymentsdb.com/"},"license":"Apache-2.0","_id":"@paymentsdb/sync-engine@0.0.8","maintainers":[{"name":"ramonpretzel","email":"ramon@withpretzel.com"}],"homepage":"https://github.com/stripe-experiments/sync-engine#readme","bugs":{"url":"https://github.com/stripe-experiments/sync-engine/issues"},"bin":{"sync-engine":"dist/cli/index.js"},"dist":{"shasum":"735ecd1120d8f37851680104e8d2975c1f3c6ddb","tarball":"https://registry.npmjs.org/@paymentsdb/sync-engine/-/sync-engine-0.0.8.tgz","fileCount":87,"integrity":"sha512-pHgVSx2waK4nhzTrDZUSHZIy/VdIlwn5IBms4rm7ERFt7qlzBUY19xw6LC3phlGqcV7KuJzrCUnnNkkL6xmQyA==","signatures":[{"sig":"MEUCIFxtJa2gaygOBKTIPmYrsrjT7r6PhG3jdyhE1nDG4+3+AiEA+7EXKEu8iWEm87sgCQJy31XRtlVq8wSmq7o9TjYOgJo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5349028},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./cli":{"types":"./dist/cli/lib.d.ts","import":"./dist/cli/lib.js","require":"./dist/cli/lib.cjs"},"./supabase":{"types":"./dist/supabase/index.d.ts","import":"./dist/supabase/index.js","require":"./dist/supabase/index.cjs"}},"gitHead":"00af939570409552e2383803bf51c281a2bc2ca0","private":false,"scripts":{"lint":"eslint src --ext .ts","test":"vitest","build":"tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean","test:integration":"TEST_POSTGRES_DB_URL=postgresql://postgres:postgres@localhost:55432/postgres vitest run src/stripeSync*integration.test.ts","generate:sigma-schema":"tsx src/sigma/schema/fetch-schema.ts"},"_npmUser":{"name":"ramonpretzel","email":"ramon@withpretzel.com"},"repository":{"url":"git+https://github.com/stripe-experiments/sync-engine.git","type":"git"},"_npmVersion":"11.1.0","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"22.13.1","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","chalk":"^5.3.0","yesql":"^7.0.0","dotenv":"^16.4.7","stripe":"^17.7.0","express":"^4.18.2","inquirer":"^12.3.0","commander":"^12.1.0","papaparse":"5.4.1","@ngrok/ngrok":"^1.4.1","pg-node-migrations":"0.0.8","supabase-management-js":"^0.1.6"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.21.0","devDependencies":{"tsx":"^4.21.0","tsup":"^8.5.0","rimraf":"^6.0.1","vitest":"^3.2.4","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@vitest/ui":"^4.0.9","typescript":"^5.9.2","@types/node":"^24.10.1","@types/yesql":"^4.1.4","@types/express":"^4.17.21","@types/inquirer":"^9.0.7","@types/papaparse":"5.3.16"},"_npmOperationalInternal":{"tmp":"tmp/sync-engine_0.0.8_1771419889498_0.4129801986867272","host":"s3://npm-registry-packages-npm-production"}},"0.0.9":{"name":"@paymentsdb/sync-engine","version":"0.0.9","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"PaymentsDB","email":"https://paymentsdb.com/"},"license":"Apache-2.0","_id":"@paymentsdb/sync-engine@0.0.9","maintainers":[{"name":"ramonpretzel","email":"ramon@withpretzel.com"}],"homepage":"https://github.com/stripe-experiments/sync-engine#readme","bugs":{"url":"https://github.com/stripe-experiments/sync-engine/issues"},"bin":{"sync-engine":"dist/cli/index.js"},"dist":{"shasum":"ec351a13e605b1a73f97ea733ba2166ab15afd0c","tarball":"https://registry.npmjs.org/@paymentsdb/sync-engine/-/sync-engine-0.0.9.tgz","fileCount":87,"integrity":"sha512-31sAx4b0eKDdpi2SOBMUX0X3aJJvmLdBi3Jv4SJ7rH2RXbARzfbeIuB+gUz9UgfHglJUtQB+SLvYYxyraQ5qbA==","signatures":[{"sig":"MEYCIQC0X3yEWURomvXA5tHNaYd/gRRUK5+Fe+L0sdZ6DApN/AIhAMwB1DenE8AMXsfV5rQ8d3PKg2DNxuuUZ2X0jN4L8YmC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5365364},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./cli":{"types":"./dist/cli/lib.d.ts","import":"./dist/cli/lib.js","require":"./dist/cli/lib.cjs"},"./supabase":{"types":"./dist/supabase/index.d.ts","import":"./dist/supabase/index.js","require":"./dist/supabase/index.cjs"}},"gitHead":"4d3f2373a1050e95b864a7d53ec6015197c78917","private":false,"scripts":{"lint":"eslint src --ext .ts","test":"vitest","build":"tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean","test:integration":"TEST_POSTGRES_DB_URL=postgresql://postgres:postgres@localhost:55432/postgres vitest run src/stripeSync*integration.test.ts","generate:sigma-schema":"tsx src/sigma/schema/fetch-schema.ts"},"_npmUser":{"name":"ramonpretzel","email":"ramon@withpretzel.com"},"repository":{"url":"git+https://github.com/stripe-experiments/sync-engine.git","type":"git"},"_npmVersion":"11.1.0","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"22.13.1","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","chalk":"^5.3.0","yesql":"^7.0.0","dotenv":"^16.4.7","stripe":"^17.7.0","express":"^4.18.2","inquirer":"^12.3.0","commander":"^12.1.0","papaparse":"5.4.1","@ngrok/ngrok":"^1.4.1","pg-node-migrations":"0.0.8","supabase-management-js":"^0.1.6"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.21.0","devDependencies":{"tsx":"^4.21.0","tsup":"^8.5.0","rimraf":"^6.0.1","vitest":"^3.2.4","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@vitest/ui":"^4.0.9","typescript":"^5.9.2","@types/node":"^24.10.1","@types/yesql":"^4.1.4","@types/express":"^4.17.21","@types/inquirer":"^9.0.7","@types/papaparse":"5.3.16"},"_npmOperationalInternal":{"tmp":"tmp/sync-engine_0.0.9_1771431376926_0.36581719511829713","host":"s3://npm-registry-packages-npm-production"}},"0.0.10":{"name":"@paymentsdb/sync-engine","version":"0.0.10","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"PaymentsDB","email":"https://paymentsdb.com/"},"license":"Apache-2.0","_id":"@paymentsdb/sync-engine@0.0.10","maintainers":[{"name":"ramonpretzel","email":"ramon@withpretzel.com"}],"homepage":"https://github.com/stripe-experiments/sync-engine#readme","bugs":{"url":"https://github.com/stripe-experiments/sync-engine/issues"},"bin":{"sync-engine":"dist/cli/index.js"},"dist":{"shasum":"44916c8008ee01af01834a701b796cb115bdfacd","tarball":"https://registry.npmjs.org/@paymentsdb/sync-engine/-/sync-engine-0.0.10.tgz","fileCount":87,"integrity":"sha512-DMkvfEAxjqP8qDPWLZwTf2ZaNb23tRoYv2v0MFI7mIYUjYuXYHm5cyWLaoLiPaM+k0I/84reXtPFQ+6/Rhtjpw==","signatures":[{"sig":"MEYCIQCLJ2OgWVEFvKw7VYi/qiwxRYZ9CYeEXRoTF54zbT9ILwIhAIonBI7fvaVzbcvpc8usGRdeOlMsg3nYTK6unSIWsHqv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5368482},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./cli":{"types":"./dist/cli/lib.d.ts","import":"./dist/cli/lib.js","require":"./dist/cli/lib.cjs"},"./supabase":{"types":"./dist/supabase/index.d.ts","import":"./dist/supabase/index.js","require":"./dist/supabase/index.cjs"}},"gitHead":"eb72f1a110c4e9ec9d397a44ef598cd8f64f3404","private":false,"scripts":{"lint":"eslint src --ext .ts","test":"vitest","build":"tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean","test:integration":"TEST_POSTGRES_DB_URL=postgresql://postgres:postgres@localhost:55432/postgres vitest run src/stripeSync*integration.test.ts","generate:sigma-schema":"tsx src/sigma/schema/fetch-schema.ts"},"_npmUser":{"name":"ramonpretzel","email":"ramon@withpretzel.com"},"repository":{"url":"git+https://github.com/stripe-experiments/sync-engine.git","type":"git"},"_npmVersion":"11.1.0","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"22.13.1","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","chalk":"^5.3.0","yesql":"^7.0.0","dotenv":"^16.4.7","stripe":"^17.7.0","express":"^4.18.2","inquirer":"^12.3.0","commander":"^12.1.0","papaparse":"5.4.1","@ngrok/ngrok":"^1.4.1","pg-node-migrations":"0.0.8","supabase-management-js":"^0.1.6"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.21.0","devDependencies":{"tsx":"^4.21.0","tsup":"^8.5.0","rimraf":"^6.0.1","vitest":"^3.2.4","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@vitest/ui":"^4.0.9","typescript":"^5.9.2","@types/node":"^24.10.1","@types/yesql":"^4.1.4","@types/express":"^4.17.21","@types/inquirer":"^9.0.7","@types/papaparse":"5.3.16"},"_npmOperationalInternal":{"tmp":"tmp/sync-engine_0.0.10_1771435589150_0.8226196203961238","host":"s3://npm-registry-packages-npm-production"}},"0.0.11":{"name":"@paymentsdb/sync-engine","version":"0.0.11","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"PaymentsDB","email":"https://paymentsdb.com/"},"license":"Apache-2.0","_id":"@paymentsdb/sync-engine@0.0.11","maintainers":[{"name":"ramonpretzel","email":"ramon@withpretzel.com"}],"homepage":"https://github.com/stripe-experiments/sync-engine#readme","bugs":{"url":"https://github.com/stripe-experiments/sync-engine/issues"},"bin":{"sync-engine":"dist/cli/index.js"},"dist":{"shasum":"a990d723407be7e3d66f92ef6fb8571ff76ec026","tarball":"https://registry.npmjs.org/@paymentsdb/sync-engine/-/sync-engine-0.0.11.tgz","fileCount":88,"integrity":"sha512-+UgX/2RR82llXTMjWMUU+TuVH2guw21KOk6C0bmYtXiFjvx2JjQ9ZWHgIfjg3wOCvG4HNqExR8JtlwlDPpvR1Q==","signatures":[{"sig":"MEQCIGql/tsA5RFmQ7jOqZ0oNjPgDVwKbIZF7+KhXD0/KwJlAiBghZTjlXe+nFw1Nt1/SILtPyqhu2RMPoQmOda/CMM3Bg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5354320},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./cli":{"types":"./dist/cli/lib.d.ts","import":"./dist/cli/lib.js","require":"./dist/cli/lib.cjs"},"./supabase":{"types":"./dist/supabase/index.d.ts","import":"./dist/supabase/index.js","require":"./dist/supabase/index.cjs"}},"gitHead":"5289b37494597ef2c23054236da8b528c2e99867","private":false,"scripts":{"lint":"eslint src --ext .ts","test":"vitest","build":"tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean","test:integration":"TEST_POSTGRES_DB_URL=postgresql://postgres:postgres@localhost:55432/postgres vitest run src/stripeSync*integration.test.ts","generate:sigma-schema":"tsx src/sigma/schema/fetch-schema.ts"},"_npmUser":{"name":"ramonpretzel","email":"ramon@withpretzel.com"},"repository":{"url":"git+https://github.com/stripe-experiments/sync-engine.git","type":"git"},"_npmVersion":"11.1.0","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"22.13.1","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","chalk":"^5.3.0","yesql":"^7.0.0","dotenv":"^16.4.7","stripe":"^17.7.0","express":"^4.18.2","inquirer":"^12.3.0","commander":"^12.1.0","papaparse":"5.4.1","@ngrok/ngrok":"^1.4.1","pg-node-migrations":"0.0.8","supabase-management-js":"^0.1.6"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.21.0","devDependencies":{"tsx":"^4.21.0","tsup":"^8.5.0","rimraf":"^6.0.1","vitest":"^3.2.4","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@vitest/ui":"^4.0.9","typescript":"^5.9.2","@types/node":"^24.10.1","@types/yesql":"^4.1.4","@types/express":"^4.17.21","@types/inquirer":"^9.0.7","@types/papaparse":"5.3.16"},"_npmOperationalInternal":{"tmp":"tmp/sync-engine_0.0.11_1771447100382_0.8799986539030924","host":"s3://npm-registry-packages-npm-production"}},"0.0.12":{"name":"@paymentsdb/sync-engine","version":"0.0.12","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"PaymentsDB","email":"https://paymentsdb.com/"},"license":"Apache-2.0","_id":"@paymentsdb/sync-engine@0.0.12","maintainers":[{"name":"ramonpretzel","email":"ramon@withpretzel.com"}],"homepage":"https://github.com/stripe-experiments/sync-engine#readme","bugs":{"url":"https://github.com/stripe-experiments/sync-engine/issues"},"bin":{"sync-engine":"dist/cli/index.js"},"dist":{"shasum":"6a637cb8c3dc8b03a0d55fdffca74cb7b4a7ec43","tarball":"https://registry.npmjs.org/@paymentsdb/sync-engine/-/sync-engine-0.0.12.tgz","fileCount":88,"integrity":"sha512-ovEYmZh+FVLZjp/w/Gn6mdzphwzeo9VjM313jmD3CB77K5OoUx/EcYpAaHA36EnJr7G6DoQva5QTxRoWEY7ZoA==","signatures":[{"sig":"MEQCIBatt/jPnxUcsdcuA9BCr/3VPQP5dKIQJ1bpIlkSQVOoAiB1L3QPqMWBWuZhH128jbcQ+yr7E9nhXa4hJGrSRLUpbg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5379145},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./cli":{"types":"./dist/cli/lib.d.ts","import":"./dist/cli/lib.js","require":"./dist/cli/lib.cjs"},"./supabase":{"types":"./dist/supabase/index.d.ts","import":"./dist/supabase/index.js","require":"./dist/supabase/index.cjs"}},"gitHead":"228545fa3672b406a3a632e17b033bb72950f338","private":false,"scripts":{"lint":"eslint src --ext .ts","test":"vitest","build":"tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean","test:integration":"TEST_POSTGRES_DB_URL=postgresql://postgres:postgres@localhost:55432/postgres vitest run src/stripeSync*integration.test.ts","generate:sigma-schema":"tsx src/sigma/schema/fetch-schema.ts"},"_npmUser":{"name":"ramonpretzel","email":"ramon@withpretzel.com"},"repository":{"url":"git+https://github.com/stripe-experiments/sync-engine.git","type":"git"},"_npmVersion":"11.1.0","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"22.13.1","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","chalk":"^5.3.0","yesql":"^7.0.0","dotenv":"^16.4.7","stripe":"^17.7.0","express":"^4.18.2","inquirer":"^12.3.0","commander":"^12.1.0","papaparse":"5.4.1","@ngrok/ngrok":"^1.4.1","pg-node-migrations":"0.0.8","supabase-management-js":"^0.1.6"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.21.0","devDependencies":{"tsx":"^4.21.0","tsup":"^8.5.0","rimraf":"^6.0.1","vitest":"^3.2.4","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@vitest/ui":"^4.0.9","typescript":"^5.9.2","@types/node":"^24.10.1","@types/yesql":"^4.1.4","@types/express":"^4.17.21","@types/inquirer":"^9.0.7","@types/papaparse":"5.3.16"},"_npmOperationalInternal":{"tmp":"tmp/sync-engine_0.0.12_1771490749076_0.4498356364125464","host":"s3://npm-registry-packages-npm-production"}},"0.0.13":{"name":"@paymentsdb/sync-engine","version":"0.0.13","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"PaymentsDB","email":"https://paymentsdb.com/"},"license":"Apache-2.0","_id":"@paymentsdb/sync-engine@0.0.13","maintainers":[{"name":"ramonpretzel","email":"ramon@withpretzel.com"}],"homepage":"https://github.com/stripe-experiments/sync-engine#readme","bugs":{"url":"https://github.com/stripe-experiments/sync-engine/issues"},"bin":{"sync-engine":"dist/cli/index.js"},"dist":{"shasum":"85aad41864a398c45bd2191bf940de7bac0a2f25","tarball":"https://registry.npmjs.org/@paymentsdb/sync-engine/-/sync-engine-0.0.13.tgz","fileCount":88,"integrity":"sha512-zgk52CQQu49EbKjatkY7eK7wEmf4M39pEOrSVsZ1q72XIBYan18FxfqtDXmV0OujGocMjaE7mITKbEVIxBoQ8w==","signatures":[{"sig":"MEUCIQC6LkcbsGcat18tDBZgaKa7HfdD/LUxqLZRecf8tCyr4gIgS+yB6xQLO42JH1O7586kgsoLFb7djy/JCNahEQiwA8M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5379817},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./cli":{"types":"./dist/cli/lib.d.ts","import":"./dist/cli/lib.js","require":"./dist/cli/lib.cjs"},"./supabase":{"types":"./dist/supabase/index.d.ts","import":"./dist/supabase/index.js","require":"./dist/supabase/index.cjs"}},"gitHead":"228545fa3672b406a3a632e17b033bb72950f338","private":false,"scripts":{"lint":"eslint src --ext .ts","test":"vitest","build":"tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean","test:integration":"TEST_POSTGRES_DB_URL=postgresql://postgres:postgres@localhost:55432/postgres vitest run src/stripeSync*integration.test.ts","generate:sigma-schema":"tsx src/sigma/schema/fetch-schema.ts"},"_npmUser":{"name":"ramonpretzel","email":"ramon@withpretzel.com"},"repository":{"url":"git+https://github.com/stripe-experiments/sync-engine.git","type":"git"},"_npmVersion":"11.1.0","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"22.13.1","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","chalk":"^5.3.0","yesql":"^7.0.0","dotenv":"^16.4.7","stripe":"^17.7.0","express":"^4.18.2","inquirer":"^12.3.0","commander":"^12.1.0","papaparse":"5.4.1","@ngrok/ngrok":"^1.4.1","pg-node-migrations":"0.0.8","supabase-management-js":"^0.1.6"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.21.0","devDependencies":{"tsx":"^4.21.0","tsup":"^8.5.0","rimraf":"^6.0.1","vitest":"^3.2.4","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@vitest/ui":"^4.0.9","typescript":"^5.9.2","@types/node":"^24.10.1","@types/yesql":"^4.1.4","@types/express":"^4.17.21","@types/inquirer":"^9.0.7","@types/papaparse":"5.3.16"},"_npmOperationalInternal":{"tmp":"tmp/sync-engine_0.0.13_1771492604022_0.3453712968794389","host":"s3://npm-registry-packages-npm-production"}},"0.0.14":{"name":"@paymentsdb/sync-engine","version":"0.0.14","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"PaymentsDB","email":"https://paymentsdb.com/"},"license":"Apache-2.0","_id":"@paymentsdb/sync-engine@0.0.14","maintainers":[{"name":"ramonpretzel","email":"ramon@withpretzel.com"}],"homepage":"https://github.com/stripe-experiments/sync-engine#readme","bugs":{"url":"https://github.com/stripe-experiments/sync-engine/issues"},"bin":{"sync-engine":"dist/cli/index.js"},"dist":{"shasum":"2ea498ce0296b623e42ec5942f5f7d1538248e4f","tarball":"https://registry.npmjs.org/@paymentsdb/sync-engine/-/sync-engine-0.0.14.tgz","fileCount":88,"integrity":"sha512-xAXGLW09dmOAm6rKBwNniRIndwVBdzlAqyZN8AC/HqAXSVL+jibCPXt9PrxE4U4LidBetzBj2xqmXRZ1v6wzvw==","signatures":[{"sig":"MEUCIFevvyFchu+F6GYnTQLEbfdb6X1iueYhJCuoxxFXakZWAiEAp3Df8aQzQgRj1pFhIk62W1OujjDNosfOUyTZi1wFR1w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5388353},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./cli":{"types":"./dist/cli/lib.d.ts","import":"./dist/cli/lib.js","require":"./dist/cli/lib.cjs"},"./supabase":{"types":"./dist/supabase/index.d.ts","import":"./dist/supabase/index.js","require":"./dist/supabase/index.cjs"}},"gitHead":"fa81d41adb47cff99c7ca8a443c1da782e049da5","private":false,"scripts":{"lint":"eslint src --ext .ts","test":"vitest","build":"tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean","test:integration":"TEST_POSTGRES_DB_URL=postgresql://postgres:postgres@localhost:55432/postgres vitest run src/stripeSync*integration.test.ts","generate:sigma-schema":"tsx src/sigma/schema/fetch-schema.ts"},"_npmUser":{"name":"ramonpretzel","email":"ramon@withpretzel.com"},"repository":{"url":"git+https://github.com/stripe-experiments/sync-engine.git","type":"git"},"_npmVersion":"11.1.0","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"22.13.1","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","chalk":"^5.3.0","yesql":"^7.0.0","dotenv":"^16.4.7","stripe":"^17.7.0","express":"^4.18.2","inquirer":"^12.3.0","commander":"^12.1.0","papaparse":"5.4.1","@ngrok/ngrok":"^1.4.1","pg-node-migrations":"0.0.8","supabase-management-js":"^0.1.6"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.21.0","devDependencies":{"tsx":"^4.21.0","tsup":"^8.5.0","rimraf":"^6.0.1","vitest":"^3.2.4","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@vitest/ui":"^4.0.9","typescript":"^5.9.2","@types/node":"^24.10.1","@types/yesql":"^4.1.4","@types/express":"^4.17.21","@types/inquirer":"^9.0.7","@types/papaparse":"5.3.16"},"_npmOperationalInternal":{"tmp":"tmp/sync-engine_0.0.14_1771500123479_0.25154078520540724","host":"s3://npm-registry-packages-npm-production"}},"0.0.15":{"name":"@paymentsdb/sync-engine","version":"0.0.15","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"PaymentsDB","email":"https://paymentsdb.com/"},"license":"Apache-2.0","_id":"@paymentsdb/sync-engine@0.0.15","maintainers":[{"name":"ramonpretzel","email":"ramon@withpretzel.com"}],"homepage":"https://github.com/stripe-experiments/sync-engine#readme","bugs":{"url":"https://github.com/stripe-experiments/sync-engine/issues"},"bin":{"sync-engine":"dist/cli/index.js"},"dist":{"shasum":"b286d6f788f59897a5a46845f45832fcd65c00da","tarball":"https://registry.npmjs.org/@paymentsdb/sync-engine/-/sync-engine-0.0.15.tgz","fileCount":88,"integrity":"sha512-OsBnZvxO4f4/iJ27jfWTC9c+bXkXk8tGSZn6bG20LsQIVcqM91chMJpO3SHV+DdC25qsEGA3QZZeITDJUiV7cQ==","signatures":[{"sig":"MEQCIEQ0+pbHkECPapmOE9vpXKDD8Z2ksaebEiSSZKxxTpFXAiA1axQDzZA6FktNroqXVnWA5cRHSWU18nWT6kONaEqOxA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5388441},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./cli":{"types":"./dist/cli/lib.d.ts","import":"./dist/cli/lib.js","require":"./dist/cli/lib.cjs"},"./supabase":{"types":"./dist/supabase/index.d.ts","import":"./dist/supabase/index.js","require":"./dist/supabase/index.cjs"}},"gitHead":"30bee6b3f272728448455fb5145d367031f9501d","private":false,"scripts":{"lint":"eslint src --ext .ts","test":"vitest","build":"tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean","test:integration":"TEST_POSTGRES_DB_URL=postgresql://postgres:postgres@localhost:55432/postgres vitest run src/stripeSync*integration.test.ts","generate:sigma-schema":"tsx src/sigma/schema/fetch-schema.ts"},"_npmUser":{"name":"ramonpretzel","email":"ramon@withpretzel.com"},"repository":{"url":"git+https://github.com/stripe-experiments/sync-engine.git","type":"git"},"_npmVersion":"11.1.0","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"22.13.1","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","chalk":"^5.3.0","yesql":"^7.0.0","dotenv":"^16.4.7","stripe":"^17.7.0","express":"^4.18.2","inquirer":"^12.3.0","commander":"^12.1.0","papaparse":"5.4.1","@ngrok/ngrok":"^1.4.1","pg-node-migrations":"0.0.8","supabase-management-js":"^0.1.6"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.21.0","devDependencies":{"tsx":"^4.21.0","tsup":"^8.5.0","rimraf":"^6.0.1","vitest":"^3.2.4","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@vitest/ui":"^4.0.9","typescript":"^5.9.2","@types/node":"^24.10.1","@types/yesql":"^4.1.4","@types/express":"^4.17.21","@types/inquirer":"^9.0.7","@types/papaparse":"5.3.16"},"_npmOperationalInternal":{"tmp":"tmp/sync-engine_0.0.15_1771503663226_0.10214150524351684","host":"s3://npm-registry-packages-npm-production"}},"0.0.16":{"name":"@paymentsdb/sync-engine","version":"0.0.16","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"PaymentsDB","email":"https://paymentsdb.com/"},"license":"Apache-2.0","_id":"@paymentsdb/sync-engine@0.0.16","maintainers":[{"name":"ramonpretzel","email":"ramon@withpretzel.com"}],"homepage":"https://github.com/stripe-experiments/sync-engine#readme","bugs":{"url":"https://github.com/stripe-experiments/sync-engine/issues"},"bin":{"sync-engine":"dist/cli/index.js"},"dist":{"shasum":"e7c691d5842067a1c5098332f872bb8aa81a2e9c","tarball":"https://registry.npmjs.org/@paymentsdb/sync-engine/-/sync-engine-0.0.16.tgz","fileCount":88,"integrity":"sha512-3syysGgGe8IRVVJPI3plqSHoykShc/r/N/Zbw1Gsux02HqQinPHyCf1/GOBWigzUQFCmIVGdA0VyJ8A5BesNdQ==","signatures":[{"sig":"MEYCIQDYIy3VbCxr9leUu4BC07XQfYJMk09CpCQE+rvOJNzkTwIhAMbYz6Xf9zkesMSyqdV0NqnsQZRKor+oAAI05NQam1oC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5407918},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./cli":{"types":"./dist/cli/lib.d.ts","import":"./dist/cli/lib.js","require":"./dist/cli/lib.cjs"},"./supabase":{"types":"./dist/supabase/index.d.ts","import":"./dist/supabase/index.js","require":"./dist/supabase/index.cjs"}},"gitHead":"5876990243fd0655de3daa75377057ec81d75199","private":false,"scripts":{"lint":"eslint src --ext .ts","test":"vitest","build":"tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","clean":"rimraf dist","prebuild":"npm run clean","test:integration":"TEST_POSTGRES_DB_URL=postgresql://postgres:postgres@localhost:55432/postgres vitest run src/stripeSync*integration.test.ts","generate:sigma-schema":"tsx src/sigma/schema/fetch-schema.ts"},"_npmUser":{"name":"ramonpretzel","email":"ramon@withpretzel.com"},"repository":{"url":"git+https://github.com/stripe-experiments/sync-engine.git","type":"git"},"_npmVersion":"11.1.0","description":"Stripe Sync Engine to sync Stripe data to Postgres","directories":{},"_nodeVersion":"22.13.1","dependencies":{"pg":"^8.16.3","ws":"^8.18.0","chalk":"^5.3.0","yesql":"^7.0.0","dotenv":"^16.4.7","stripe":"^17.7.0","express":"^4.18.2","inquirer":"^12.3.0","commander":"^12.1.0","papaparse":"5.4.1","@ngrok/ngrok":"^1.4.1","pg-node-migrations":"0.0.8","supabase-management-js":"^0.1.6"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.21.0","devDependencies":{"tsx":"^4.21.0","tsup":"^8.5.0","rimraf":"^6.0.1","vitest":"^3.2.4","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@vitest/ui":"^4.0.9","typescript":"^5.9.2","@types/node":"^24.10.1","@types/yesql":"^4.1.4","@types/express":"^4.17.21","@types/inquirer":"^9.0.7","@types/papaparse":"5.3.16"},"_npmOperationalInternal":{"tmp":"tmp/sync-engine_0.0.16_1771508324506_0.07960868360136564","host":"s3://npm-registry-packages-npm-production"}},"0.0.17":{"name":"@paymentsdb/sync-engine","version":"0.0.17","private":false,"description":"Stripe Sync Engine to sync Stripe data to Postgres","type":"module","main":"./dist/index.cjs","bin":{"sync-engine":"dist/cli/index.js"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./supabase":{"types":"./dist/supabase/index.d.ts","import":"./dist/supabase/index.js","require":"./dist/supabase/index.cjs"},"./cli":{"types":"./dist/cli/lib.d.ts","import":"./dist/cli/lib.js","require":"./dist/cli/lib.cjs"}},"scripts":{"clean":"rimraf dist","prebuild":"npm run clean","build":"tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations","lint":"eslint src --ext .ts","test":"vitest","test:integration":"TEST_POSTGRES_DB_URL=postgresql://postgres:postgres@localhost:55432/postgres vitest run src/stripeSync*integration.test.ts","generate:sigma-schema":"tsx src/sigma/schema/fetch-schema.ts"},"dependencies":{"@ngrok/ngrok":"^1.4.1","chalk":"^5.3.0","commander":"^12.1.0","dotenv":"^16.4.7","express":"^4.18.2","inquirer":"^12.3.0","papaparse":"5.4.1","pg":"^8.16.3","pg-node-migrations":"0.0.8","stripe":"^17.7.0","supabase-management-js":"^0.1.6","ws":"^8.18.0","yesql":"^7.0.0"},"devDependencies":{"@types/express":"^4.17.21","@types/inquirer":"^9.0.7","@types/node":"^24.10.1","@types/papaparse":"5.3.16","@types/pg":"^8.15.5","@types/ws":"^8.5.13","@types/yesql":"^4.1.4","@vitest/ui":"^4.0.9","rimraf":"^6.0.1","tsup":"^8.5.0","tsx":"^4.21.0","typescript":"^5.9.2","vitest":"^3.2.4"},"packageManager":"pnpm@10.21.0","repository":{"type":"git","url":"git+https://github.com/stripe-experiments/sync-engine.git"},"homepage":"https://github.com/stripe-experiments/sync-engine#readme","bugs":{"url":"https://github.com/stripe-experiments/sync-engine/issues"},"keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"author":{"name":"PaymentsDB","email":"https://paymentsdb.com/"},"license":"Apache-2.0","_id":"@paymentsdb/sync-engine@0.0.17","gitHead":"cc5c8b85f2347ba9fc92e33efeb88a523acb3c5e","types":"./dist/index.d.ts","_nodeVersion":"22.13.1","_npmVersion":"11.1.0","dist":{"integrity":"sha512-onHqOoWgjCKhbwSeaBB/3m8u3DrCtFR1wTKRZVqeH7gYScW3ZKU+pl4Lu9Cbmr+kuqsyloIWPBbMvzfQ2iO5GQ==","shasum":"89745b45ab3e6c2a31ea62131931f9afb5c35bde","tarball":"https://registry.npmjs.org/@paymentsdb/sync-engine/-/sync-engine-0.0.17.tgz","fileCount":88,"unpackedSize":5413875,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCG4esESH6VUizRQoKEpH1Fx65a9vYH3t7x4BeeXNCBZwIhAO+uu5lC2b1jhTAKmLbJKUDV/ddQglPFuh3NNNiEyaRs"}]},"_npmUser":{"name":"ramonpretzel","email":"ramon@withpretzel.com"},"directories":{},"maintainers":[{"name":"ramonpretzel","email":"ramon@withpretzel.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sync-engine_0.0.17_1771510394748_0.9080160660171055"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-02T15:40:29.880Z","modified":"2026-02-19T14:13:15.105Z","0.0.1":"2026-02-02T15:40:30.101Z","0.0.2":"2026-02-02T16:42:18.732Z","0.0.3":"2026-02-02T17:02:16.997Z","0.0.4":"2026-02-03T10:19:31.601Z","0.0.5":"2026-02-04T19:50:51.762Z","0.0.6":"2026-02-09T18:45:15.964Z","0.0.7":"2026-02-10T07:17:22.145Z","0.0.8":"2026-02-18T13:04:49.711Z","0.0.9":"2026-02-18T16:16:17.116Z","0.0.10":"2026-02-18T17:26:29.347Z","0.0.11":"2026-02-18T20:38:20.535Z","0.0.12":"2026-02-19T08:45:49.337Z","0.0.13":"2026-02-19T09:16:44.223Z","0.0.14":"2026-02-19T11:22:03.698Z","0.0.15":"2026-02-19T12:21:03.471Z","0.0.16":"2026-02-19T13:38:44.681Z","0.0.17":"2026-02-19T14:13:14.958Z"},"bugs":{"url":"https://github.com/stripe-experiments/sync-engine/issues"},"author":{"name":"PaymentsDB","email":"https://paymentsdb.com/"},"license":"Apache-2.0","homepage":"https://github.com/stripe-experiments/sync-engine#readme","keywords":["stripe","postgres","sync","webhooks","supabase","billing","database","typescript"],"repository":{"type":"git","url":"git+https://github.com/stripe-experiments/sync-engine.git"},"description":"Stripe Sync Engine to sync Stripe data to Postgres","maintainers":[{"name":"ramonpretzel","email":"ramon@withpretzel.com"}],"readme":"# Stripe Sync Engine\n\n![GitHub License](https://img.shields.io/github/license/stripe-experiments/sync-engine)\n![NPM Version](https://img.shields.io/npm/v/stripe-experiment-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- **Managed Webhooks:** Automatic webhook creation and lifecycle management with built-in processing\n- **Real-time Sync:** Keep your database in sync with Stripe automatically\n- **Backfill Support:** Sync historical data from Stripe to your database\n- **Stripe Sigma:** Support for Stripe Sigma reporting data\n- **Supabase Ready:** Deploy to Supabase Edge Functions with one command\n- **Automatic Retries:** Built-in retry logic for rate limits and transient errors\n- **Observability:** Track sync runs and monitor progress\n\n## Installation\n\n```sh\nnpm install stripe-experiment-sync stripe\n# or\npnpm add stripe-experiment-sync stripe\n# or\nyarn add stripe-experiment-sync stripe\n```\n\n## Quick Start\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,\n  },\n  stripeSecretKey: 'sk_test_...',\n})\n\n// Create a managed webhook - no additional processing needed!\nconst webhook = await sync.findOrCreateManagedWebhook('https://example.com/stripe-webhooks')\n\n// Cleanup when done (closes PostgreSQL connection pool)\nawait sync.close()\n```\n\n## Managed Webhooks\n\nThe Stripe Sync Engine automatically manages webhook endpoints and their processing. Once created, managed webhooks handle everything automatically - you don't need to manually process events.\n\n### Creating Managed Webhooks\n\n```typescript\n// Create or reuse an existing webhook endpoint\n// This webhook will automatically sync all Stripe events to your database\nconst webhook = await sync.findOrCreateManagedWebhook('https://example.com/stripe-webhooks')\n\n// Create a webhook for specific events\nconst webhook = await sync.createManagedWebhook('https://example.com/stripe-webhooks', {\n  enabled_events: ['customer.created', 'customer.updated', 'invoice.paid'],\n})\n\nconsole.log(webhook.id) // we_xxx\nconsole.log(webhook.secret) // whsec_xxx\n```\n\n**⚠️ Important:** Managed webhooks are tracked in the database and automatically process incoming events. You don't need to call `processWebhook()` for managed webhooks - the library handles this internally.\n\n### Managing Webhooks\n\n```typescript\n// List all managed webhooks\nconst webhooks = await sync.listManagedWebhooks()\n\n// Get a specific webhook\nconst webhook = await sync.getManagedWebhook('we_xxx')\n\n// Delete a managed webhook\nawait sync.deleteManagedWebhook('we_xxx')\n```\n\n### How It Works\n\n**Automatic Processing:** Managed webhooks are stored in the `stripe._managed_webhooks` table. When Stripe sends events to these webhooks, they are automatically processed and synced to your database.\n\n**Race Condition Protection:** PostgreSQL advisory locks prevent race conditions when multiple instances call `findOrCreateManagedWebhook()` concurrently. A unique constraint on `(url, account_id)` provides additional safety.\n\n**Automatic Cleanup:** When you call `findOrCreateManagedWebhook()`, it will:\n\n1. Check if a webhook already exists for the URL in the database\n2. If found, reuse the existing webhook\n3. If not found, create a new webhook in Stripe and record it\n4. Clean up any orphaned webhooks from previous installations\n\n## Manual Webhook Processing\n\nIf you need to process webhooks outside of managed webhooks (e.g., for testing or custom integrations):\n\n```typescript\n// Validate and process a webhook event\napp.post('/stripe-webhooks', async (req, res) => {\n  const signature = req.headers['stripe-signature']\n  const payload = req.body\n\n  try {\n    await sync.processWebhook(payload, signature)\n    res.status(200).send({ received: true })\n  } catch (error) {\n    res.status(400).send({ error: error.message })\n  }\n})\n\n// Or process an event directly (no signature validation)\nawait sync.processEvent(stripeEvent)\n\n// Cleanup when done\nawait sync.close()\n```\n\n**Note:** This is only needed for custom webhook endpoints. Managed webhooks handle processing automatically.\n\n## Configuration\n\n| Option                          | Type    | Description                                                                                                                                                                                                                                                                                            |\n| ------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `poolConfig`                    | object  | **Required.** PostgreSQL connection pool configuration. Supports `connectionString`, `max`, `keepAlive`. See [Node-Postgres Pool API](https://node-postgres.com/apis/pool).                                                                                                                            |\n| `stripeSecretKey`               | string  | **Required.** Stripe secret key                                                                                                                                                                                                                                                                        |\n| `stripeWebhookSecret`           | string  | Stripe webhook signing secret (only needed for manual webhook processing)                                                                                                                                                                                                                              |\n| `stripeApiVersion`              | string  | Stripe API version (default: `2020-08-27`)                                                                                                                                                                                                                                                             |\n| `enableSigma`                   | boolean | Enable Stripe Sigma reporting data sync. Default: false                                                                                                                                                                                                                                                |\n| `autoExpandLists`               | boolean | Fetch all list items from Stripe (not just the default 10)                                                                                                                                                                                                                                             |\n| `backfillRelatedEntities`       | boolean | Ensure related entities exist for foreign key integrity                                                                                                                                                                                                                                                |\n| `revalidateObjectsViaStripeApi` | Array   | Always fetch latest data 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| `maxRetries`                    | number  | Maximum retry attempts for 429 rate limits. Default: 5                                                                                                                                                                                                                                                 |\n| `initialRetryDelayMs`           | number  | Initial retry delay in milliseconds. Default: 1000                                                                                                                                                                                                                                                     |\n| `maxRetryDelayMs`               | number  | Maximum retry delay in milliseconds. Default: 60000                                                                                                                                                                                                                                                    |\n| `logger`                        | Logger  | Logger instance (pino-compatible)                                                                                                                                                                                                                                                                      |\n\n## Database Schema\n\nThe library creates and manages a `stripe` schema in PostgreSQL with tables for all supported Stripe objects.\n\n> **Important:** The schema name is fixed as `stripe` and cannot be configured.\n\n> **Note:** Fields and tables prefixed with `_` are reserved for internal metadata: `_account_id`, `_last_synced_at`, `_updated_at`, `_migrations`, `_managed_webhooks`, `_sync_runs`, `_sync_obj_runs`.\n\n### Running Migrations\n\n```ts\nimport { runMigrations } from 'stripe-experiment-sync'\n\nawait runMigrations({ databaseUrl: 'postgres://...' })\n```\n\n### Observability\n\nTrack sync operations with the `sync_runs` view:\n\n```sql\nSELECT\n  account_id,\n  started_at,\n  closed_at,\n  status,              -- 'running', 'complete', or 'error'\n  total_processed,     -- Total records synced\n  complete_count,      -- Completed object types\n  error_count,         -- Object types with errors\n  running_count,       -- Currently syncing\n  pending_count        -- Not yet started\nFROM stripe.sync_runs\nORDER BY started_at DESC;\n```\n\n## Syncing Data\n\n### Sync a Single Entity\n\n```ts\n// Automatically detects entity type from ID prefix\nawait sync.syncSingleEntity('cus_12345')\nawait sync.syncSingleEntity('prod_xyz')\n```\n\n### Backfill Historical Data\n\n```ts\n// Sync all products created after a date\nawait sync.processUntilDone({\n  object: 'product',\n  created: { gte: 1643872333 }, // Unix timestamp\n})\n\n// Sync all customers\nawait sync.processUntilDone({ object: 'customer' })\n\n// Sync everything\nawait sync.processUntilDone({ object: 'all' })\n```\n\nSupported objects: `all`, `charge`, `checkout_sessions`, `credit_note`, `customer`, `customer_with_entitlements`, `dispute`, `early_fraud_warning`, `invoice`, `payment_intent`, `payment_method`, `plan`, `price`, `product`, `refund`, `setup_intent`, `subscription`, `subscription_schedules`, `tax_id`.\n\nThe sync engine tracks cursors per account and resource, enabling incremental syncing that resumes after interruptions.\n\nFor paged backfills, the engine keeps a separate per-run pagination cursor (`page_cursor`) while the\nincremental cursor continues to track the highest `created` timestamp.\n\n> **Tip:** For large Stripe accounts (>10,000 objects), loop through date ranges day-by-day to avoid timeouts.\n\n## Account Management\n\n### Get Current Account\n\n```ts\nconst account = await sync.getCurrentAccount()\nconsole.log(account.id) // acct_xxx\n```\n\n### List Synced Accounts\n\n```ts\nconst accounts = await sync.getAllSyncedAccounts()\n```\n\n### Delete Account Data\n\n**⚠️ WARNING:** This permanently deletes all synced data for an account.\n\n```ts\n// Preview deletion\nconst preview = await sync.dangerouslyDeleteSyncedAccountData('acct_xxx', {\n  dryRun: true,\n})\nconsole.log(preview.deletedRecordCounts)\n\n// Actually delete\nconst result = await sync.dangerouslyDeleteSyncedAccountData('acct_xxx')\n```\n\n## Supabase Deployment\n\nDeploy to Supabase Edge Functions for serverless operation with automatic webhook processing:\n\n```bash\n# Install\nnpx stripe-experiment-sync supabase install \\\n  --token $SUPABASE_ACCESS_TOKEN \\\n  --project $SUPABASE_PROJECT_REF \\\n  --stripe-key $STRIPE_API_KEY\n\n# Install specific version\nnpx stripe-experiment-sync supabase install \\\n  --token $SUPABASE_ACCESS_TOKEN \\\n  --project $SUPABASE_PROJECT_REF \\\n  --stripe-key $STRIPE_API_KEY \\\n  --package-version 1.0.15\n\n# Uninstall\nnpx stripe-experiment-sync supabase uninstall \\\n  --token $SUPABASE_ACCESS_TOKEN \\\n  --project $SUPABASE_PROJECT_REF\n```\n\n### Install Options\n\n- `--token <token>` - Supabase access token (or `SUPABASE_ACCESS_TOKEN` env)\n- `--project <ref>` - Supabase project ref (or `SUPABASE_PROJECT_REF` env)\n- `--stripe-key <key>` - Stripe API key (or `STRIPE_API_KEY` env)\n- `--package-version <version>` - npm package version (default: latest)\n- `--worker-interval <seconds>` - Worker interval in seconds (default: 60)\n- `--management-url <url>` - Supabase management API URL with protocol (default: https://api.supabase.com). For local testing: http://localhost:54323\n\nThe install command will:\n\n1. Deploy Edge Functions: `stripe-setup`, `stripe-webhook`, `stripe-worker`\n2. Run database migrations to create the `stripe` schema\n3. Create a managed Stripe webhook pointing to your Supabase project\n4. Set up a pg_cron job for automatic background syncing\n\n## CLI Commands\n\n```bash\n# Run database migrations\nnpx stripe-experiment-sync migrate --database-url $DATABASE_URL\n\n# Start local sync with ngrok tunnel\nnpx stripe-experiment-sync start \\\n  --stripe-key $STRIPE_API_KEY \\\n  --ngrok-token $NGROK_AUTH_TOKEN \\\n  --database-url $DATABASE_URL\n\n# Backfill specific entity type\nnpx stripe-experiment-sync backfill customer \\\n  --stripe-key $STRIPE_API_KEY \\\n  --database-url $DATABASE_URL\n\n# Enable Sigma data syncing\nnpx stripe-experiment-sync start \\\n  --stripe-key $STRIPE_API_KEY \\\n  --database-url $DATABASE_URL \\\n  --sigma\n```\n\n## License\n\nSee [LICENSE](LICENSE) file.\n\n## Contributing\n\nIssues and pull requests are welcome at [https://github.com/stripe-experiments/sync-engine](https://github.com/stripe-experiments/sync-engine).\n","readmeFilename":"README.md"}