{"_id":"@buildspacestudio/sdk","_rev":"11-06d0a901c8f9f3c32cf29ba21afeda9a","name":"@buildspacestudio/sdk","dist-tags":{"latest":"0.7.0"},"versions":{"0.1.0":{"name":"@buildspacestudio/sdk","version":"0.1.0","license":"MIT","_id":"@buildspacestudio/sdk@0.1.0","maintainers":[{"name":"bryan_buildspacestudio","email":"bryan@buildspace.studio"},{"name":"willbuildspace","email":"will@buildspace.studio"},{"name":"chad-buildspace-studio","email":"chad@buildspace.studio"}],"dist":{"shasum":"17a3a34ff4e01914ad9fe52ac01e891df4d097cf","tarball":"https://registry.npmjs.org/@buildspacestudio/sdk/-/sdk-0.1.0.tgz","fileCount":65,"integrity":"sha512-id1a0vXB5IV2akz2h1Ghv9W/9Drm0ly1BX0KRDpBR0/z3C0k5lxGz2pOzwcLYU/yg2qzDGP1FoXaOLFDzMqjWg==","signatures":[{"sig":"MEYCIQDCCUG+niXJae75Zr0EZ6udVOEzG7pKTXqLvJr/UhVbJwIhAOe1GuUZ/i/5747U2FH3p+moVGmj4dp6QZKq1p06oWmY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55968},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./auth":{"types":"./dist/auth/index.d.ts","default":"./dist/auth/index.js"},"./client":{"types":"./dist/client/index.d.ts","default":"./dist/client/index.js"},"./events":{"types":"./dist/events/index.d.ts","default":"./dist/events/index.js"},"./storage":{"types":"./dist/storage/index.d.ts","default":"./dist/storage/index.js"},"./notifications":{"types":"./dist/notifications/index.d.ts","default":"./dist/notifications/index.js"}},"gitHead":"fa1a55ffe44f185fc7b3e7d02d821686ceae8515","scripts":{"test":"bun run --bun vitest run","build":"tsc","test:watch":"bun run --bun vitest","check-types":"tsc --noEmit"},"_npmUser":{"name":"bryan_buildspacestudio","email":"bryan@buildspace.studio"},"_npmVersion":"10.9.2","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.0_1773284116781_0.575887034060043","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@buildspacestudio/sdk","version":"0.1.1","license":"MIT","_id":"@buildspacestudio/sdk@0.1.1","maintainers":[{"name":"bryan_buildspacestudio","email":"bryan@buildspace.studio"},{"name":"willbuildspace","email":"will@buildspace.studio"},{"name":"chad-buildspace-studio","email":"chad@buildspace.studio"}],"dist":{"shasum":"796e5b4c3b703d1373003120ea65a5055a5c959d","tarball":"https://registry.npmjs.org/@buildspacestudio/sdk/-/sdk-0.1.1.tgz","fileCount":66,"integrity":"sha512-BEIVgvguL8e20yZKCVhUp7sEAzzvkceAc+gCvxRugMtyB/zmKDFe+KoRiBNIGsKQl3s9mj/aeIjbpfDDfTtZtA==","signatures":[{"sig":"MEQCIDjs8XmWjIN6GlVCpNDbQLRKwAPXrVpz+7hYBwrnobp1AiAxoP8QCuwlCvNlbiVkzN+IqACD15xP02zx/6k9dejl7A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60972},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./auth":{"types":"./dist/auth/index.d.ts","default":"./dist/auth/index.js"},"./client":{"types":"./dist/client/index.d.ts","default":"./dist/client/index.js"},"./events":{"types":"./dist/events/index.d.ts","default":"./dist/events/index.js"},"./storage":{"types":"./dist/storage/index.d.ts","default":"./dist/storage/index.js"},"./notifications":{"types":"./dist/notifications/index.d.ts","default":"./dist/notifications/index.js"}},"gitHead":"41143d2afd48cf6b536b9ef8a462e88d5ceb1d1b","scripts":{"test":"bun run --bun vitest run","build":"tsc","test:watch":"bun run --bun vitest","check-types":"tsc --noEmit"},"_npmUser":{"name":"bryan_buildspacestudio","email":"bryan@buildspace.studio"},"_npmVersion":"10.9.2","description":"The official JavaScript/TypeScript SDK for [Buildspace](https://buildspace.studio) — auth, events, storage, and notifications for your app.","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.1_1773347066501_0.910585439361375","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@buildspacestudio/sdk","version":"0.1.2","license":"MIT","_id":"@buildspacestudio/sdk@0.1.2","maintainers":[{"name":"bryan_buildspacestudio","email":"bryan@buildspace.studio"},{"name":"willbuildspace","email":"will@buildspace.studio"},{"name":"chad-buildspace-studio","email":"chad@buildspace.studio"}],"dist":{"shasum":"b4ad1ca33ffd9fab5713ea0b21349aa67e62ddf4","tarball":"https://registry.npmjs.org/@buildspacestudio/sdk/-/sdk-0.1.2.tgz","fileCount":66,"integrity":"sha512-R4FkMhO5abxzIMEdqHbRs/+Ephkybdu5uAlH+U/cUmDsO9cEdiCyIlXjgiyM//XAUpJoNSoc3YxIFlLzDye4yQ==","signatures":[{"sig":"MEYCIQCjXU27pS/sJPSzzpUnKY5PxrDXefjnsDiNw9kFQiDULwIhALTqZphGDI0Jyp8DO01jUf4HRnoktQ5lpGrxvXdmCMLw","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60991},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./auth":{"types":"./dist/auth/index.d.ts","default":"./dist/auth/index.js"},"./client":{"types":"./dist/client/index.d.ts","default":"./dist/client/index.js"},"./events":{"types":"./dist/events/index.d.ts","default":"./dist/events/index.js"},"./storage":{"types":"./dist/storage/index.d.ts","default":"./dist/storage/index.js"},"./notifications":{"types":"./dist/notifications/index.d.ts","default":"./dist/notifications/index.js"}},"gitHead":"d4bc33dae117f76a8c99101f4e247a7e6f9b65ce","scripts":{"test":"bun run --bun vitest run","build":"tsc","test:watch":"bun run --bun vitest","check-types":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9619908a-7184-4749-b171-3134bbbeba25"}},"_npmVersion":"11.9.0","description":"The official JavaScript/TypeScript SDK for [Buildspace](https://buildspace.studio) — auth, events, storage, and notifications for your app.","directories":{},"sideEffects":false,"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.0","typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.2_1773365374003_0.728984640567736","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@buildspacestudio/sdk","version":"0.2.0","license":"MIT","_id":"@buildspacestudio/sdk@0.2.0","maintainers":[{"name":"bryan_buildspacestudio","email":"bryan@buildspace.studio"},{"name":"willbuildspace","email":"will@buildspace.studio"},{"name":"chad-buildspace-studio","email":"chad@buildspace.studio"}],"dist":{"shasum":"2921bfe9d5cc52417bd0c9a3397f6e6c84d0c940","tarball":"https://registry.npmjs.org/@buildspacestudio/sdk/-/sdk-0.2.0.tgz","fileCount":66,"integrity":"sha512-uU9z6yyxtnPzJnpdUFH5JY6CNicrss+jWdVS9E7j8Cs4GszioWFrA6IIxqV/I0KK83XM7aurjhoF01fyIExBVQ==","signatures":[{"sig":"MEQCIBfJsy1HkahYxweKHv/PGD7GW+WqKJKPBYHWL59JB5waAiBinH/Vvy+B1UflG26lzfEsixuWbzkOuiJgTlgv5bMPgA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":101340},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./auth":{"types":"./dist/auth/index.d.ts","default":"./dist/auth/index.js"},"./client":{"types":"./dist/client/index.d.ts","default":"./dist/client/index.js"},"./events":{"types":"./dist/events/index.d.ts","default":"./dist/events/index.js"},"./storage":{"types":"./dist/storage/index.d.ts","default":"./dist/storage/index.js"},"./notifications":{"types":"./dist/notifications/index.d.ts","default":"./dist/notifications/index.js"}},"gitHead":"73a52d161dafe8c491092d71703e6db0a813acf7","scripts":{"test":"bun run --bun vitest run","build":"tsc","test:watch":"bun run --bun vitest","check-types":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9619908a-7184-4749-b171-3134bbbeba25"}},"_npmVersion":"11.9.0","description":"The official JavaScript/TypeScript SDK for [Buildspace](https://buildspace.studio) — auth, events, storage, and notifications for your app.","directories":{},"sideEffects":false,"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.0","typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.0_1774227177723_0.5926610069058069","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@buildspacestudio/sdk","version":"0.2.1","license":"MIT","_id":"@buildspacestudio/sdk@0.2.1","maintainers":[{"name":"bryan_buildspacestudio","email":"bryan@buildspace.studio"},{"name":"willbuildspace","email":"will@buildspace.studio"},{"name":"chad-buildspace-studio","email":"chad@buildspace.studio"}],"dist":{"shasum":"a8b19998f697d88f2e9c41bc3a1d91dc195ce7d1","tarball":"https://registry.npmjs.org/@buildspacestudio/sdk/-/sdk-0.2.1.tgz","fileCount":66,"integrity":"sha512-TPbt6dxmMyOlSafdTYYj5v368Pz7b5JAz6FgworInB9F0V4jrhSaNbXv3z6Y4sWfrLgfhWeWvwIbImFb5anpvg==","signatures":[{"sig":"MEYCIQD1uwlrMk5APlG2oY47GtXPVcrubIxZtCgM6zs8usXzpwIhAKh+UMieu+D8VCitx61L8CGCMB+T+wcIjDOAU43FX9KQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":101342},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./auth":{"types":"./dist/auth/index.d.ts","default":"./dist/auth/index.js"},"./client":{"types":"./dist/client/index.d.ts","default":"./dist/client/index.js"},"./events":{"types":"./dist/events/index.d.ts","default":"./dist/events/index.js"},"./storage":{"types":"./dist/storage/index.d.ts","default":"./dist/storage/index.js"},"./notifications":{"types":"./dist/notifications/index.d.ts","default":"./dist/notifications/index.js"}},"gitHead":"19ef0dcbc2bc140853257eb67b8cd8cc9837eb61","scripts":{"test":"bun run --bun vitest run","build":"tsc","test:watch":"bun run --bun vitest","check-types":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9619908a-7184-4749-b171-3134bbbeba25"}},"_npmVersion":"11.9.0","description":"The official JavaScript/TypeScript SDK for [Buildspace](https://buildspace.studio) — auth, events, storage, and notifications for your app.","directories":{},"sideEffects":false,"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.0","typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.1_1774281095696_0.6910794567408813","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@buildspacestudio/sdk","version":"0.2.2","license":"MIT","_id":"@buildspacestudio/sdk@0.2.2","maintainers":[{"name":"bryan_buildspacestudio","email":"bryan@buildspace.studio"},{"name":"willbuildspace","email":"will@buildspace.studio"},{"name":"chad-buildspace-studio","email":"chad@buildspace.studio"}],"dist":{"shasum":"4d3a7bf980bb67442102e30f56710d2ad94aa7b7","tarball":"https://registry.npmjs.org/@buildspacestudio/sdk/-/sdk-0.2.2.tgz","fileCount":66,"integrity":"sha512-xL7P+Dz9wm2Fzly6Nv1CNSrDtXbxLcf7B3aIZiuOyW5XfrGUZP/uSGpsOYFtKvlSwdW4Ft1zLir7BlaYpblhFA==","signatures":[{"sig":"MEUCIQDA/prOAJAXw7dILlSg7GnxjVZXvPkuFu1lDBek33Yc5AIgfYMsXsShr/m8Q/nzW6+5dY7Lw+WVIGPhhBQFSnbJIfY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":101342},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./auth":{"types":"./dist/auth/index.d.ts","default":"./dist/auth/index.js"},"./client":{"types":"./dist/client/index.d.ts","default":"./dist/client/index.js"},"./events":{"types":"./dist/events/index.d.ts","default":"./dist/events/index.js"},"./storage":{"types":"./dist/storage/index.d.ts","default":"./dist/storage/index.js"},"./notifications":{"types":"./dist/notifications/index.d.ts","default":"./dist/notifications/index.js"}},"gitHead":"8905139aa8c1258b8a7b1e0756283839389b94da","scripts":{"test":"bun run --bun vitest run","build":"tsc","test:watch":"bun run --bun vitest","check-types":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9619908a-7184-4749-b171-3134bbbeba25"}},"_npmVersion":"11.9.0","description":"The official JavaScript/TypeScript SDK for [Buildspace](https://buildspace.studio) — auth, events, storage, and notifications for your app.","directories":{},"sideEffects":false,"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.0","typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.2_1774472530266_0.3520522010920413","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@buildspacestudio/sdk","version":"0.3.0","license":"MIT","_id":"@buildspacestudio/sdk@0.3.0","maintainers":[{"name":"bryan_buildspacestudio","email":"bryan@buildspace.studio"},{"name":"willbuildspace","email":"will@buildspace.studio"},{"name":"chad-buildspace-studio","email":"chad@buildspace.studio"}],"dist":{"shasum":"4c1672ba386af0e91cf57d7792b28c68101b7263","tarball":"https://registry.npmjs.org/@buildspacestudio/sdk/-/sdk-0.3.0.tgz","fileCount":44,"integrity":"sha512-4zO+uK/qC0/fGktgv5Yt0FhzQJAoUSoc4+m/tU3fNQw6lTxjHnWWusaedzEgmFKn3JAxsuyepZGwfptKuHZkbA==","signatures":[{"sig":"MEUCIFArQ5/RluJVKEia1WvMTA2KEG05WV9UDpmtfxuRAWAdAiEA8WHtWosKd8jknLon1Szfa2NU9SltiAzkiogHufPooHI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":450617},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./auth":{"import":{"types":"./dist/auth/index.d.ts","default":"./dist/auth/index.js"},"require":{"types":"./dist/auth/index.d.cts","default":"./dist/auth/index.cjs"}},"./client":{"import":{"types":"./dist/client/index.d.ts","default":"./dist/client/index.js"},"require":{"types":"./dist/client/index.d.cts","default":"./dist/client/index.cjs"}},"./events":{"import":{"types":"./dist/events/index.d.ts","default":"./dist/events/index.js"},"require":{"types":"./dist/events/index.d.cts","default":"./dist/events/index.cjs"}},"./storage":{"import":{"types":"./dist/storage/index.d.ts","default":"./dist/storage/index.js"},"require":{"types":"./dist/storage/index.d.cts","default":"./dist/storage/index.cjs"}},"./package.json":"./package.json","./notifications":{"import":{"types":"./dist/notifications/index.d.ts","default":"./dist/notifications/index.js"},"require":{"types":"./dist/notifications/index.d.cts","default":"./dist/notifications/index.cjs"}}},"gitHead":"48f4c44476757f14ef25dd42229f2b9540e736c2","scripts":{"test":"bun run --bun vitest run","build":"tsup","test:watch":"bun run --bun vitest","check-types":"tsc --noEmit","check-publish":"bun pm pack --destination .tmp && bunx --bun @arethetypeswrong/cli --pack .tmp"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9619908a-7184-4749-b171-3134bbbeba25"}},"_npmVersion":"11.12.1","description":"The official JavaScript/TypeScript SDK for [Buildspace](https://buildspace.studio) — auth, events, storage, and notifications for your app.","directories":{},"sideEffects":false,"_nodeVersion":"24.15.0","typesVersions":{"*":{"auth":["./dist/auth/index.d.ts"],"client":["./dist/client/index.d.ts"],"events":["./dist/events/index.d.ts"],"storage":["./dist/storage/index.d.ts"],"notifications":["./dist/notifications/index.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^4.1.4","typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.3.0_1776959997097_0.8864443746770077","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@buildspacestudio/sdk","version":"0.4.0","license":"MIT","_id":"@buildspacestudio/sdk@0.4.0","maintainers":[{"name":"bryan_buildspacestudio","email":"bryan@buildspace.studio"},{"name":"willbuildspace","email":"will@buildspace.studio"},{"name":"chad-buildspace-studio","email":"chad@buildspace.studio"}],"dist":{"shasum":"31384a3fc7ad5748a266353f52077157b7db181a","tarball":"https://registry.npmjs.org/@buildspacestudio/sdk/-/sdk-0.4.0.tgz","fileCount":66,"integrity":"sha512-tqwMu1MLxQKqgKq7Ac8a0gimO6cxiOKzBs5NUJcZwlc0AiLMpIX0n0eGFRYrb8CPLh/E/lUwJZ+1iMEc1+dAPA==","signatures":[{"sig":"MEUCIQCJ8GJLGsyRhmz97dOU5Rl47QafFy04/uJWIqSVFSU3nAIgOvsE+v8hr/v/m4y4rxxKd7UsRkyRyBi3fGeaOLim5DI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":706002},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./auth":{"import":{"types":"./dist/auth/index.d.ts","default":"./dist/auth/index.js"},"require":{"types":"./dist/auth/index.d.cts","default":"./dist/auth/index.cjs"}},"./next":{"import":{"types":"./dist/next/index.d.ts","default":"./dist/next/index.js"},"require":{"types":"./dist/next/index.d.cts","default":"./dist/next/index.cjs"}},"./react":{"import":{"types":"./dist/react/index.d.ts","default":"./dist/react/index.js"},"require":{"types":"./dist/react/index.d.cts","default":"./dist/react/index.cjs"}},"./client":{"import":{"types":"./dist/client/index.d.ts","default":"./dist/client/index.js"},"require":{"types":"./dist/client/index.d.cts","default":"./dist/client/index.cjs"}},"./events":{"import":{"types":"./dist/events/index.d.ts","default":"./dist/events/index.js"},"require":{"types":"./dist/events/index.d.cts","default":"./dist/events/index.cjs"}},"./billing":{"import":{"types":"./dist/billing/index.d.ts","default":"./dist/billing/index.js"},"require":{"types":"./dist/billing/index.d.cts","default":"./dist/billing/index.cjs"}},"./storage":{"import":{"types":"./dist/storage/index.d.ts","default":"./dist/storage/index.js"},"require":{"types":"./dist/storage/index.d.cts","default":"./dist/storage/index.cjs"}},"./package.json":"./package.json","./notifications":{"import":{"types":"./dist/notifications/index.d.ts","default":"./dist/notifications/index.js"},"require":{"types":"./dist/notifications/index.d.cts","default":"./dist/notifications/index.cjs"}}},"gitHead":"c2c156743a01d4a4a206a146f1e59e2ef4c49eb2","scripts":{"test":"bun run --bun vitest run","build":"rm -rf dist && tsup","test:watch":"bun run --bun vitest","check-types":"tsc --noEmit","check-publish":"bun pm pack --destination .tmp && bunx --bun @arethetypeswrong/cli --pack .tmp"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9619908a-7184-4749-b171-3134bbbeba25"}},"_npmVersion":"11.16.0","description":"The official JavaScript/TypeScript SDK for [Buildspace](https://buildspace.studio) — auth, events, storage, and notifications for your app.","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","typesVersions":{"*":{"auth":["./dist/auth/index.d.ts"],"next":["./dist/next/index.d.ts"],"react":["./dist/react/index.d.ts"],"client":["./dist/client/index.d.ts"],"events":["./dist/events/index.d.ts"],"billing":["./dist/billing/index.d.ts"],"storage":["./dist/storage/index.d.ts"],"notifications":["./dist/notifications/index.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","react":"^19","vitest":"^4.1.4","typescript":"^5","@types/react":"^19"},"peerDependencies":{"react":">=19"},"peerDependenciesMeta":{"react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.4.0_1783974018780_0.19392816460534745","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@buildspacestudio/sdk","version":"0.5.0","license":"MIT","_id":"@buildspacestudio/sdk@0.5.0","maintainers":[{"name":"bryan_buildspacestudio","email":"bryan@buildspace.studio"},{"name":"willbuildspace","email":"will@buildspace.studio"},{"name":"chad-buildspace-studio","email":"chad@buildspace.studio"}],"dist":{"shasum":"b6a7212beea1a187314f7c655a12db991ed87132","tarball":"https://registry.npmjs.org/@buildspacestudio/sdk/-/sdk-0.5.0.tgz","fileCount":106,"integrity":"sha512-DY3FLoZrjWiLEo61p8pgk5g7znDs9kZ0UUI6UbJ5kxdhQgp8JZqNrMWGY2y8hKPaAvhm+1+vd/o6Dr0F9o5LfA==","signatures":[{"sig":"MEUCIQDGq7BhebktI34Upoksk9Riy71WKKDTyFiE/xlPZS7WGAIgGtWETzda8RS9CQg9rlvrEo2U5kl289oMPm9CaFxIeoA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQDerZlrzSBKz5JFIVnSTl00ovDoGlxv7EcrfpJdbJzBNQIgYRoUwd8hEYaqJIfDTM0RpEgiZVB9ECxTdBt5Sa3T1rU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":596774},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./auth":{"import":{"types":"./dist/auth/index.d.ts","default":"./dist/auth/index.js"},"require":{"types":"./dist/auth/index.d.cts","default":"./dist/auth/index.cjs"}},"./next":{"import":{"types":"./dist/next/index.d.ts","default":"./dist/next/index.js"},"require":{"types":"./dist/next/index.d.cts","default":"./dist/next/index.cjs"}},"./react":{"import":{"types":"./dist/react/index.d.ts","default":"./dist/react/index.js"},"require":{"types":"./dist/react/index.d.cts","default":"./dist/react/index.cjs"}},"./client":{"import":{"types":"./dist/client/index.d.ts","default":"./dist/client/index.js"},"require":{"types":"./dist/client/index.d.cts","default":"./dist/client/index.cjs"}},"./events":{"import":{"types":"./dist/events/index.d.ts","default":"./dist/events/index.js"},"require":{"types":"./dist/events/index.d.cts","default":"./dist/events/index.cjs"}},"./billing":{"import":{"types":"./dist/billing/index.d.ts","default":"./dist/billing/index.js"},"require":{"types":"./dist/billing/index.d.cts","default":"./dist/billing/index.cjs"}},"./storage":{"import":{"types":"./dist/storage/index.d.ts","default":"./dist/storage/index.js"},"require":{"types":"./dist/storage/index.d.cts","default":"./dist/storage/index.cjs"}},"./package.json":"./package.json","./notifications":{"import":{"types":"./dist/notifications/index.d.ts","default":"./dist/notifications/index.js"},"require":{"types":"./dist/notifications/index.d.cts","default":"./dist/notifications/index.cjs"}}},"gitHead":"b3e1bef3d3bce8daffd0c8a0a4a6f2ee75b59f5d","scripts":{"test":"bun run --bun vitest run","build":"rm -rf dist && tsdown","test:watch":"bun run --bun vitest","check-types":"tsc --noEmit","check-publish":"rm -rf .tmp && bun pm pack --destination .tmp && bunx --bun @arethetypeswrong/cli .tmp/*.tgz; status=$?; rm -rf .tmp; exit $status"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9619908a-7184-4749-b171-3134bbbeba25"}},"_npmVersion":"11.19.0","description":"The official JavaScript/TypeScript SDK for [Buildspace](https://buildspace.studio) — auth, events, storage, and notifications for your app.","directories":{},"sideEffects":false,"_nodeVersion":"24.21.0","typesVersions":{"*":{"auth":["./dist/auth/index.d.ts"],"next":["./dist/next/index.d.ts"],"react":["./dist/react/index.d.ts"],"client":["./dist/client/index.d.ts"],"events":["./dist/events/index.d.ts"],"billing":["./dist/billing/index.d.ts"],"storage":["./dist/storage/index.d.ts"],"notifications":["./dist/notifications/index.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.2.8","unrun":"^0.3.1","tsdown":"^0.22.14","vitest":"^5.0.1","typescript":"^7.0.2","@types/react":"^19.2.18"},"peerDependencies":{"react":">=19.2.8"},"peerDependenciesMeta":{"react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.5.0_1790386906305_0.5807811435514809","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@buildspacestudio/sdk","version":"0.6.0","license":"MIT","_id":"@buildspacestudio/sdk@0.6.0","maintainers":[{"name":"bryan_buildspacestudio","email":"bryan@buildspace.studio"},{"name":"willbuildspace","email":"will@buildspace.studio"},{"name":"chad-buildspace-studio","email":"chad@buildspace.studio"}],"dist":{"shasum":"ef7786b0fd4446ba6800094cac648cbf19582c0e","tarball":"https://registry.npmjs.org/@buildspacestudio/sdk/-/sdk-0.6.0.tgz","fileCount":106,"integrity":"sha512-JC8neHfOYtE4ITWhAKJnOkBGr/h1OLBrYrnRGdLVTbvvljlOIn9h8H8+1UXh454u092M0ryu+SUOwpnj3L6ppQ==","signatures":[{"sig":"MEUCIQDl7P/Ics47FNfxyScq35qpQYJW7ld1ZTkavaXcU6OSqQIgIjMBsqjckULDP6LaRYgWX9WvHXnIH/7u2ZvK9/fK/+Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIGWti6YkxXTbggYYH4iUPQpHvhTHjpGxG7JUoE50gPFiAiBcKsn3FtquRbsViCOV1EaERY9YselB9obGJK1vUyVr6Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":611306},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./auth":{"import":{"types":"./dist/auth/index.d.ts","default":"./dist/auth/index.js"},"require":{"types":"./dist/auth/index.d.cts","default":"./dist/auth/index.cjs"}},"./next":{"import":{"types":"./dist/next/index.d.ts","default":"./dist/next/index.js"},"require":{"types":"./dist/next/index.d.cts","default":"./dist/next/index.cjs"}},"./react":{"import":{"types":"./dist/react/index.d.ts","default":"./dist/react/index.js"},"require":{"types":"./dist/react/index.d.cts","default":"./dist/react/index.cjs"}},"./client":{"import":{"types":"./dist/client/index.d.ts","default":"./dist/client/index.js"},"require":{"types":"./dist/client/index.d.cts","default":"./dist/client/index.cjs"}},"./events":{"import":{"types":"./dist/events/index.d.ts","default":"./dist/events/index.js"},"require":{"types":"./dist/events/index.d.cts","default":"./dist/events/index.cjs"}},"./billing":{"import":{"types":"./dist/billing/index.d.ts","default":"./dist/billing/index.js"},"require":{"types":"./dist/billing/index.d.cts","default":"./dist/billing/index.cjs"}},"./storage":{"import":{"types":"./dist/storage/index.d.ts","default":"./dist/storage/index.js"},"require":{"types":"./dist/storage/index.d.cts","default":"./dist/storage/index.cjs"}},"./package.json":"./package.json","./notifications":{"import":{"types":"./dist/notifications/index.d.ts","default":"./dist/notifications/index.js"},"require":{"types":"./dist/notifications/index.d.cts","default":"./dist/notifications/index.cjs"}}},"gitHead":"1fe86cb33f933e82619466922deae67b3f30fb7e","scripts":{"test":"bun run --bun vitest run","build":"rm -rf dist && tsdown","test:watch":"bun run --bun vitest","check-types":"tsc --noEmit","check-publish":"rm -rf .tmp && bun pm pack --destination .tmp && bunx --bun @arethetypeswrong/cli .tmp/*.tgz; status=$?; rm -rf .tmp; exit $status"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9619908a-7184-4749-b171-3134bbbeba25"}},"_npmVersion":"11.19.0","description":"The official JavaScript/TypeScript SDK for [Buildspace](https://buildspace.studio) — auth, events, storage, and notifications for your app.","directories":{},"sideEffects":false,"_nodeVersion":"24.21.0","typesVersions":{"*":{"auth":["./dist/auth/index.d.ts"],"next":["./dist/next/index.d.ts"],"react":["./dist/react/index.d.ts"],"client":["./dist/client/index.d.ts"],"events":["./dist/events/index.d.ts"],"billing":["./dist/billing/index.d.ts"],"storage":["./dist/storage/index.d.ts"],"notifications":["./dist/notifications/index.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.2.8","unrun":"^0.3.1","tsdown":"^0.22.14","vitest":"^5.0.1","typescript":"^7.0.2","@types/react":"^19.2.18"},"peerDependencies":{"react":">=19.2.8"},"peerDependenciesMeta":{"react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.6.0_1790560637776_0.20001868207650841","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"_id":"@buildspacestudio/sdk@0.7.0","dist":{"shasum":"e65965d9c18ff2c45334f5382bbcc5b7f29396e6","tarball":"https://registry.npmjs.org/@buildspacestudio/sdk/-/sdk-0.7.0.tgz","fileCount":106,"integrity":"sha512-VP4or75EIDYx9pKt5W0W+B9+36lrbtVYifENnV/Kk6JhiQd7Sx3rYv3vkkgWpODGGoA73kgtbXH9YwPuny92CA==","signatures":[{"sig":"MEUCIBcU/yCCLK9NiMC89wnIxlHNVC23geVQ9A78lKHfERZ1AiEAmOXLIu+4At2dI2oI7kfuHBmfTLHVxppaU8Gf5S4ja3I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDoYCGGV/Zo8xsZPG/Z3wmMw6RVcmtRxbdTi6Wk7nA17wIgf72S00AS8q0PDlANAxCgLNQcI8DxygmECy9tNvFpIog="}],"unpackedSize":617520},"main":"./dist/index.cjs","name":"@buildspacestudio/sdk","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./auth":{"import":{"types":"./dist/auth/index.d.ts","default":"./dist/auth/index.js"},"require":{"types":"./dist/auth/index.d.cts","default":"./dist/auth/index.cjs"}},"./next":{"import":{"types":"./dist/next/index.d.ts","default":"./dist/next/index.js"},"require":{"types":"./dist/next/index.d.cts","default":"./dist/next/index.cjs"}},"./react":{"import":{"types":"./dist/react/index.d.ts","default":"./dist/react/index.js"},"require":{"types":"./dist/react/index.d.cts","default":"./dist/react/index.cjs"}},"./client":{"import":{"types":"./dist/client/index.d.ts","default":"./dist/client/index.js"},"require":{"types":"./dist/client/index.d.cts","default":"./dist/client/index.cjs"}},"./events":{"import":{"types":"./dist/events/index.d.ts","default":"./dist/events/index.js"},"require":{"types":"./dist/events/index.d.cts","default":"./dist/events/index.cjs"}},"./billing":{"import":{"types":"./dist/billing/index.d.ts","default":"./dist/billing/index.js"},"require":{"types":"./dist/billing/index.d.cts","default":"./dist/billing/index.cjs"}},"./storage":{"import":{"types":"./dist/storage/index.d.ts","default":"./dist/storage/index.js"},"require":{"types":"./dist/storage/index.d.cts","default":"./dist/storage/index.cjs"}},"./package.json":"./package.json","./notifications":{"import":{"types":"./dist/notifications/index.d.ts","default":"./dist/notifications/index.js"},"require":{"types":"./dist/notifications/index.d.cts","default":"./dist/notifications/index.cjs"}}},"gitHead":"e4ff61abc45aac3c466a4b8d4643199f62f2e304","license":"MIT","scripts":{"test":"bun run --bun vitest run","build":"rm -rf dist && tsdown","test:watch":"bun run --bun vitest","check-types":"tsc --noEmit","check-publish":"rm -rf .tmp && bun pm pack --destination .tmp && bunx --bun @arethetypeswrong/cli .tmp/*.tgz; status=$?; rm -rf .tmp; exit $status"},"version":"0.7.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"9619908a-7184-4749-b171-3134bbbeba25"}},"_npmVersion":"11.19.0","description":"The official JavaScript/TypeScript SDK for [Buildspace](https://buildspace.studio) — auth, events, storage, and notifications for your app.","directories":{},"maintainers":[{"name":"bryan_buildspacestudio","email":"bryan@buildspace.studio"},{"name":"willbuildspace","email":"will@buildspace.studio"},{"name":"chad-buildspace-studio","email":"chad@buildspace.studio"}],"sideEffects":false,"_nodeVersion":"24.21.0","typesVersions":{"*":{"auth":["./dist/auth/index.d.ts"],"next":["./dist/next/index.d.ts"],"react":["./dist/react/index.d.ts"],"client":["./dist/client/index.d.ts"],"events":["./dist/events/index.d.ts"],"billing":["./dist/billing/index.d.ts"],"storage":["./dist/storage/index.d.ts"],"notifications":["./dist/notifications/index.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.2.8","unrun":"^0.3.1","tsdown":"^0.22.14","vitest":"^5.0.1","typescript":"^7.0.2","@types/react":"^19.2.18"},"peerDependencies":{"react":">=19.2.8"},"peerDependenciesMeta":{"react":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.7.0_1790729332853_0.10453789032153993"}}},"time":{"created":"2026-03-12T02:55:16.666Z","modified":"2026-09-30T00:48:53.117Z","0.1.0":"2026-03-12T02:55:16.929Z","0.1.1":"2026-03-12T20:24:26.699Z","0.1.2":"2026-03-13T01:29:34.142Z","0.2.0":"2026-03-23T00:52:57.858Z","0.2.1":"2026-03-23T15:51:35.850Z","0.2.2":"2026-03-25T21:02:10.438Z","0.3.0":"2026-04-23T15:59:57.295Z","0.4.0":"2026-07-13T20:20:19.002Z","0.5.0":"2026-09-26T01:41:46.452Z","0.6.0":"2026-09-28T01:57:17.875Z","0.7.0":"2026-09-30T00:48:52.934Z"},"license":"MIT","description":"The official JavaScript/TypeScript SDK for [Buildspace](https://buildspace.studio) — auth, events, storage, and notifications for your app.","maintainers":[{"name":"bryan_buildspacestudio","email":"bryan@buildspace.studio"},{"name":"willbuildspace","email":"will@buildspace.studio"},{"name":"chad-buildspace-studio","email":"chad@buildspace.studio"}],"readme":"# @buildspacestudio/sdk\n\nThe official JavaScript/TypeScript SDK for [Buildspace](https://buildspace.studio) — auth, events, storage, and notifications for your app.\n\n## Installation\n\n```bash\nnpm install @buildspacestudio/sdk\n# or\nbun add @buildspacestudio/sdk\n```\n\n## Quick start\n\nThe SDK has two entrypoints depending on where your code runs:\n\n| Entrypoint | Key type | Use in |\n|---|---|---|\n| `@buildspacestudio/sdk` | Secret key (`bs_sec_*`) | Server / Node.js / Edge functions |\n| `@buildspacestudio/sdk/client` | Publishable key (`bs_pub_*`) | Browser / React / client components |\n\n### Server SDK\n\n```ts\nimport Buildspace from \"@buildspacestudio/sdk\";\n\nconst buildspace = new Buildspace(process.env.BUILDSPACE_SECRET_KEY!);\n```\n\n### Client SDK\n\n```ts\nimport { createClient } from \"@buildspacestudio/sdk/client\";\n\nconst buildspace = createClient(process.env.NEXT_PUBLIC_BUILDSPACE_KEY!);\n```\n\n---\n\n## Auth\n\n### Server — handle OAuth callback\n\n```ts\n// In your callback route handler:\nconst tokens = await buildspace.auth.handleCallback(request);\n// tokens.access_token, tokens.user\n\n// Verify a session\nconst session = await buildspace.auth.getSession(sessionToken);\nif (!session) {\n  // invalid or expired\n}\n\n// Sign out\nawait buildspace.auth.signOut(sessionToken);\n```\n\n### Client — generate sign-in / sign-up URLs\n\n```ts\nconst signInUrl = buildspace.auth.getSignInUrl({\n  redirectUri: \"https://yourapp.com/auth/callback\",\n  appSlug: \"my-app\", // optional\n});\n\nconst signUpUrl = buildspace.auth.getSignUpUrl({\n  redirectUri: \"https://yourapp.com/auth/callback\",\n});\n```\n\n### Next.js adapter (`@buildspacestudio/sdk/next`)\n\nSkip the hand-rolled auth routes — the adapter standardizes the `bs_session` cookie and ships route-handler factories for the whole flow. Works with any framework using web-standard `Request`/`Response` handlers.\n\n```ts\n// app/api/auth/callback/route.ts\nimport { createAuthCallback } from \"@buildspacestudio/sdk/next\";\nimport { buildspace } from \"@/lib/buildspace\";\n\nexport const GET = createAuthCallback(buildspace, {\n  redirectTo: \"/dashboard\",\n  onSignIn: async ({ user }) => {\n    // first-class place for signup side effects (upsert user, welcome email)\n  },\n});\n\n// app/api/auth/logout/route.ts\nimport { createLogoutRoute } from \"@buildspacestudio/sdk/next\";\nexport const POST = createLogoutRoute(buildspace);\n\n// app/api/auth/session/route.ts\nimport { createSessionRoute } from \"@buildspacestudio/sdk/next\";\nexport const GET = createSessionRoute(buildspace);\n```\n\nRead the session anywhere on the server:\n\n```ts\nimport { cookies } from \"next/headers\";\nimport { getSession, requireSession } from \"@buildspacestudio/sdk/next\";\n\nconst session = await getSession(buildspace, await cookies()); // null when signed out\nconst { user, token } = await requireSession(buildspace, request); // throws 401 BuildspaceError\n```\n\nProtect routes in middleware with a fast cookie-presence check:\n\n```ts\n// middleware.ts\nimport { createSessionCookieGuard } from \"@buildspacestudio/sdk/next\";\n\nexport const middleware = createSessionCookieGuard({ redirectTo: \"/\" });\nexport const config = { matcher: [\"/dashboard/:path*\"] };\n```\n\n### React bindings (`@buildspacestudio/sdk/react`)\n\n```tsx\n\"use client\";\nimport { createClient } from \"@buildspacestudio/sdk/client\";\nimport { BuildspaceProvider, useAuth, useTrack } from \"@buildspacestudio/sdk/react\";\n\nconst client = createClient(process.env.NEXT_PUBLIC_BUILDSPACE_PUBLISHABLE_KEY!);\n\n// Wrap your app (pass the server-resolved user for a flash-free first paint)\n<BuildspaceProvider client={client} initialUser={initialUser}>\n  {children}\n</BuildspaceProvider>;\n\n// Anywhere below the provider:\nfunction UserMenu() {\n  const { user, signIn, signOut } = useAuth();\n  const track = useTrack(); // fire-and-forget analytics, never throws\n  // ...\n}\n```\n\n`react >= 19` is an optional peer dependency — only needed if you import `/react`.\n\n---\n\n## Events\n\nTrack user and system events for analytics.\n\n### Server\n\n```ts\n// Single event\nawait buildspace.events.track(\"user.signed_up\", { plan: \"pro\" }, userId);\n\n// Batch\nawait buildspace.events.batchTrack([\n  { event: \"page.viewed\", properties: { path: \"/dashboard\" }, actor_id: userId },\n  { event: \"feature.used\", properties: { feature: \"export\" }, actor_id: userId },\n]);\n```\n\n### Client (batched, auto-flushed)\n\n```ts\n// Fire and forget — events are queued and flushed in batches\nbuildspace.events.track(\"button.clicked\", { label: \"upgrade\" });\n\n// Flush immediately (e.g. before page unload)\nawait buildspace.events.flush();\n\n// Graceful shutdown\nawait buildspace.events.shutdown();\n```\n\nConfigure batching behavior:\n\n```ts\nconst buildspace = createClient(key, {\n  events: {\n    flushInterval: 3000, // ms, default 5000\n    maxBatchSize: 50,    // default 20\n  },\n});\n```\n\n---\n\n## Storage\n\nUpload and manage files.\n\n### Server — get a pre-signed upload URL\n\n```ts\nconst { upload_url, key } = await buildspace.storage.getUploadUrl({\n  key: \"avatars/user-123.png\",\n  contentType: \"image/png\",\n  size: file.size,\n});\n\n// Upload directly to the signed URL\nawait fetch(upload_url, { method: \"PUT\", body: file });\n\n// Get a signed download URL\nconst { url } = await buildspace.storage.getSignedUrl(key, { expiresIn: 3600 });\n\n// List objects\nconst { objects } = await buildspace.storage.list(\"avatars/\");\n\n// Delete\nawait buildspace.storage.delete(key);\n\n// Check usage\nconst { storageBytes, objectCount } = await buildspace.storage.getUsage();\n```\n\n### Client — upload a File/Blob directly\n\n```ts\nconst { key, url } = await buildspace.storage.upload(file, {\n  path: \"avatars/user-123.png\",\n  contentType: \"image/png\", // optional, inferred from File if omitted\n});\n```\n\n---\n\n## Billing\n\nStripe-backed subscriptions on the creator's connected account: Checkout, the customer portal, and entitlement checks.\n\n### Server\n\n```ts\n// Is billing configured for this app environment?\nconst status = await buildspace.billing.getStatus();\n// status.enabled, status.status (\"disabled\" | \"setup_required\" | \"active\" | \"paused\"),\n// status.testMode — render a \"Test mode\" banner when true\n\n// Catalog\nconst { products } = await buildspace.billing.listProducts();\nconst { prices } = await buildspace.billing.listPrices();\n\n// Send a user to Stripe Checkout\nconst { url } = await buildspace.billing.createCheckout({\n  userId,                 // or appUserId for your own auth system\n  priceId: price.id,      // or lookupKey\n  successUrl: \"https://yourapp.com/billing?status=success\",\n  cancelUrl: \"https://yourapp.com/billing\",\n});\n\n// Stripe-hosted customer portal (manage/cancel subscription)\nconst portal = await buildspace.billing.createPortalSession({\n  userId,\n  returnUrl: \"https://yourapp.com/billing\",\n});\n\n// Subscription + entitlement state\nconst { subscription } = await buildspace.billing.getSubscription({ userId });\nconst { active } = await buildspace.billing.getEntitlements({ userId });\nif (active) {\n  // gate paid features here\n}\n```\n\n### Client\n\n```ts\n// List prices, then send the signed-in user to Checkout or the portal\nconst { prices } = await buildspace.billing.listPrices();\n\nawait buildspace.billing.redirectToCheckout({\n  priceId,\n  successUrl: `${location.origin}/billing?status=success`,\n  cancelUrl: `${location.origin}/billing`,\n});\n\nawait buildspace.billing.manageSubscription({\n  returnUrl: `${location.origin}/billing`,\n});\n```\n\n---\n\n## Notifications\n\nSend transactional emails. **Server only.**\n\n```ts\n// Send a custom email\nawait buildspace.notifications.send({\n  to: \"user@example.com\",\n  subject: \"Welcome to Buildspace\",\n  html: \"<h1>You're in!</h1>\",\n  text: \"You're in!\", // optional plain-text fallback\n  replyTo: \"support@yourapp.com\",\n});\n\n// Send from a saved template\nawait buildspace.notifications.sendTemplate(\"welcome-email\", {\n  to: \"user@example.com\",\n  variables: { firstName: \"Alex\", plan: \"Pro\" },\n});\n```\n\n---\n\n## Sessions\n\nAttach a session token to scope requests to a specific user:\n\n```ts\nbuildspace.setSession(sessionToken);\n\n// All subsequent requests carry the session\nconst session = await buildspace.auth.getSession(sessionToken);\n\n// Sign out and clear the SDK's stored session\nawait buildspace.auth.signOut();\n```\n\n---\n\n## Error handling\n\nAll errors throw a `BuildspaceError`:\n\n```ts\nimport { BuildspaceError } from \"@buildspacestudio/sdk\";\n\ntry {\n  await buildspace.auth.getSession(token);\n} catch (err) {\n  if (err instanceof BuildspaceError) {\n    console.error(err.service, err.code, err.status, err.message);\n  }\n}\n```\n\n---\n\n## Configuration\n\nBoth `new Buildspace()` and `createClient()` accept an optional config object:\n\n```ts\nconst buildspace = new Buildspace(secretKey, {\n  baseUrl: \"https://api.buildspace.studio\", // default\n  loginUrl: \"https://login.buildspace.studio\", // default\n  version: \"2025-06-01\", // API version\n  fetch: customFetch, // inject a custom fetch implementation\n});\n```\n\n---\n\n## TypeScript\n\nThe SDK is written in TypeScript and ships full type definitions. No `@types` package needed.\n\n---\n\n## License\n\nMIT\n","readmeFilename":"README.md"}