{"_id":"@allo8/as2-platform-sdk","_rev":"9-deababba9a705719ad12dd065ac0e5de","name":"@allo8/as2-platform-sdk","dist-tags":{"latest":"0.0.8"},"versions":{"0.0.2":{"name":"@allo8/as2-platform-sdk","version":"0.0.2","license":"MIT","_id":"@allo8/as2-platform-sdk@0.0.2","maintainers":[{"name":"as-developer","email":"developers@allocatespace.co"}],"dist":{"shasum":"3f1da0dab82a18a9aa6b5b6c67a965e20436a200","tarball":"https://registry.npmjs.org/@allo8/as2-platform-sdk/-/as2-platform-sdk-0.0.2.tgz","fileCount":18,"integrity":"sha512-tqcfN4H6/+RSRScuCKfIxmgZfCvu0ksItEwYghFHyJQy1fGKkMKt33EJrzfp92JwNgIGRUpza8ll8qAg0sKevQ==","signatures":[{"sig":"MEUCIG0v/rwbbesJqOpmxuSu1PrGG1EKOTzqlw0urSzrqPe1AiEAhNrYpPc/us6M1dYnE/MrWYwCN1oO9DvRYr4sWOhodjY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":93989},"type":"module","_from":"file:allo8-as2-platform-sdk-0.0.2.tgz","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","default":"./dist/index.mjs","require":"./dist/index.mjs"}},"scripts":{"dev":"concurrently \"tsdown --watch\" \"rollup -c rollup.dts.config.ts --watch\"","lint":"eslint . --max-warnings 0","check-types":"tsc --noEmit","build:packages":"tsdown && rollup -c rollup.dts.config.ts"},"_npmUser":{"name":"as-developer","email":"developers@allocatespace.co"},"_resolved":"/private/var/folders/47/flbj6lrn7hs8vwp2jw9psl000000gn/T/c797d132b888fc9cca046c96758fec05/allo8-as2-platform-sdk-0.0.2.tgz","_integrity":"sha512-tqcfN4H6/+RSRScuCKfIxmgZfCvu0ksItEwYghFHyJQy1fGKkMKt33EJrzfp92JwNgIGRUpza8ll8qAg0sKevQ==","_npmVersion":"11.10.1","description":"Official SDK for the AS2 platform — typed tRPC and Better Auth clients from a single class.","directories":{},"_nodeVersion":"25.7.0","dependencies":{"zod":"^4.1.11","superjson":"^2.2.1","better-auth":"1.5.5","@trpc/client":"^11.1.2","@trpc/server":"^11.1.2","@better-fetch/fetch":"^1.1.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.39.1","rollup":"^4.62.2","tsdown":"^0.21.1","typescript":"5.8.2","@types/node":"^24.10.1","@types/react":"^19.2.3","concurrently":"^9.1.2","@repo/schemas":"0.0.0","@repo/app-auth":"0.0.14","@repo/base-trpc":"0.0.36","@repo/constants":"1.0.0","@repo/checks-trpc":"0.0.11","rollup-plugin-dts":"^6.4.1","@repo/eslint-config":"0.0.0","@repo/typescript-config":"0.0.0","@rollup/plugin-node-resolve":"^16.0.3"},"_npmOperationalInternal":{"tmp":"tmp/as2-platform-sdk_0.0.2_1784628200724_0.0411076197278768","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@allo8/as2-platform-sdk","version":"0.0.3","license":"MIT","_id":"@allo8/as2-platform-sdk@0.0.3","maintainers":[{"name":"as-developer","email":"developers@allocatespace.co"}],"dist":{"shasum":"f20b8a8d47bd9afec7fa63cba07ed89c7d505f50","tarball":"https://registry.npmjs.org/@allo8/as2-platform-sdk/-/as2-platform-sdk-0.0.3.tgz","fileCount":17,"integrity":"sha512-GpxdHRv62ZhxqaymtH51/aHzUjrrl4rGREN5G7iPCWygfYoIuneIUNN+1K0N70MkPe4WsuAGRCwuwMXXERLy+g==","signatures":[{"sig":"MEYCIQDB/7FICuJ1GXqgmiMYQmRpiyie70VgKv3o8k8XjKo5ZAIhAMyfuUzJGUWNRkLAWbw4pq65rsYS81rFJ9knQ33wxoeQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":85316},"type":"module","_from":"file:allo8-as2-platform-sdk-0.0.3.tgz","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","default":"./dist/index.mjs","require":"./dist/index.mjs"}},"scripts":{"dev":"concurrently \"tsdown --watch\" \"rollup -c rollup.dts.config.ts --watch\"","lint":"eslint . --max-warnings 0","check-types":"tsc --noEmit","build:packages":"tsdown && rollup -c rollup.dts.config.ts"},"_npmUser":{"name":"as-developer","email":"developers@allocatespace.co"},"_resolved":"/private/var/folders/47/flbj6lrn7hs8vwp2jw9psl000000gn/T/b8421788eeab0c8ead317afb62dd7aa9/allo8-as2-platform-sdk-0.0.3.tgz","_integrity":"sha512-GpxdHRv62ZhxqaymtH51/aHzUjrrl4rGREN5G7iPCWygfYoIuneIUNN+1K0N70MkPe4WsuAGRCwuwMXXERLy+g==","_npmVersion":"11.10.1","description":"Official SDK for the AS2 platform — typed tRPC and Better Auth clients from a single class.","directories":{},"_nodeVersion":"25.7.0","dependencies":{"zod":"^4.1.11","superjson":"^2.2.1","better-auth":"1.5.5","@trpc/client":"^11.1.2","@trpc/server":"^11.1.2","@better-fetch/fetch":"^1.1.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.39.1","rollup":"^4.62.2","tsdown":"^0.21.1","typescript":"5.8.2","@types/node":"^24.10.1","@types/react":"^19.2.3","concurrently":"^9.1.2","@repo/schemas":"0.0.0","@repo/app-auth":"0.0.14","@repo/base-trpc":"0.0.36","@repo/constants":"1.0.0","@repo/checks-trpc":"0.0.11","rollup-plugin-dts":"^6.4.1","@repo/eslint-config":"0.0.0","@repo/typescript-config":"0.0.0","@rollup/plugin-node-resolve":"^16.0.3"},"_npmOperationalInternal":{"tmp":"tmp/as2-platform-sdk_0.0.3_1785829166913_0.18272376249938427","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@allo8/as2-platform-sdk","version":"0.0.4","license":"MIT","_id":"@allo8/as2-platform-sdk@0.0.4","maintainers":[{"name":"as-developer","email":"developers@allocatespace.co"}],"dist":{"shasum":"bb01ed0a5ea6097ff1dd71e2d5c8cd9411cdf1e2","tarball":"https://registry.npmjs.org/@allo8/as2-platform-sdk/-/as2-platform-sdk-0.0.4.tgz","fileCount":17,"integrity":"sha512-5/DGebNNctVlwOjntIhQMg/G6prTqg4WI9/x+K0zdj9mGPIfVc9KuMH7won41ZNrESWlkqeAaKwo3nuq+Zmx0Q==","signatures":[{"sig":"MEUCIFM/bIFXcdXf4dTlqXNlyjrHkrUOUQwn1KxwpMlgYMN7AiEA7b+T9Jfy6hXhr/o1+bbIKjhw+K/+7Ym9hoaPQBPumpc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":84841},"type":"module","_from":"file:allo8-as2-platform-sdk-0.0.4.tgz","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","default":"./dist/index.mjs","require":"./dist/index.mjs"}},"scripts":{"dev":"concurrently \"tsdown --watch\" \"rollup -c rollup.dts.config.ts --watch\"","lint":"eslint . --max-warnings 0","check-types":"tsc --noEmit","build:packages":"tsdown && rollup -c rollup.dts.config.ts"},"_npmUser":{"name":"as-developer","email":"developers@allocatespace.co"},"_resolved":"/private/var/folders/47/flbj6lrn7hs8vwp2jw9psl000000gn/T/c95d48a674bf4a5ae84fa44e31f543ff/allo8-as2-platform-sdk-0.0.4.tgz","_integrity":"sha512-5/DGebNNctVlwOjntIhQMg/G6prTqg4WI9/x+K0zdj9mGPIfVc9KuMH7won41ZNrESWlkqeAaKwo3nuq+Zmx0Q==","_npmVersion":"11.10.1","description":"Official SDK for the AS2 platform — typed tRPC and Better Auth clients from a single class.","directories":{},"_nodeVersion":"25.7.0","dependencies":{"zod":"^4.1.11","superjson":"^2.2.1","better-auth":"1.5.5","@trpc/client":"^11.1.2","@trpc/server":"^11.1.2","@better-fetch/fetch":"^1.1.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.39.1","rollup":"^4.62.2","tsdown":"^0.21.1","typescript":"5.8.2","@types/node":"^24.10.1","@types/react":"^19.2.3","concurrently":"^9.1.2","@repo/schemas":"0.0.0","@repo/app-auth":"0.0.14","@repo/base-trpc":"0.0.36","@repo/constants":"1.0.0","@repo/checks-trpc":"0.0.11","rollup-plugin-dts":"^6.4.1","@repo/eslint-config":"0.0.0","@repo/typescript-config":"0.0.0","@rollup/plugin-node-resolve":"^16.0.3"},"_npmOperationalInternal":{"tmp":"tmp/as2-platform-sdk_0.0.4_1785837833461_0.6202760262911333","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@allo8/as2-platform-sdk","version":"0.0.5","license":"MIT","_id":"@allo8/as2-platform-sdk@0.0.5","maintainers":[{"name":"as-developer","email":"developers@allocatespace.co"}],"dist":{"shasum":"c41b56f2c69f16bb0f08e23f479e09f26a74f747","tarball":"https://registry.npmjs.org/@allo8/as2-platform-sdk/-/as2-platform-sdk-0.0.5.tgz","fileCount":18,"integrity":"sha512-4ICSO0/n3QbZMMFE+IgHJUQYMI9gNbC7EoMkrHz+X1U4cv9hDS204zO9lWlnJOY2awtTl5qNuoZVLPs1+z9jgQ==","signatures":[{"sig":"MEUCIDzMho6Dch2vspRGmnaTRTiPRNKQcFsbzU8qa1OiDKuXAiEA5rX6W+a9Mh+p9mvP56BxBjuhBZzCk5MObjdx6D0ktIc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":103376},"type":"module","_from":"file:allo8-as2-platform-sdk-0.0.5.tgz","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","default":"./dist/index.mjs","require":"./dist/index.mjs"}},"scripts":{"dev":"concurrently \"tsdown --watch\" \"rollup -c rollup.dts.config.ts --watch\"","lint":"eslint . --max-warnings 0","check-types":"tsc --noEmit","build:packages":"tsdown && rollup -c rollup.dts.config.ts"},"_npmUser":{"name":"as-developer","email":"developers@allocatespace.co"},"_resolved":"/private/var/folders/47/flbj6lrn7hs8vwp2jw9psl000000gn/T/4d3b53f3f5eb516e3c909667c3885586/allo8-as2-platform-sdk-0.0.5.tgz","_integrity":"sha512-4ICSO0/n3QbZMMFE+IgHJUQYMI9gNbC7EoMkrHz+X1U4cv9hDS204zO9lWlnJOY2awtTl5qNuoZVLPs1+z9jgQ==","_npmVersion":"11.10.1","description":"Official SDK for the AS2 platform — typed tRPC and Better Auth clients from a single class.","directories":{},"_nodeVersion":"25.7.0","dependencies":{"zod":"^4.1.11","superjson":"^2.2.1","better-auth":"1.5.5","@trpc/client":"^11.1.2","@trpc/server":"^11.1.2","@better-fetch/fetch":"^1.1.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.39.1","rollup":"^4.62.2","tsdown":"^0.21.1","typescript":"5.8.2","@types/node":"^24.10.1","@types/react":"^19.2.3","concurrently":"^9.1.2","@repo/schemas":"0.0.0","@repo/app-auth":"0.0.14","@repo/base-trpc":"0.0.36","@repo/constants":"1.0.0","@repo/checks-trpc":"0.0.11","rollup-plugin-dts":"^6.4.1","@repo/eslint-config":"0.0.0","@repo/typescript-config":"0.0.0","@rollup/plugin-node-resolve":"^16.0.3"},"_npmOperationalInternal":{"tmp":"tmp/as2-platform-sdk_0.0.5_1785891528346_0.06964567818640832","host":"s3://npm-registry-packages-npm-production"}},"0.0.6":{"name":"@allo8/as2-platform-sdk","version":"0.0.6","license":"MIT","_id":"@allo8/as2-platform-sdk@0.0.6","maintainers":[{"name":"as-developer","email":"developers@allocatespace.co"}],"dist":{"shasum":"df2a21091dcf1a5e158e131fd1b381023932c4e9","tarball":"https://registry.npmjs.org/@allo8/as2-platform-sdk/-/as2-platform-sdk-0.0.6.tgz","fileCount":18,"integrity":"sha512-Cdnmru2MF46fk3q0JnxbMztiJO7cBlZVRtszRmkkan772xM/i6ZF22uLyBnE50zHhyABsD9hRdC3oQt2Tudkcg==","signatures":[{"sig":"MEUCIQC0rHjk5DQ7ubvFMdJz8WmaUAA8USBvgcZ1xlwvOH+hJQIgNY636FoPEIbqcUmRVze6Q69sxfAtkM55eWL6TzIwi0Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":98817},"type":"module","_from":"file:allo8-as2-platform-sdk-0.0.6.tgz","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","default":"./dist/index.mjs","require":"./dist/index.mjs"}},"scripts":{"dev":"concurrently \"tsdown --watch\" \"rollup -c rollup.dts.config.ts --watch\"","lint":"eslint . --max-warnings 0","check-types":"tsc --noEmit","build:packages":"tsdown && rollup -c rollup.dts.config.ts"},"_npmUser":{"name":"as-developer","email":"developers@allocatespace.co"},"_resolved":"/private/var/folders/47/flbj6lrn7hs8vwp2jw9psl000000gn/T/cdccf21a3fe8399ec7ec5707abdde6dc/allo8-as2-platform-sdk-0.0.6.tgz","_integrity":"sha512-Cdnmru2MF46fk3q0JnxbMztiJO7cBlZVRtszRmkkan772xM/i6ZF22uLyBnE50zHhyABsD9hRdC3oQt2Tudkcg==","_npmVersion":"11.10.1","description":"Official SDK for the AS2 platform — typed tRPC and Better Auth clients from a single class.","directories":{},"_nodeVersion":"25.7.0","dependencies":{"zod":"^4.1.11","superjson":"^2.2.1","better-auth":"1.5.5","@trpc/client":"^11.1.2","@trpc/server":"^11.1.2","@better-fetch/fetch":"^1.1.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.39.1","rollup":"^4.62.2","tsdown":"^0.21.1","typescript":"5.8.2","@types/node":"^24.10.1","@types/react":"^19.2.3","concurrently":"^9.1.2","@repo/schemas":"0.0.0","@repo/app-auth":"0.0.14","@repo/base-trpc":"0.0.36","@repo/constants":"1.0.0","@repo/checks-trpc":"0.0.11","rollup-plugin-dts":"^6.4.1","@repo/eslint-config":"0.0.0","@repo/typescript-config":"0.0.0","@rollup/plugin-node-resolve":"^16.0.3"},"_npmOperationalInternal":{"tmp":"tmp/as2-platform-sdk_0.0.6_1785897760463_0.5258033520463443","host":"s3://npm-registry-packages-npm-production"}},"0.0.7":{"name":"@allo8/as2-platform-sdk","version":"0.0.7","license":"MIT","_id":"@allo8/as2-platform-sdk@0.0.7","maintainers":[{"name":"as-developer","email":"developers@allocatespace.co"}],"dist":{"shasum":"26ac5f30032c775e7964ed844e41632798cc25f9","tarball":"https://registry.npmjs.org/@allo8/as2-platform-sdk/-/as2-platform-sdk-0.0.7.tgz","fileCount":18,"integrity":"sha512-iH5/i5nwGP0BOMI1aye7STsy/1BZIRw/FD01ICT128H9Jy6xVfCLvC8uSwWzHbkESZx2rM8lL1mE8rpkjAf7vw==","signatures":[{"sig":"MEQCIDKIU/UcAH+Ilz84WE2QkqU8mAdrY7JQnGR+ED0f21SzAiAgDspliJnMpEWf9u6OAz6uEYBe+tQ+H4BrskjGhLwTjg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":103273},"type":"module","_from":"file:allo8-as2-platform-sdk-0.0.7.tgz","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","default":"./dist/index.mjs","require":"./dist/index.mjs"}},"scripts":{"dev":"concurrently \"tsdown --watch\" \"rollup -c rollup.dts.config.ts --watch\"","lint":"eslint . --max-warnings 0","check-types":"tsc --noEmit","build:packages":"tsdown && rollup -c rollup.dts.config.ts"},"_npmUser":{"name":"as-developer","email":"developers@allocatespace.co"},"_resolved":"/private/var/folders/47/flbj6lrn7hs8vwp2jw9psl000000gn/T/e461be4d40415d6a1fa56a5344af6140/allo8-as2-platform-sdk-0.0.7.tgz","_integrity":"sha512-iH5/i5nwGP0BOMI1aye7STsy/1BZIRw/FD01ICT128H9Jy6xVfCLvC8uSwWzHbkESZx2rM8lL1mE8rpkjAf7vw==","_npmVersion":"11.10.1","description":"Official SDK for the AS2 platform — typed tRPC and Better Auth clients from a single class.","directories":{},"_nodeVersion":"25.7.0","dependencies":{"zod":"^4.1.11","superjson":"^2.2.1","better-auth":"1.6.25","@trpc/client":"^11.1.2","@trpc/server":"^11.1.2","@better-fetch/fetch":"^1.1.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.39.1","rollup":"^4.62.2","tsdown":"^0.21.1","typescript":"5.8.2","@types/node":"^24.10.1","@types/react":"^19.2.3","concurrently":"^9.1.2","@repo/schemas":"0.0.0","@repo/app-auth":"0.0.14","@repo/base-trpc":"0.0.36","@repo/constants":"1.0.0","@repo/checks-trpc":"0.0.11","rollup-plugin-dts":"^6.4.1","@repo/eslint-config":"0.0.0","@repo/typescript-config":"0.0.0","@rollup/plugin-node-resolve":"^16.0.3"},"_npmOperationalInternal":{"tmp":"tmp/as2-platform-sdk_0.0.7_1787197347222_0.784448197581483","host":"s3://npm-registry-packages-npm-production"}},"0.0.8":{"name":"@allo8/as2-platform-sdk","version":"0.0.8","description":"Official SDK for the AS2 platform — typed tRPC and Better Auth clients from a single class.","type":"module","license":"MIT","publishConfig":{"access":"public"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","require":"./dist/index.mjs","default":"./dist/index.mjs"}},"dependencies":{"@better-fetch/fetch":"^1.1.18","@trpc/client":"^11.1.2","@trpc/server":"^11.1.2","better-auth":"1.6.25","superjson":"^2.2.1","zod":"^4.1.11"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0"},"devDependencies":{"@rollup/plugin-node-resolve":"^16.0.3","@types/node":"^24.10.1","@types/react":"^19.2.3","eslint":"^9.39.1","react":"^19.2.3","rollup":"^4.62.2","rollup-plugin-dts":"^6.4.1","tsdown":"^0.21.1","concurrently":"^9.1.2","typescript":"5.8.2","@repo/app-auth":"0.0.14","@repo/base-trpc":"0.0.36","@repo/checks-trpc":"0.0.11","@repo/constants":"1.0.0","@repo/eslint-config":"0.0.0","@repo/schemas":"0.0.0","@repo/typescript-config":"0.0.0"},"scripts":{"build:packages":"tsdown && rollup -c rollup.dts.config.ts","dev":"concurrently \"tsdown --watch\" \"rollup -c rollup.dts.config.ts --watch\"","lint":"eslint . --max-warnings 0","check-types":"tsc --noEmit"},"_id":"@allo8/as2-platform-sdk@0.0.8","_integrity":"sha512-+GlA4Z2VHNTv7jMZSXSmdKMLJTBGNWBEfvK+kswlxk4io2USJ8yfgSeiNb5enpwO3VOuG3BllqKl/SB9Q7454g==","_resolved":"/private/var/folders/47/flbj6lrn7hs8vwp2jw9psl000000gn/T/f8929ddacc04adf221b61db3ff5b3664/allo8-as2-platform-sdk-0.0.8.tgz","_from":"file:allo8-as2-platform-sdk-0.0.8.tgz","_nodeVersion":"25.7.0","_npmVersion":"11.10.1","dist":{"integrity":"sha512-+GlA4Z2VHNTv7jMZSXSmdKMLJTBGNWBEfvK+kswlxk4io2USJ8yfgSeiNb5enpwO3VOuG3BllqKl/SB9Q7454g==","shasum":"c3eb9542477466646df54ee98bbcd9694c6d2a2f","tarball":"https://registry.npmjs.org/@allo8/as2-platform-sdk/-/as2-platform-sdk-0.0.8.tgz","fileCount":23,"unpackedSize":158426,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFlB8gs0kDyZcUqUoirxq6jJ92dHmQ1VG9Ur7oqqSZWhAiANv044LPk9vGu1kblNv7h8RMRSQhzyz84nUy7y7EsDOg=="}]},"_npmUser":{"name":"as-developer","email":"developers@allocatespace.co"},"directories":{},"maintainers":[{"name":"as-developer","email":"developers@allocatespace.co"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/as2-platform-sdk_0.0.8_1788343984776_0.608769347497834"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-21T10:03:20.517Z","modified":"2026-09-02T10:13:05.080Z","0.0.1":"2026-07-21T09:54:46.411Z","0.0.2":"2026-07-21T10:03:20.853Z","0.0.3":"2026-08-04T07:39:27.079Z","0.0.4":"2026-08-04T10:03:53.606Z","0.0.5":"2026-08-05T00:58:48.484Z","0.0.6":"2026-08-05T02:42:40.625Z","0.0.7":"2026-08-20T03:42:27.379Z","0.0.8":"2026-09-02T10:13:04.909Z"},"license":"MIT","description":"Official SDK for the AS2 platform — typed tRPC and Better Auth clients from a single class.","maintainers":[{"name":"as-developer","email":"developers@allocatespace.co"}],"readme":"# @allo8/as2-platform-sdk\n\nOfficial SDK for the AS2 platform. It exposes a single `AS2PlatformClient`\nclass that wires up:\n\n- **Better Auth** — read the current solution session (`auth.getSession()`).\n  Sign-in/out, invitations and other user-management flows are\n  platform-owned and intentionally left off the SDK surface.\n- **tRPC** — a fully typed client for a curated subset of the gateway router\n  (`base`, `checks`).\n\nBoth clients share one request context, so the API key / extra headers and\nworkspace / solution scoping stay in sync across every call.\n\nRequests are made **same-origin** (`window.location.origin`) rather than\nagainst a configurable base URL — the SDK assumes it's running inside a\nmicroapp served behind the checks-web gateway. See\n[Local development](#local-development) for making that true on your own dev\nport too.\n\n## Install\n\n```bash\npnpm add @allo8/as2-platform-sdk\n```\n\n`react` is a peer dependency (Better Auth's client uses React's store bindings).\n\n## Quick start\n\n```ts\nimport { AS2PlatformClient } from \"@allo8/as2-platform-sdk\";\n\nconst as2 = new AS2PlatformClient();\n\n// Better Auth — read-only session\nconst { data: session } = await as2.auth.getSession();\n\n// Convenience helpers — workspace comes from the request origin;\n// solution is scoped by the solution-id in sessionStorage\nconst workspace = await as2.getWorkspace();\nconst solution = await as2.getSolution();\n\n// tRPC — typed end-to-end against the curated public router\nconst projects = await as2.trpc.checks.projects.getUserProjects.query();\n```\n\n## Public tRPC surface\n\n`as2.trpc` is typed against a hand-curated `PublicAppRouter`, not the full\ngateway `AppRouter` — only the procedures below are exposed. A path's first\nsegment selects the backing service, and the SDK forwards the request to\n`${window.location.origin}/${service}/api/trpc`:\n\n| Path                                            | Service  |\n| ------------------------------------------------ | -------- |\n| `base.portal.getWorkspace`                        | `base`   |\n| `base.portal.getSolution`                         | `base`   |\n| `base.v2.solutionTeams.listEndUserTeams`          | `base`   |\n| `checks.projects.getUserProjects`                 | `checks` |\n\nThe portal procedures take no input and return the current portal workspace or\nsolution, or `null` when one cannot be resolved. `getWorkspace()` and\n`getSolution()` are convenience wrappers around these procedures.\n\n`checks.projects.getUserProjects` is the public alias for the backend's\n`folders.getUserFolders` route; the SDK rewrites the path transparently.\n\n## Configuration\n\n| Option        | Description                                                             |\n| ------------- | ------------------------------------------------------------------------ |\n| `apiKey`      | Sent as `x-api-key` on every request. Use for server-to-server access.  |\n| `headers`     | Static record or `() => Record<string,string>` for per-request extras.  |\n| `credentials` | Fetch credentials mode. Defaults to `\"include\"`.                        |\n| `fetch`       | Custom fetch implementation.                                            |\n| `logger`      | Enable tRPC request logging. Defaults to `false`.                       |\n\n## Workspace / solution scoping\n\n`workspace-id` and `solution-id` request headers are read from\n`sessionStorage` (not from SDK config) and attached automatically to tRPC\nrequests that need them. `getWorkspace()` does **not** use those headers —\n`portal.getWorkspace` resolves the workspace from the request origin.\n`getSolution()` uses the `solution-id` header (and returns `null` when the\nsolution cannot be resolved):\n\n```ts\nas2.getWorkspaceId();\nas2.getSolutionId();\n\nawait as2.getWorkspace(); // origin-scoped\nawait as2.getSolution(); // solution-id header\n```\n\nIn production the host app populates `sessionStorage` before the microapp\nloads. In development, [`initDevSession`](#local-development) populates it\nfor you after signing in.\n\n## Updating auth at runtime\n\n`apiKey` / `headers` can be replaced at any time — the change applies\nimmediately to both the auth and tRPC clients:\n\n```ts\nas2.setApiKey(\"sk_...\");\n\n// Inject a fresh bearer token per request:\nas2.setHeaders(() => ({ authorization: `Bearer ${getToken()}` }));\n```\n\n## Local development\n\nBecause the clients call `window.location.origin` directly, a microapp\nrunning on its own dev port needs its platform requests forwarded to the\ngateway to stay same-origin and avoid CORS. Point `AS2_DEV_GATEWAY_URL` at\nthe gateway and wire up one of:\n\n```ts\n// vite.config.ts\nimport { createViteDevProxy } from \"@allo8/as2-platform-sdk\";\n\nexport default defineConfig({\n  server: { proxy: createViteDevProxy() },\n});\n```\n\n```ts\n// next.config.js — rewrites only, cannot rewrite the Origin header\nimport { createNextDevRewrites } from \"@allo8/as2-platform-sdk\";\n\nmodule.exports = {\n  async rewrites() {\n    return createNextDevRewrites();\n  },\n};\n```\n\n```ts\n// proxy.ts (middleware.ts on older Next versions) — rewrites the Origin\n// header, use instead of the rewrites-only option above. Runs in every\n// environment, not just dev — see \"Running behind the platform proxy\" below.\nimport { NextResponse } from \"next/server\";\nimport { createNextAppMiddleware } from \"@allo8/as2-platform-sdk\";\n\nexport default createNextAppMiddleware(NextResponse);\n```\n\nThen, once at startup, sign in a dev session so requests carry a session and\nthe right `workspace-id` / `solution-id` headers:\n\n```ts\nawait as2.initDevSession();\n```\n\nCredentials and scoping come from arguments or fall back to\n`AS2_DEV_LOGIN_EMAIL`, `AS2_DEV_LOGIN_PASSWORD`, `AS2_DEV_WORKSPACE_ID` and\n`AS2_DEV_SOLUTION_ID`. It's a no-op on the server and outside\n`NODE_ENV === \"development\"`.\n\n## Running behind the platform proxy\n\nchecks-web serves a Next.js microapp at `/microapp/{MicroApp.id}` and forwards\nthat full path through rather than stripping it — the id is assigned when the\nmicroapp is registered with the platform and isn't known at the app's build\ntime, so it can't be baked into a Next `basePath`. `createNextAppMiddleware`\n(above) is what lets the app answer a request at that mounted path at all —\nwithout it, every route the platform proxies to 404s, since the app's own\nrouter only knows unmounted paths like `/settings`.\n\nThat only fixes the server side, though: a plain `<Link href=\"/settings\">` or\n`router.push(\"/settings\")` still renders/navigates to the unmounted path,\nescaping the mount. Fix that once, instead of wrapping every call site:\n\n```tsx\n// a top-of-tree client component (e.g. wherever your root layout renders one)\n\"use client\";\nimport { installMicroAppMountPatch } from \"@allo8/as2-platform-sdk\";\n\ninstallMicroAppMountPatch(); // module scope — not inside a useEffect\n\nexport default function RootProviders({ children }: { children: React.ReactNode }) {\n  return children;\n}\n```\n\nRoute comparisons (active-tab styling, etc.) should use `useAppPathname`\nrather than `next/navigation`'s `usePathname` directly, so they get a\nconsistent (unmounted) answer on both a soft navigation and a hard load:\n\n```tsx\nimport { usePathname } from \"next/navigation\";\nimport { useAppPathname } from \"@allo8/as2-platform-sdk\";\n\nconst pathname = useAppPathname(usePathname);\n```\n\nBoth are no-ops outside the proxy (local dev, the app's own origin) — no\n`NODE_ENV` check needed at the call site. See `installMicroAppMountPatch`'s\ndoc comment in `src/microapp-mount.ts` for exactly how the two mechanisms\nwork and where each one's coverage stops.\n\n## Deriving types\n\n```ts\nimport type {\n  PublicAppRouter,\n  inferRouterInputs,\n  inferRouterOutputs,\n} from \"@allo8/as2-platform-sdk\";\n\ntype RouterInputs = inferRouterInputs<PublicAppRouter>;\ntype RouterOutputs = inferRouterOutputs<PublicAppRouter>;\n```\n\nHelper result types are exported as `PortalWorkspace` and `PortalSolution`.\nInput/output types for procedures with payloads are also re-exported directly:\n`GetUserProjectsInput`, `GetUserProjectsResponse`, `ListEndUserTeamsInput`, and\n`ListSolutionTeamsResponse`.\n","readmeFilename":"README.md"}