{"_id":"@archie/js-sdk","_rev":"13-1ec43b0f2b622ffe8af7c36d50934889","name":"@archie/js-sdk","dist-tags":{"latest":"0.4.1"},"versions":{"0.1.0":{"name":"@archie/js-sdk","version":"0.1.0","keywords":["archie","baas","sdk","graphql","typescript","realtime","websocket","file-upload"],"author":{"name":"Archie","email":"dev@archie.dev"},"license":"MIT","_id":"@archie/js-sdk@0.1.0","maintainers":[{"name":"jorge.osorio","email":"jorge.osorio@8base.com"}],"homepage":"https://github.com/8base-archie/archie-sdk/tree/main/packages/js-sdk#readme","bugs":{"url":"https://github.com/8base-archie/archie-sdk/issues"},"dist":{"shasum":"69e06c18eae215afd08e720aac5145b95cf36999","tarball":"https://registry.npmjs.org/@archie/js-sdk/-/js-sdk-0.1.0.tgz","fileCount":8,"integrity":"sha512-0SYZ3g9B4CoaDlN6flvEZ/ZnYeIW09oyeYmpbND3Pu1BlBe2qMK+BbFCQvv40uZCCaEkIhUcd7Cf/9Z/nerOcw==","signatures":[{"sig":"MEQCIHgQYiMRZkB2TGAEJQHcKPY+HsAwRbAHGDfTD3VlaVQdAiBKtrnnkY4+DQmu5uOtcCZKlj2E5cqbo8ZJrlqtoOJmgA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":319094},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"62af7343ec53613b9c704368d1c37a189c6af6b4","scripts":{"dev":"tsup --watch","lint":"eslint src --fix","test":"vitest run --exclude '**/\\_\\_integration\\_\\_/**'","build":"tsup","clean":"rm -rf dist","test:all":"vitest run","typecheck":"tsc --noEmit","lint:check":"eslint src","test:watch":"vitest","prepublishOnly":"pnpm build","test:integration":"vitest run src/__integration__"},"_npmUser":{"name":"jorge.osorio","email":"jorge.osorio@8base.com"},"repository":{"url":"git+https://github.com/8base-archie/archie-sdk.git","type":"git","directory":"packages/js-sdk"},"_npmVersion":"10.8.2","description":"Archie BAAS - Core isomorphic TypeScript SDK","directories":{},"sideEffects":false,"_nodeVersion":"20.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.12.13","tsup":"^8.4.0","vitest":"^3.0.0","typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/js-sdk_0.1.0_1773894357885_0.9345847595334644","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@archie/js-sdk","version":"0.1.1","keywords":["archie","baas","sdk","graphql","typescript","realtime","websocket","file-upload"],"author":{"name":"Archie","email":"dev@archie.dev"},"license":"MIT","_id":"@archie/js-sdk@0.1.1","maintainers":[{"name":"jorge.osorio","email":"jorge.osorio@8base.com"}],"homepage":"https://github.com/8base-archie/archie-sdk/tree/main/packages/js-sdk#readme","bugs":{"url":"https://github.com/8base-archie/archie-sdk/issues"},"dist":{"shasum":"bd0a0bae88ad2406d513f994f0371aff754ff2bf","tarball":"https://registry.npmjs.org/@archie/js-sdk/-/js-sdk-0.1.1.tgz","fileCount":9,"integrity":"sha512-1hn+HkKRcqu2ejBWOavqiRKcn1W/0LuflIxzz5ghzvnY8q8igzMQAuvmwzL2e92oArB4pvQW2XaqXfb3gtZ4vw==","signatures":[{"sig":"MEUCIQCCCb2P15ngGYhcP8qO+T9cDh3cTVTRQpPDBkhxAlAl9AIgUvyRVc5vpfJyn1awit0xJ2tt524HPEAKBSPdEYTzoK8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":320120},"main":"./dist/index.cjs","type":"module","_from":"file:archie-js-sdk-0.1.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"dev":"tsup --watch","lint":"eslint src --fix","test":"vitest run --exclude '**/\\_\\_integration\\_\\_/**'","build":"tsup","clean":"rm -rf dist","test:all":"vitest run","typecheck":"tsc --noEmit","lint:check":"eslint src","test:watch":"vitest","test:integration":"vitest run src/__integration__"},"_npmUser":{"name":"jorge.osorio","email":"jorge.osorio@8base.com"},"_resolved":"/tmp/5f55c662d2a5776354779f99e063f59d/archie-js-sdk-0.1.1.tgz","_integrity":"sha512-1hn+HkKRcqu2ejBWOavqiRKcn1W/0LuflIxzz5ghzvnY8q8igzMQAuvmwzL2e92oArB4pvQW2XaqXfb3gtZ4vw==","repository":{"url":"git+https://github.com/8base-archie/archie-sdk.git","type":"git","directory":"packages/js-sdk"},"_npmVersion":"10.8.2","description":"Archie BAAS - Core isomorphic TypeScript SDK","directories":{},"sideEffects":false,"_nodeVersion":"20.20.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.12.13","tsup":"^8.4.0","vitest":"^3.0.0","typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/js-sdk_0.1.1_1773939525951_0.9902842926388069","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@archie/js-sdk","version":"0.1.2","keywords":["archie","baas","sdk","graphql","typescript","realtime","websocket","file-upload"],"author":{"name":"Archie","email":"dev@archie.dev"},"license":"MIT","_id":"@archie/js-sdk@0.1.2","maintainers":[{"name":"anderson-losada","email":"anderson.losada@archie.com"},{"name":"jorge.osorio","email":"jorge.osorio@8base.com"}],"homepage":"https://github.com/8base-archie/archie-sdk/tree/master/packages/js-sdk#readme","bugs":{"url":"https://github.com/8base-archie/archie-sdk/issues"},"dist":{"shasum":"9466159c2fc4caae3bbcdd77e4c978846bb6537a","tarball":"https://registry.npmjs.org/@archie/js-sdk/-/js-sdk-0.1.2.tgz","fileCount":9,"integrity":"sha512-N9Xm4nII+0RB4DFQ8u+va17Htn1MNjdbj0W50YNwn7A9ZgqhrTdv6UOMNWX3qrgnA9SuBZDOvjA+YqzrXDevrA==","signatures":[{"sig":"MEUCIQCHOQ9FOkM2psQVmWdJW3BnLWE36EVX8LerBJXvgeX1qQIge67PmCeS3fEw59+H0fVAFtye74F5ib6IEpmdoxj4TCU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":333598},"main":"./dist/index.cjs","type":"module","_from":"file:archie-js-sdk-0.1.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"dev":"tsup --watch","lint":"eslint src --fix","test":"vitest run --exclude '**/\\_\\_integration\\_\\_/**'","build":"tsup","clean":"rm -rf dist","test:all":"vitest run","typecheck":"tsc --noEmit","lint:check":"eslint src","test:watch":"vitest","test:integration":"vitest run src/__integration__"},"_npmUser":{"name":"jorge.osorio","email":"jorge.osorio@8base.com"},"_resolved":"/tmp/125e8060f8e6b777cea9d808fa35b3b6/archie-js-sdk-0.1.2.tgz","_integrity":"sha512-N9Xm4nII+0RB4DFQ8u+va17Htn1MNjdbj0W50YNwn7A9ZgqhrTdv6UOMNWX3qrgnA9SuBZDOvjA+YqzrXDevrA==","repository":{"url":"git+https://github.com/8base-archie/archie-sdk.git","type":"git","directory":"packages/js-sdk"},"_npmVersion":"10.8.2","description":"Archie BAAS - Core isomorphic TypeScript SDK","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.12.13","tsup":"^8.4.0","vitest":"^3.0.0","typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/js-sdk_0.1.2_1775681001697_0.8382240829771066","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@archie/js-sdk","version":"0.1.3","keywords":["archie","baas","sdk","graphql","typescript","realtime","websocket","file-upload"],"author":{"name":"Archie","email":"dev@archie.dev"},"license":"MIT","_id":"@archie/js-sdk@0.1.3","maintainers":[{"name":"anderson-losada","email":"anderson.losada@archie.com"},{"name":"jorge.osorio","email":"jorge.osorio@8base.com"}],"homepage":"https://github.com/8base-archie/archie-sdk/tree/master/packages/js-sdk#readme","bugs":{"url":"https://github.com/8base-archie/archie-sdk/issues"},"dist":{"shasum":"61e30c88887abb659dcfc2dc2b19e5609bf794af","tarball":"https://registry.npmjs.org/@archie/js-sdk/-/js-sdk-0.1.3.tgz","fileCount":9,"integrity":"sha512-2dwdKIC+jS7juLCRAhIm+pUy72jwoOukisiXTdeYeOS6o9ZF2MWl4p2qhftLWtLNOpqucCiv4o2y1jWJdkYD3w==","signatures":[{"sig":"MEUCIQDeLEly3Vm8ZTHVL7WHiR4geCr5R/q/jQglMY4G/9GoQgIgOznyqvMCZLtAdqgY6+S+p3r4eszi42zkDCqVx0Nnv8I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":333780},"main":"./dist/index.cjs","type":"module","_from":"file:archie-js-sdk-0.1.3.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"dev":"tsup --watch","lint":"eslint src --fix","test":"vitest run --exclude '**/\\_\\_integration\\_\\_/**'","build":"tsup","clean":"rm -rf dist","test:all":"vitest run","typecheck":"tsc --noEmit","lint:check":"eslint src","test:watch":"vitest","test:integration":"vitest run src/__integration__"},"_npmUser":{"name":"jorge.osorio","email":"jorge.osorio@8base.com"},"_resolved":"/tmp/62c96ed752a6ecaeab8752982af50a45/archie-js-sdk-0.1.3.tgz","_integrity":"sha512-2dwdKIC+jS7juLCRAhIm+pUy72jwoOukisiXTdeYeOS6o9ZF2MWl4p2qhftLWtLNOpqucCiv4o2y1jWJdkYD3w==","repository":{"url":"git+https://github.com/8base-archie/archie-sdk.git","type":"git","directory":"packages/js-sdk"},"_npmVersion":"10.8.2","description":"Archie BAAS - Core isomorphic TypeScript SDK","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.12.13","tsup":"^8.4.0","vitest":"^3.0.0","typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/js-sdk_0.1.3_1775764590416_0.18354031852793096","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@archie/js-sdk","version":"0.2.0","keywords":["archie","baas","sdk","graphql","typescript","realtime","websocket","file-upload"],"author":{"name":"Archie","email":"dev@archie.dev"},"license":"MIT","_id":"@archie/js-sdk@0.2.0","maintainers":[{"name":"anderson-losada","email":"anderson.losada@archie.com"},{"name":"jorge.osorio","email":"jorge.osorio@8base.com"}],"homepage":"https://github.com/8base-archie/archie-sdk/tree/master/packages/js-sdk#readme","bugs":{"url":"https://github.com/8base-archie/archie-sdk/issues"},"dist":{"shasum":"f586ba3064a96a7e2b6607e5d3c8d13fba1cbf46","tarball":"https://registry.npmjs.org/@archie/js-sdk/-/js-sdk-0.2.0.tgz","fileCount":9,"integrity":"sha512-2YHXhHJagodTeORwUMjqwFSV1iU49c3qsgIMZyHPWAb/XBkcZGDC0v/TmR2QgDk8siA09pUlI5uOV+DsOfuRcg==","signatures":[{"sig":"MEQCICVgNArYST0badvPWkOS5HrDIzI4x+hiaQnG0r4N4fGOAiBMV1knaPVlJ1IaZiw6UnPrsGIYmulKQxgxFe5zBAZQ+Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":395057},"main":"./dist/index.cjs","type":"module","_from":"file:archie-js-sdk-0.2.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"dev":"tsup --watch","lint":"eslint src --fix","test":"vitest run --exclude '**/\\_\\_integration\\_\\_/**'","build":"tsup","clean":"rm -rf dist","test:all":"vitest run","typecheck":"tsc --noEmit","lint:check":"eslint src","test:watch":"vitest","test:integration":"vitest run src/__integration__"},"_npmUser":{"name":"jorge.osorio","email":"jorge.osorio@8base.com"},"_resolved":"/tmp/696f32d598e96f83342f2c9eb651b8d6/archie-js-sdk-0.2.0.tgz","_integrity":"sha512-2YHXhHJagodTeORwUMjqwFSV1iU49c3qsgIMZyHPWAb/XBkcZGDC0v/TmR2QgDk8siA09pUlI5uOV+DsOfuRcg==","repository":{"url":"git+https://github.com/8base-archie/archie-sdk.git","type":"git","directory":"packages/js-sdk"},"_npmVersion":"10.8.2","description":"Archie BAAS - Core isomorphic TypeScript SDK","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.12.13","tsup":"^8.4.0","vitest":"^3.0.0","typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/js-sdk_0.2.0_1782502196315_0.5963805346868192","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@archie/js-sdk","version":"0.3.0","keywords":["archie","baas","sdk","graphql","typescript","realtime","websocket","file-upload"],"author":{"name":"Archie","email":"dev@archie.dev"},"license":"MIT","_id":"@archie/js-sdk@0.3.0","maintainers":[{"name":"anderson-losada","email":"anderson.losada@archie.com"},{"name":"jorge.osorio","email":"jorge.osorio@8base.com"}],"homepage":"https://github.com/8base-archie/archie-sdk/tree/master/packages/js-sdk#readme","bugs":{"url":"https://github.com/8base-archie/archie-sdk/issues"},"dist":{"shasum":"127f5dfb86d6a544c9b68f7850fc481133a511c1","tarball":"https://registry.npmjs.org/@archie/js-sdk/-/js-sdk-0.3.0.tgz","fileCount":9,"integrity":"sha512-DlSfSBvzhhPgan+xBQoCZUAuQ9BJY+mEJcHngqqd6PPv7+Yu+CrGymVUbRETQInvJnLfVY5fENQjj9yBhdreEA==","signatures":[{"sig":"MEYCIQCQGOmcbuklqcLqoj2Be+d6y4M08XZuWGFmFF90f1wTEwIhALBNad+l4t07Y/GXuiER1HanYYIRKIW20teQthFEyQF8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":397968},"main":"./dist/index.cjs","type":"module","_from":"file:archie-js-sdk-0.3.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"dev":"tsup --watch","lint":"eslint src --fix","test":"vitest run --exclude '**/\\_\\_integration\\_\\_/**'","build":"tsup","clean":"rm -rf dist","test:all":"vitest run","typecheck":"tsc --noEmit","lint:check":"eslint src","test:watch":"vitest","test:integration":"vitest run src/__integration__"},"_npmUser":{"name":"jorge.osorio","email":"jorge.osorio@8base.com"},"_resolved":"/tmp/dc1630d3d41c2da86c3456b60b357f45/archie-js-sdk-0.3.0.tgz","_integrity":"sha512-DlSfSBvzhhPgan+xBQoCZUAuQ9BJY+mEJcHngqqd6PPv7+Yu+CrGymVUbRETQInvJnLfVY5fENQjj9yBhdreEA==","repository":{"url":"git+https://github.com/8base-archie/archie-sdk.git","type":"git","directory":"packages/js-sdk"},"_npmVersion":"10.8.2","description":"Archie BAAS - Core isomorphic TypeScript SDK","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.12.13","tsup":"^8.4.0","vitest":"^3.0.0","typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/js-sdk_0.3.0_1782502725960_0.5598629440675524","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@archie/js-sdk","version":"0.3.1","keywords":["archie","baas","sdk","graphql","typescript","realtime","websocket","file-upload"],"author":{"name":"Archie","email":"dev@archie.dev"},"license":"MIT","_id":"@archie/js-sdk@0.3.1","maintainers":[{"name":"anderson-losada","email":"anderson.losada@archie.com"},{"name":"jorge.osorio","email":"jorge.osorio@8base.com"}],"homepage":"https://github.com/8base-archie/archie-sdk/tree/master/packages/js-sdk#readme","bugs":{"url":"https://github.com/8base-archie/archie-sdk/issues"},"dist":{"shasum":"4b31969675ee5557e3e3e7a6dad9b4f70f12c1a7","tarball":"https://registry.npmjs.org/@archie/js-sdk/-/js-sdk-0.3.1.tgz","fileCount":9,"integrity":"sha512-XpRMlNHEWRAL+3221RlGjGBNpmjLNFRI0mP4fcDDcuEPk7Zr9q+e1tzSpnfNeRAxyS9J6XcHjJGWl0rWPhWsUg==","signatures":[{"sig":"MEUCICqkyUfVU/UTyXTudNj6H5xJiRu8Eg2s7aBpaAly2/zfAiEAmiBltU9dipcDggti2rjd+fuUURyHT/llf62QdQohKXQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":405774},"main":"./dist/index.cjs","type":"module","_from":"file:archie-js-sdk-0.3.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"dev":"tsup --watch","lint":"eslint src --fix","test":"vitest run --exclude '**/\\_\\_integration\\_\\_/**'","build":"tsup","clean":"rm -rf dist","test:all":"vitest run","typecheck":"tsc --noEmit","lint:check":"eslint src","test:watch":"vitest","test:integration":"vitest run src/__integration__"},"_npmUser":{"name":"jorge.osorio","email":"jorge.osorio@8base.com"},"_resolved":"/tmp/5224ba0bfdde38781f9f202b08e2f136/archie-js-sdk-0.3.1.tgz","_integrity":"sha512-XpRMlNHEWRAL+3221RlGjGBNpmjLNFRI0mP4fcDDcuEPk7Zr9q+e1tzSpnfNeRAxyS9J6XcHjJGWl0rWPhWsUg==","repository":{"url":"git+https://github.com/8base-archie/archie-sdk.git","type":"git","directory":"packages/js-sdk"},"_npmVersion":"10.8.2","description":"Archie BAAS - Core isomorphic TypeScript SDK","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.12.13","tsup":"^8.4.0","vitest":"^3.0.0","typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/js-sdk_0.3.1_1782967480919_0.49920433993101865","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@archie/js-sdk","version":"0.3.2","keywords":["archie","baas","sdk","graphql","typescript","realtime","websocket","file-upload"],"author":{"name":"Archie","email":"dev@archie.dev"},"license":"MIT","_id":"@archie/js-sdk@0.3.2","maintainers":[{"name":"anderson-losada","email":"anderson.losada@archie.com"},{"name":"jorge.osorio","email":"jorge.osorio@8base.com"}],"homepage":"https://github.com/8base-archie/archie-sdk/tree/master/packages/js-sdk#readme","bugs":{"url":"https://github.com/8base-archie/archie-sdk/issues"},"dist":{"shasum":"aa8064a2297673cd1a14ccdacc72e9bbc7a30fc2","tarball":"https://registry.npmjs.org/@archie/js-sdk/-/js-sdk-0.3.2.tgz","fileCount":9,"integrity":"sha512-FyUS3dN6TRoxf1swWYzQ6ZIY0pD0LRsnQhAWdMq6DEmkTAIv1eP9Mz/rb7YMrfZlekkuKBMc8NsgxtOHc+Mp7g==","signatures":[{"sig":"MEUCIQCkbwncXtSLqV8nz6mu9RP71zUxAa/GAz61TLWRP9kIAQIgGGQTRc4EIpSce9pIfWxe4NUT8RsBArc8mU1Q5aGYRic=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":417174},"main":"./dist/index.cjs","type":"module","_from":"file:archie-js-sdk-0.3.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"dev":"tsup --watch","lint":"eslint src --fix","test":"vitest run --exclude '**/\\_\\_integration\\_\\_/**'","build":"tsup","clean":"rm -rf dist","test:all":"vitest run","typecheck":"tsc --noEmit","lint:check":"eslint src","test:watch":"vitest","test:integration":"vitest run src/__integration__"},"_npmUser":{"name":"jorge.osorio","email":"jorge.osorio@8base.com"},"_resolved":"/tmp/c8a2d327666c345143f5fcb1276c8110/archie-js-sdk-0.3.2.tgz","_integrity":"sha512-FyUS3dN6TRoxf1swWYzQ6ZIY0pD0LRsnQhAWdMq6DEmkTAIv1eP9Mz/rb7YMrfZlekkuKBMc8NsgxtOHc+Mp7g==","repository":{"url":"git+https://github.com/8base-archie/archie-sdk.git","type":"git","directory":"packages/js-sdk"},"_npmVersion":"10.8.2","description":"Archie BAAS - Core isomorphic TypeScript SDK","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.12.13","tsup":"^8.4.0","vitest":"^3.0.0","typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/js-sdk_0.3.2_1785896703676_0.34089921414974156","host":"s3://npm-registry-packages-npm-production"}},"0.3.3":{"name":"@archie/js-sdk","version":"0.3.3","keywords":["archie","baas","sdk","graphql","typescript","realtime","websocket","file-upload"],"author":{"name":"Archie","email":"dev@archie.dev"},"license":"MIT","_id":"@archie/js-sdk@0.3.3","maintainers":[{"name":"anderson-losada","email":"anderson.losada@archie.com"},{"name":"jorge.osorio","email":"jorge.osorio@8base.com"}],"homepage":"https://github.com/8base-archie/archie-sdk/tree/master/packages/js-sdk#readme","bugs":{"url":"https://github.com/8base-archie/archie-sdk/issues"},"dist":{"shasum":"b464e6721070182c39a8f44ce87d8bbfb178b6e7","tarball":"https://registry.npmjs.org/@archie/js-sdk/-/js-sdk-0.3.3.tgz","fileCount":9,"integrity":"sha512-iYQ6dDTkFGFAC/pEmTg2XgozM0lQy4hUzl+U6icf2Oo2ND6N53SJJ20yeHs1YAZrX1IpKEiGXF60o8+ARkEk9g==","signatures":[{"sig":"MEUCIE/bxyqKpmh1yTQNMbFkx7ELVye5yCilsSMxyFZyD3/2AiEA9MFdwgP3VHW2JVb7F8Kte6V5MJBNC/pHo/NyJNHSaS4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":449789},"main":"./dist/index.cjs","type":"module","_from":"file:archie-js-sdk-0.3.3.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"dev":"tsup --watch","lint":"eslint src --fix","test":"vitest run --exclude '**/\\_\\_integration\\_\\_/**'","build":"tsup","clean":"rm -rf dist","test:all":"vitest run","typecheck":"tsc --noEmit","lint:check":"eslint src","test:watch":"vitest","test:integration":"vitest run src/__integration__"},"_npmUser":{"name":"jorge.osorio","email":"jorge.osorio@8base.com"},"_resolved":"/tmp/4aa611de4397d565f89113c4b4f691b0/archie-js-sdk-0.3.3.tgz","_integrity":"sha512-iYQ6dDTkFGFAC/pEmTg2XgozM0lQy4hUzl+U6icf2Oo2ND6N53SJJ20yeHs1YAZrX1IpKEiGXF60o8+ARkEk9g==","repository":{"url":"git+https://github.com/8base-archie/archie-sdk.git","type":"git","directory":"packages/js-sdk"},"_npmVersion":"10.8.2","description":"Archie BAAS - Core isomorphic TypeScript SDK","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.12.13","tsup":"^8.4.0","vitest":"^3.0.0","typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/js-sdk_0.3.3_1786059515389_0.2833927435643777","host":"s3://npm-registry-packages-npm-production"}},"0.3.4":{"name":"@archie/js-sdk","version":"0.3.4","keywords":["archie","baas","sdk","graphql","typescript","realtime","websocket","file-upload"],"author":{"name":"Archie","email":"dev@archie.dev"},"license":"MIT","_id":"@archie/js-sdk@0.3.4","maintainers":[{"name":"anderson-losada","email":"anderson.losada@archie.com"},{"name":"jorge.osorio","email":"jorge.osorio@8base.com"}],"homepage":"https://github.com/8base-archie/archie-sdk/tree/master/packages/js-sdk#readme","bugs":{"url":"https://github.com/8base-archie/archie-sdk/issues"},"dist":{"shasum":"51513eb2d56311ea7d4ae6fbadbd9c881c081ee8","tarball":"https://registry.npmjs.org/@archie/js-sdk/-/js-sdk-0.3.4.tgz","fileCount":9,"integrity":"sha512-OlKqwXp4NSZVV5kca1Jahi3r1tjXeNAHd5/fjPuluNVo+KtBqttd/HTZUvpROIgu+xcN+h87whTsfO3mr2Vsrw==","signatures":[{"sig":"MEUCIGzPGbFTaUFosEKV79nat39YB5nXsC8ZvKGdeBUQWa+sAiEAtxRtFpO3msvK4mw4NLsVzNJ+sZlqR29oOxlTXKJrcKI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":492868},"main":"./dist/index.cjs","type":"module","_from":"file:archie-js-sdk-0.3.4.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"dev":"tsup --watch","lint":"eslint src --fix","test":"vitest run --exclude '**/\\_\\_integration\\_\\_/**'","build":"tsup","clean":"rm -rf dist","test:all":"vitest run","typecheck":"tsc --noEmit","lint:check":"eslint src","test:watch":"vitest","test:integration":"vitest run src/__integration__"},"_npmUser":{"name":"jorge.osorio","email":"jorge.osorio@8base.com"},"_resolved":"/tmp/811ca4f93519f067244ae7f77d9cab5f/archie-js-sdk-0.3.4.tgz","_integrity":"sha512-OlKqwXp4NSZVV5kca1Jahi3r1tjXeNAHd5/fjPuluNVo+KtBqttd/HTZUvpROIgu+xcN+h87whTsfO3mr2Vsrw==","repository":{"url":"git+https://github.com/8base-archie/archie-sdk.git","type":"git","directory":"packages/js-sdk"},"_npmVersion":"10.8.2","description":"Archie BAAS - Core isomorphic TypeScript SDK","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.12.13","tsup":"^8.4.0","vitest":"^3.0.0","typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/js-sdk_0.3.4_1787922756483_0.3091559944316986","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@archie/js-sdk","version":"0.4.0","keywords":["archie","baas","sdk","graphql","typescript","realtime","websocket","file-upload"],"author":{"name":"Archie","email":"dev@archie.dev"},"license":"MIT","_id":"@archie/js-sdk@0.4.0","maintainers":[{"name":"anderson-losada","email":"anderson.losada@archie.com"},{"name":"jorge.osorio","email":"jorge.osorio@8base.com"}],"homepage":"https://github.com/8base-archie/archie-sdk/tree/master/packages/js-sdk#readme","bugs":{"url":"https://github.com/8base-archie/archie-sdk/issues"},"dist":{"shasum":"b894e7e80633f1dea15cabc97efdf2b71558189c","tarball":"https://registry.npmjs.org/@archie/js-sdk/-/js-sdk-0.4.0.tgz","fileCount":9,"integrity":"sha512-QyTfu5YcZBrBpK89o2zkq5a8Z5pJJYzVbvrVizhBJwUAuBziHq12FaCWu69dy6YHrbrkj75nKSvR9gCCxVw4zg==","signatures":[{"sig":"MEYCIQCHLvdkM0O9gDYMRPuHe6QAcrcS+vabtpj/3OLxx2AMTgIhAJk2feaxtea0azujl+eSuT3xsanX0aVp5hihAPU6lCXM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":502864},"main":"./dist/index.cjs","type":"module","_from":"file:archie-js-sdk-0.4.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"dev":"tsup --watch","lint":"eslint src --fix","test":"vitest run --exclude '**/\\_\\_integration\\_\\_/**'","build":"tsup","clean":"rm -rf dist","test:all":"vitest run","typecheck":"tsc --noEmit","lint:check":"eslint src","test:watch":"vitest","test:integration":"vitest run src/__integration__"},"_npmUser":{"name":"jorge.osorio","email":"jorge.osorio@8base.com"},"_resolved":"/tmp/5ddc691c37d5c572e3abd596cee3e391/archie-js-sdk-0.4.0.tgz","_integrity":"sha512-QyTfu5YcZBrBpK89o2zkq5a8Z5pJJYzVbvrVizhBJwUAuBziHq12FaCWu69dy6YHrbrkj75nKSvR9gCCxVw4zg==","repository":{"url":"git+https://github.com/8base-archie/archie-sdk.git","type":"git","directory":"packages/js-sdk"},"_npmVersion":"10.8.2","description":"Archie BAAS - Core isomorphic TypeScript SDK","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.12.13","tsup":"^8.4.0","vitest":"^3.0.0","typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/js-sdk_0.4.0_1788405861711_0.0976183428076256","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@archie/js-sdk","version":"0.4.1","description":"Archie BAAS - Core isomorphic TypeScript SDK","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"devDependencies":{"msw":"^2.12.13","tsup":"^8.4.0","typescript":"^5.7.0","vitest":"^3.0.0"},"sideEffects":false,"keywords":["archie","baas","sdk","graphql","typescript","realtime","websocket","file-upload"],"license":"MIT","author":{"name":"Archie","email":"dev@archie.dev"},"repository":{"type":"git","url":"git+https://github.com/8base-archie/archie-sdk.git","directory":"packages/js-sdk"},"homepage":"https://github.com/8base-archie/archie-sdk/tree/master/packages/js-sdk#readme","bugs":{"url":"https://github.com/8base-archie/archie-sdk/issues"},"engines":{"node":">=18.0.0"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup","dev":"tsup --watch","test":"vitest run --exclude '**/\\_\\_integration\\_\\_/**'","test:integration":"vitest run src/__integration__","test:all":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit","lint":"eslint src --fix","lint:check":"eslint src","clean":"rm -rf dist"},"_id":"@archie/js-sdk@0.4.1","_integrity":"sha512-+/kugXHfz+LrfHtAh9uH5SXr+05OM4SZo6Sps1qtkOQ9Il8dQbcWHbZ/8aOalaoPoRn7Sl2yWHjEkSfeSErlGA==","_resolved":"/tmp/8db6e2fa5e464eddd0bcb87209553257/archie-js-sdk-0.4.1.tgz","_from":"file:archie-js-sdk-0.4.1.tgz","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-+/kugXHfz+LrfHtAh9uH5SXr+05OM4SZo6Sps1qtkOQ9Il8dQbcWHbZ/8aOalaoPoRn7Sl2yWHjEkSfeSErlGA==","shasum":"09d967811c4a097b481d38f95cf0ba5b5779d0a4","tarball":"https://registry.npmjs.org/@archie/js-sdk/-/js-sdk-0.4.1.tgz","fileCount":9,"unpackedSize":533638,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICzdWx8u2tjh8skArNVllQjIzDjAG3VdLhlHTt0daEV/AiEA4j7WQJbipsV1gcH+eEMKxnmWreYde2mWVESscvFCcUA="}]},"_npmUser":{"name":"jorge.osorio","email":"jorge.osorio@8base.com"},"directories":{},"maintainers":[{"name":"anderson-losada","email":"anderson.losada@archie.com"},{"name":"jorge.osorio","email":"jorge.osorio@8base.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/js-sdk_0.4.1_1789076436724_0.5857843531796214"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-19T04:25:57.439Z","modified":"2026-09-10T21:40:37.289Z","0.1.0":"2026-03-19T04:25:58.071Z","0.1.1":"2026-03-19T16:58:46.108Z","0.1.2":"2026-04-08T20:43:21.899Z","0.1.3":"2026-04-09T19:56:30.556Z","0.2.0":"2026-06-26T19:29:56.467Z","0.3.0":"2026-06-26T19:38:46.125Z","0.3.1":"2026-07-02T04:44:41.060Z","0.3.2":"2026-08-05T02:25:03.821Z","0.3.3":"2026-08-06T23:38:35.566Z","0.3.4":"2026-08-28T13:12:36.642Z","0.4.0":"2026-09-03T03:24:21.870Z","0.4.1":"2026-09-10T21:40:36.881Z"},"bugs":{"url":"https://github.com/8base-archie/archie-sdk/issues"},"author":{"name":"Archie","email":"dev@archie.dev"},"license":"MIT","homepage":"https://github.com/8base-archie/archie-sdk/tree/master/packages/js-sdk#readme","keywords":["archie","baas","sdk","graphql","typescript","realtime","websocket","file-upload"],"repository":{"type":"git","url":"git+https://github.com/8base-archie/archie-sdk.git","directory":"packages/js-sdk"},"description":"Archie BAAS - Core isomorphic TypeScript SDK","maintainers":[{"name":"anderson-losada","email":"anderson.losada@archie.com"},{"name":"jorge.osorio","email":"jorge.osorio@8base.com"}],"readme":"# @archie/js-sdk\n\nCore TypeScript SDK for the Archie BAAS platform. Isomorphic — works in both browser and Node.js.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [Configuration](#configuration)\n- [Auth Module](#auth-module)\n- [GraphQL Module](#graphql-module)\n- [Files Module](#files-module)\n- [Realtime Module](#realtime-module)\n- [Notifications Module](#notifications-module)\n- [REST Module](#rest-module)\n- [Error Handling](#error-handling)\n- [Retry & Timeout](#retry--timeout)\n- [Custom Fetch](#custom-fetch)\n- [Health Check](#health-check)\n- [Storage Adapters](#storage-adapters)\n- [TypeScript Types](#typescript-types)\n\n---\n\n## Installation\n\n```bash\nnpm install @archie/js-sdk\n# or\npnpm add @archie/js-sdk\n```\n\n## Quick Start\n\n```typescript\nimport { createClient } from '@archie/js-sdk';\n\nconst archie = createClient({\n  projectId: 'your-project-uuid',\n  apiKey: 'anon your-api-key',\n  apiUrl: 'https://your-project.archiecore.com',\n  environment: 'master',\n});\n\n// Sign in\nconst { session } = await archie.auth.signIn({\n  email: 'user@example.com',\n  password: 'secret',\n});\n\n// Query data\nconst { data, error } = await archie.graphql.query('{ users { id email } }');\n```\n\n---\n\n## Configuration\n\n```typescript\nconst archie = createClient({\n  // Required\n  projectId: 'your-project-uuid',\n\n  // API key — sent as-is in the Authorization header when no user JWT is present.\n  // Examples: 'anon xxxxx', 'Bearer eyJhbG...', 'custom-prefix token123'\n  apiKey: 'anon your-api-key',\n\n  // Environment (default: 'master')\n  environment: 'development',\n\n  // Base URLs\n  apiUrl: 'https://example.platform.com',\n  authUrl: 'https://example.platform.com', // defaults to apiUrl\n  realtimeUrl: 'https://example.platform.com', // defaults to apiUrl\n\n  // Session behavior\n  autoRefreshToken: true, // auto-refresh JWT before expiry (default: true)\n  persistSession: true, // persist session in storage (default: true)\n\n  // Custom storage adapter (default: localStorage in browser, memory in Node)\n  storageAdapter: customAdapter,\n\n  // Extra headers added to every request\n  headers: { 'x-custom': 'value' },\n\n  // Retry & timeout\n  timeout: 30000, // request timeout in ms (default: 30000, 0 = disabled)\n  retries: 3, // max retry attempts for transient errors (default: 0)\n  retryDelay: 200, // initial backoff delay in ms (default: 200)\n\n  // Custom fetch — for testing, proxies, or edge runtimes\n  fetch: customFetchImpl,\n\n  // Logging\n  debug: false, // enable console logging (default: false)\n  logger: customLogger, // custom Logger implementation (overrides debug flag)\n});\n```\n\n| Option             | Type                    | Default                    | Description                              |\n| ------------------ | ----------------------- | -------------------------- | ---------------------------------------- |\n| `projectId`        | `string`                | **required**               | Project UUID                             |\n| `apiKey`           | `string`                | `undefined`                | API key, sent as-is in Authorization     |\n| `getAccessToken`   | `() => string \\| null`  | `undefined`                | External token provider (e.g. Auth0)     |\n| `environment`      | `string`                | `'master'`                 | Environment name                         |\n| `apiUrl`           | `string`                | `'https://api.archie.dev'` | API Manager URL                          |\n| `authUrl`          | `string`                | same as `apiUrl`           | Auth service URL                         |\n| `realtimeUrl`      | `string`                | same as `apiUrl`           | WebSocket URL (auto-converts to `ws://`) |\n| `autoRefreshToken` | `boolean`               | `true`                     | Auto-refresh JWT 60s before expiry       |\n| `persistSession`   | `boolean`               | `true`                     | Persist session in storage               |\n| `storageAdapter`   | `StorageAdapter`        | auto-detect                | Custom storage (localStorage or memory)  |\n| `headers`          | `Record<string,string>` | `{}`                       | Extra headers on every request           |\n| `timeout`          | `number`                | `30000`                    | Request timeout in ms (0 = disabled)     |\n| `retries`          | `number`                | `0`                        | Max retry attempts for transient errors  |\n| `retryDelay`       | `number`                | `200`                      | Initial backoff delay in ms              |\n| `fetch`            | `typeof fetch`          | `globalThis.fetch`         | Custom fetch for testing/edge runtimes   |\n| `debug`            | `boolean`               | `false`                    | Enable console logging                   |\n| `logger`           | `Logger`                | noop                       | Custom logger implementation             |\n\n### Authorization Priority\n\nThe SDK determines the `Authorization` header using this priority:\n\n1. **External token** (`getAccessToken()` returns a token) → `Authorization: Bearer {token}`\n2. **User JWT** (after `signIn`) → `Authorization: Bearer {jwt}`\n3. **API key** (from config) → `Authorization: {apiKey}` (sent as-is)\n4. **Nothing** → no `Authorization` header\n\n### Exchange codes (password-less sessions minted by a trusted server)\n\n`auth.exchangeCode({ code })` redeems a **single-use, 60-second code** issued server-side\n(`POST /auth/admin/exchange-code`, admin key required — never from a browser) for a normal\nsession as the user the code was issued for, with that user's real roles. Archie uses it to\nopen a generated app inside its preview iframe as a seeded user without a password.\n\n```ts\nconst { session } = await archie.auth.exchangeCode({ code });\nsession.user.roles; // the user's real role names\n```\n\nAn exchange session has **no refresh token** and cannot be refreshed: it ends when its\naccess token expires (the project's access-token TTL, 15 minutes by default). With\n`autoRefreshToken` on, the SDK emits `SESSION_EXPIRING` 60 seconds before that, so the app\ncan obtain a fresh code and call `exchangeCode` again — the new session replaces the old\none in place. If nothing replaces it, `SIGNED_OUT` fires at expiry.\n\n```ts\narchie.auth.onAuthStateChange((event) => {\n  if (event === 'SESSION_EXPIRING') askTheHostForANewCode();\n});\n```\n\nFailures are `AuthError`s whose `code` is the backend's `extensions.code`\n(`EXCHANGE_CODE_INVALID`, `EXCHANGE_CODE_EXPIRED`, `EXCHANGE_CODE_ALREADY_USED`,\n`EXCHANGE_USER_NOT_FOUND`, `EXCHANGE_USER_DISABLED`, `EXCHANGE_RATE_LIMITED`). Branch on\n`code`, never on the message text.\n\n### External auth (Auth0, etc.)\n\nIf your app authenticates the user elsewhere (e.g. Auth0) and you don't use `auth.signIn`,\nsupply the token via `getAccessToken`. The SDK calls it **fresh on every HTTP request and\nWebSocket connect**, so you never recreate the client when the token refreshes — just keep a\ntoken your app updates out-of-band:\n\n```ts\nlet currentToken: string | null = null; // your app updates this on Auth0 refresh\n\nconst archie = createClient({\n  projectId: 'your-project-uuid',\n  apiUrl: 'https://your-project.archiecore.com',\n  environment: 'master',\n  getAccessToken: () => currentToken, // raw token; the SDK adds the `Bearer ` prefix\n});\n```\n\nWrites (e.g. mutations) require a real user identity, so use a user token here — not an\nanonymous `apiKey`.\n\n---\n\n## Auth Module\n\nAccess via `archie.auth`. Handles registration, login, session management, auto-refresh, and auth events.\n\n### Sign Up\n\n```typescript\nconst { userId, message } = await archie.auth.signUp({\n  email: 'new@user.com',\n  password: 'StrongP@ss1',\n  firstName: 'Jane', // optional\n  lastName: 'Doe', // optional\n  roleId: 'role-uuid', // optional\n});\nconsole.log(message); // \"Confirmation code sent to email\"\n```\n\n### Confirm Sign Up\n\nAfter the user receives a verification code by email:\n\n```typescript\nconst { session } = await archie.auth.confirmSignUp({\n  email: 'new@user.com',\n  code: '123456',\n});\n// User is now signed in — session contains accessToken, refreshToken, user\n```\n\n### Sign In\n\n```typescript\nconst { session } = await archie.auth.signIn({\n  email: 'user@example.com',\n  password: 'secret',\n});\n\nconsole.log(session.user); // { id, email, firstName, lastName, roles }\nconsole.log(session.accessToken); // JWT\nconsole.log(session.expiresAt); // Unix timestamp (seconds)\n```\n\n### Sign Out\n\n```typescript\nawait archie.auth.signOut();\n// Clears session, storage, and stops auto-refresh\n```\n\n### Get Current Session / User\n\n```typescript\nconst session = archie.auth.getSession(); // Session | null\nconst user = archie.auth.getUser(); // User | null\n\nif (user) {\n  console.log(user.id, user.email, user.roles);\n}\n```\n\n### Wait for Initialization\n\nOn page load, the SDK restores the session from storage asynchronously. Wait for it before checking auth state:\n\n```typescript\nawait archie.auth.waitForInit();\nconst user = archie.auth.getUser(); // now guaranteed to be loaded\n```\n\n### Auth State Changes\n\n```typescript\nconst unsubscribe = archie.auth.onAuthStateChange((event, session) => {\n  // event: 'SIGNED_IN' | 'SIGNED_OUT' | 'TOKEN_REFRESHED' | 'USER_UPDATED'\n  switch (event) {\n    case 'SIGNED_IN':\n      console.log('Logged in as', session.user.email);\n      break;\n    case 'SIGNED_OUT':\n      console.log('Logged out');\n      break;\n    case 'TOKEN_REFRESHED':\n      console.log('Token refreshed silently');\n      break;\n  }\n});\n\n// Stop listening\nunsubscribe();\n```\n\n### Password Recovery\n\n```typescript\n// Step 1: Request recovery email\nconst { message } = await archie.auth.recoverPassword({\n  email: 'user@example.com',\n});\n\n// Step 2: Reset password with the code received by email\nconst { message } = await archie.auth.resetPassword({\n  email: 'user@example.com',\n  code: '123456',\n  newPassword: 'NewStr0ngP@ss',\n});\n```\n\n### Manual Token Refresh\n\nUsually handled automatically when `autoRefreshToken: true`, but can be called manually:\n\n```typescript\nconst { session } = await archie.auth.refreshSession();\n```\n\n### Get JWKS\n\nFetch the JSON Web Key Set for server-side JWT verification:\n\n```typescript\nconst { keys } = await archie.auth.getJWKS();\n```\n\n### Auto-Refresh Behavior\n\nWhen `autoRefreshToken: true` (default):\n\n- After sign in, the SDK schedules a token refresh **60 seconds before expiry**\n- On refresh success, emits `TOKEN_REFRESHED` and schedules the next refresh\n- On refresh failure, calls `signOut()` automatically\n\n### Session Persistence\n\nWhen `persistSession: true` (default):\n\n- Session is saved to storage after every sign in and token refresh\n- On client creation, the SDK restores the session from storage\n- If the stored token is expired, it attempts a refresh automatically\n- Storage key format: `archie-auth-{projectId}-{environment}`\n\n---\n\n## GraphQL Module\n\nAccess via `archie.graphql`. Execute queries and mutations against the Archie API Manager's `/graphql` endpoint.\n\n### Query\n\nReturns `{ data, error }` — never throws for GraphQL-level errors:\n\n```typescript\ninterface User {\n  id: string;\n  email: string;\n  name: string;\n}\n\nconst { data, error } = await archie.graphql.query<{ users: User[] }>(\n  '{ users { id email name } }',\n);\n\nif (error) {\n  console.error(error.message, error.code);\n} else {\n  console.log(data.users);\n}\n```\n\n### Query with Variables\n\n```typescript\nconst { data, error } = await archie.graphql.query<{ user: User }>(\n  `query GetUser($id: ID!) {\n    user(id: $id) { id email name }\n  }`,\n  { id: 'user-123' },\n);\n```\n\n### Mutation\n\n```typescript\nconst { data, error } = await archie.graphql.mutate<{ createUser: User }>(\n  `mutation CreateUser($input: CreateUserInput!) {\n    createUser(input: $input) { id email }\n  }`,\n  { input: { email: 'new@user.com', name: 'New User' } },\n);\n```\n\n### Raw Request (Advanced)\n\nFor cases where you want the raw data and want errors to throw:\n\n```typescript\ntry {\n  const data = await archie.graphql.request<{ users: User[] }>({\n    query: '{ users { id email } }',\n    variables: {},\n    operationName: 'GetUsers',\n  });\n  console.log(data.users); // direct access, no { data, error } wrapper\n} catch (err) {\n  // Throws GraphQLError on failure\n}\n```\n\n### Request Options\n\nBoth `query()` and `mutate()` accept an optional third parameter:\n\n```typescript\nconst controller = new AbortController();\n\nconst { data } = await archie.graphql.query(\n  '{ users { id } }',\n  {},\n  {\n    headers: { 'x-custom': 'value' }, // extra headers for this request\n    signal: controller.signal, // AbortSignal for cancellation\n  },\n);\n\n// Cancel the request\ncontroller.abort();\n```\n\n### GraphQL Response Shape\n\n```typescript\n// Success case\n{ data: T, error: null }\n\n// Error case (GraphQL-level errors — partial data may exist)\n{ data: T | null, error: GraphQLError }\n\n// Network/HTTP error\n{ data: null, error: ArchieError }\n```\n\n---\n\n## Files Module\n\nAccess via `archie.files`. Upload, download, and manage files via GraphQL multipart uploads.\n\n### Upload a File\n\n```typescript\n// From a File input\nconst input = document.querySelector<HTMLInputElement>('#fileInput');\nconst file = input.files[0];\n\nconst { url, fileId } = await archie.files.upload(file, {\n  filename: 'photo.jpg',\n  contentType: 'image/jpeg',\n  providerType: 's3', // optional — storage provider hint\n  onProgress: (pct) => console.log(`${pct}% uploaded`), // optional — progress callback\n});\n\nconsole.log(url); // CDN URL of the uploaded file\nconsole.log(fileId); // Unique file ID for download/reference\n```\n\n### Upload from a Blob or Uint8Array\n\n```typescript\n// Blob\nconst blob = new Blob(['Hello, world!'], { type: 'text/plain' });\nconst result = await archie.files.upload(blob, { filename: 'hello.txt' });\n\n// Uint8Array (works in Node.js too)\nconst bytes = new Uint8Array([0x48, 0x65, 0x6c, 0x6c, 0x6f]);\nconst result = await archie.files.upload(bytes, { filename: 'hello.bin' });\n```\n\n### Upload CSV\n\nImport a CSV file into a database table:\n\n```typescript\nconst csvFile = document.querySelector<HTMLInputElement>('#csvInput').files[0];\n\nconst { result } = await archie.files.uploadCsv(csvFile, {\n  tableName: 'products',\n  transactionality: true, // optional — rollback all on error\n  limit: 1000, // optional — max rows to import\n});\n\nconsole.log(result.success); // boolean\nconsole.log(result.rowsImported); // number\nconsole.log(result.errors); // any import-level errors\n```\n\n### Download a File\n\n```typescript\nconst blob = await archie.files.download('file-id-123');\n\n// In the browser, trigger a download:\nconst url = URL.createObjectURL(blob);\nconst a = document.createElement('a');\na.href = url;\na.download = 'my-file.pdf';\na.click();\nURL.revokeObjectURL(url);\n```\n\n### Get File URL\n\nBuilds the file URL locally, no network request:\n\n```typescript\nconst url = archie.files.getUrl('file-id-123');\n// → \"https://example.platform.com/files?id=file-id-123\"\n```\n\n---\n\n## Realtime Module\n\nAccess via `archie.realtime`. WebSocket subscriptions using the `graphql-transport-ws` protocol with lazy connection and auto-reconnect.\n\n### Subscribe to a GraphQL Subscription\n\n```typescript\nconst sub = archie.realtime.subscribe<{ orderUpdated: Order }>(\n  `subscription {\n    orderUpdated { id status total }\n  }`,\n  {},\n  {\n    onData: (data) => {\n      console.log('Order updated:', data.orderUpdated);\n    },\n    onError: (error) => {\n      console.error('Subscription error:', error.message);\n    },\n    onComplete: () => {\n      console.log('Subscription ended');\n    },\n  },\n);\n\n// Later: stop listening\nsub.unsubscribe();\n```\n\n### Subscribe with Variables\n\n```typescript\nconst sub = archie.realtime.subscribe(\n  `subscription OnUserActivity($userId: ID!) {\n    userActivity(userId: $userId) { action timestamp }\n  }`,\n  { userId: 'user-123' },\n  { onData: (data) => console.log(data) },\n);\n```\n\n### Channel-Based API\n\nA higher-level convenience API for table-level event subscriptions:\n\n```typescript\nconst channel = archie.realtime.channel('orders');\n\nchannel\n  .on('INSERT', (payload) => {\n    console.log('New order:', payload);\n  })\n  .on('UPDATE', (payload) => {\n    console.log('Order updated:', payload);\n  })\n  .on('DELETE', (payload) => {\n    console.log('Order deleted:', payload);\n  })\n  .on('*', (payload) => {\n    console.log('Any event:', payload);\n  });\n\n// Start listening\nchannel.subscribe();\n\n// Stop listening\nchannel.unsubscribe();\n```\n\n### Connection State\n\n```typescript\n// Current state\nconsole.log(archie.realtime.currentState);\n// → 'DISCONNECTED' | 'CONNECTING' | 'CONNECTED' | 'RECONNECTING'\n\n// Listen for changes\nconst unsubscribe = archie.realtime.onConnectionStateChange((state) => {\n  console.log('WebSocket state:', state);\n  if (state === 'RECONNECTING') {\n    showReconnectingBanner();\n  }\n});\n\nunsubscribe();\n```\n\n### Auto-Reconnect\n\nThe WebSocket automatically reconnects with exponential backoff when the connection drops:\n\n- Backoff schedule: 1s → 2s → 4s → 8s → 16s → 30s (max)\n- Reconnect counter resets after a successful `connection_ack`\n- The connection closes automatically when the last subscription is unsubscribed\n- On `TOKEN_REFRESHED`, the connection is re-established with the new credentials\n\n---\n\n## Notifications Module\n\nAccess via `archie.notifications`. Subscribe to live in-app notifications (Pusher-style channels) and manage read state.\n\n### Subscribe (live channel)\n\n`receiverId` is the authenticated user's id — obtainable from `archie.auth.getUser()?.id`.\n\n```ts\nconst receiverId = archie.auth.getUser()?.id ?? '';\n\nconst channel = archie.notifications.subscribe(receiverId, {\n  onError: (err) => console.error('Notification channel error:', err),\n});\n\n// Filter by notification key\nchannel.on('welcome', (n) => {\n  toast(n.actionText ?? 'Welcome!');\n});\n\n// Receive every notification\nchannel.on('*', (n) => {\n  badge.increment();\n});\n\n// Clean up on unmount / sign-out\nchannel.unsubscribe();\n```\n\n`.on()` is chainable:\n\n```ts\nchannel\n  .on('order_shipped', (n) => showShippingToast(n))\n  .on('payment_received', () => refreshBalance())\n  .on('*', () => incrementBadge());\n```\n\n### List notifications (paginated)\n\n```ts\nconst { items, count, totalCount } = await archie.notifications.list(receiverId, {\n  unreadOnly: true, // only unread (default: false)\n  first: 20, // page size\n  skip: 0, // offset for pagination\n  orderBy: { createdAt: 'DESC' }, // field-to-direction map (default: { createdAt: 'DESC' })\n});\n```\n\n| Option          | Type                            | Description                                                              |\n| --------------- | ------------------------------- | ------------------------------------------------------------------------ |\n| `unreadOnly`    | `boolean`                       | Return only unread notifications                                         |\n| `first`         | `number`                        | Page size limit                                                          |\n| `skip`          | `number`                        | Offset for pagination                                                    |\n| `orderBy`       | `Record<string, 'ASC'\\|'DESC'>` | Field-to-direction map (e.g. `{ createdAt: 'DESC' }`)                    |\n| `createdBefore` | `string`                        | Keyset cursor: return rows older than this ISO `createdAt`               |\n| `excludeIds`    | `string[]`                      | Tie-safe keyset: loaded ids at the `createdBefore` timestamp (see below) |\n| `includeTotal`  | `boolean`                       | Request `count`/`totalCount`. Default `true`; `false` skips the COUNT    |\n\nReturns `{ items: Notification[]; count: number; totalCount: number }`.\n\n#### Paginating history (infinite scroll)\n\n`list` supports keyset (cursor-free) backward pagination via `createdBefore`. Pass the\n`createdAt` of the oldest row you already have to fetch the next older page — robust against\nnew notifications arriving at the head, and index-efficient at any depth:\n\n```ts\nconst first = await archie.notifications.list(receiverId, { first: 20 });\nconst oldest = first.items[first.items.length - 1];\n\nconst older = await archie.notifications.list(receiverId, {\n  first: 20,\n  orderBy: { createdAt: 'DESC' },\n  createdBefore: oldest.createdAt,\n  // Tie-safe: don't skip rows that share the cursor's exact `createdAt`. Pass the ids you've\n  // already loaded at that timestamp (e.g. fan-out notifications inserted in the same transaction\n  // share one `createdAt`). Omit for the simpler strict-`<` behavior.\n  excludeIds: first.items.filter((n) => n.createdAt === oldest.createdAt).map((n) => n.id),\n  // Skip the COUNT aggregate on deep pages; derive `hasMore` from the page fill instead.\n  includeTotal: false,\n});\n\nconst hasMore = older.items.length === 20; // full page → more may remain; short page → tail\n```\n\n> The `@archie/react-sdk` `useNotifications` hook does all of this for you (tie-safe cursor,\n> `excludeIds` tracking, page-fill `hasMore`). Reach for the raw options only when paginating\n> outside React.\n\n### Unread count\n\n```ts\nconst unread = await archie.notifications.getUnreadCount(receiverId);\n// → number\n```\n\n### Mark as read\n\n```ts\n// Mark a single notification — returns the updated Notification\nconst updated = await archie.notifications.markAsRead(notificationId);\n\n// Mark all for this receiver — returns count of notifications marked (client-side paginated emulation)\nconst markedCount = await archie.notifications.markAllAsRead(receiverId);\n```\n\n### Notification shape\n\nAll fields are camelCase — the SDK normalizes backend inconsistencies before delivering them to you.\n\n```ts\ninterface Notification {\n  id: string;\n  receiverId: string;\n  notificationKey: string; // event key, e.g. 'welcome', 'order_shipped'\n  notificationType?: string | null;\n  notificationTypeId?: string | null;\n  actionText?: string | null; // CTA label\n  actionUrl?: string | null; // CTA destination — validate before rendering (see Security below)\n  isRead: boolean;\n  readAt?: string | null; // ISO date\n  expiresAt?: string | null; // ISO date\n  metadata?: Record<string, unknown> | null;\n  params?: Record<string, unknown> | null; // template variables, e.g. { name: 'Ana' }\n  dedupKey?: string | null;\n  createdAt: string; // ISO date\n  updatedAt?: string | null;\n}\n```\n\n### Security & trust model\n\n**Authorization is enforced by the Archie backend, not the SDK.** `receiverId` and notification `id` are request parameters, not a client-side trust boundary. The backend scopes all reads and writes to the authenticated principal. Passing a particular `receiverId` does not grant your client authorization to that receiver's data.\n\n**Treat `actionUrl` as untrusted server-controlled data.** Before rendering it as a link (e.g. `<a href={n.actionUrl}>`), validate the scheme is `http:` or `https:`. Never allow `javascript:` or `data:` URLs — they enable stored XSS attacks in your application.\n\n```ts\n// Safe actionUrl rendering\nfunction safeActionUrl(url: string | null | undefined): string | undefined {\n  if (!url) return undefined;\n  try {\n    const { protocol } = new URL(url);\n    if (protocol === 'http:' || protocol === 'https:') return url;\n  } catch {\n    // not a valid URL\n  }\n  return undefined;\n}\n\n// In JSX\n<a href={safeActionUrl(n.actionUrl)}>View</a>\n```\n\n**`metadata` and `params` are untrusted server data.** If you deep-merge them into other objects, use a safe merge that guards against prototype-polluting keys (`__proto__`, `constructor`, `prototype`).\n\n---\n\n## REST Module\n\nAccess via `archie.rest`. For consuming custom REST APIs created via the Archie gateway. All standard headers (`x-project-id`, `authorization`, `environment`) are injected automatically.\n\n### GET\n\n```typescript\nconst products = await archie.rest.get<Product[]>('/api/products');\n\n// With query parameters\nconst results = await archie.rest.get<Product[]>('/api/products', {\n  params: { category: 'electronics', limit: '10' },\n});\n// → GET /api/products?category=electronics&limit=10\n```\n\n### POST\n\n```typescript\nconst created = await archie.rest.post<Product>('/api/products', {\n  name: 'Widget',\n  price: 9.99,\n});\n```\n\n### PUT\n\n```typescript\nawait archie.rest.put('/api/products/123', {\n  name: 'Updated Widget',\n  price: 12.99,\n});\n```\n\n### PATCH\n\n```typescript\nawait archie.rest.patch('/api/products/123', { price: 14.99 });\n```\n\n### DELETE\n\n```typescript\nawait archie.rest.delete('/api/products/123');\n```\n\n### Request Options\n\nAll REST methods accept an options parameter:\n\n```typescript\nconst controller = new AbortController();\n\nconst data = await archie.rest.get('/api/products', {\n  headers: { 'x-custom': 'value' },\n  params: { page: '2' },\n  signal: controller.signal,\n});\n```\n\n### REST Error Handling\n\nREST methods throw `ArchieError` on non-2xx responses:\n\n```typescript\ntry {\n  await archie.rest.get('/api/products/missing');\n} catch (err) {\n  if (err instanceof ArchieError) {\n    console.log(err.status); // 404\n    console.log(err.code); // 'HTTP_404'\n    console.log(err.message); // server-provided message\n  }\n}\n```\n\n---\n\n## Error Handling\n\nThe SDK provides a structured error hierarchy. All errors extend `ArchieError`.\n\n### Error Classes\n\n| Class          | When                                        | Key Properties                                 |\n| -------------- | ------------------------------------------- | ---------------------------------------------- |\n| `ArchieError`  | Base class for all SDK errors               | `message`, `code`, `status`, `details`, `hint` |\n| `AuthError`    | Any failure of an `auth.*` call             | Same as ArchieError                            |\n| `GraphQLError` | GraphQL response errors                     | `path`, `locations` + ArchieError props        |\n| `NetworkError` | Network issues (timeout, DNS, disconnected) | `hint` = \"Check your internet...\"              |\n\n### Catching Errors\n\n```typescript\nimport { ArchieError, AuthError, GraphQLError, NetworkError } from '@archie/js-sdk';\n\ntry {\n  await archie.auth.signIn({ email: 'test@test.com', password: 'wrong' });\n} catch (err) {\n  if (err instanceof AuthError) {\n    console.log(err.code); // 'AUTH_INVALID_CREDENTIALS', or 'AUTH_ERROR' — see below\n    console.log(err.status); // 401\n    console.log(err.message); // 'Invalid credentials' — safe to show the user\n  } else if (err instanceof NetworkError) {\n    // Could not reach the service — not a credential problem.\n    console.log(err.hint); // 'Check your internet connection or API URL'\n  } else if (err instanceof ArchieError) {\n    // The auth service answered, but not with a verdict: 5xx, timeout, gateway page.\n    // Surface it as unavailability rather than as a failed login.\n    console.log(err.code, err.status, err.details); // e.g. 'HTTP_500' / 'TIMEOUT'\n  }\n}\n```\n\n### GraphQL Error Handling\n\n`query()` and `mutate()` return errors in the response instead of throwing:\n\n```typescript\nconst { data, error } = await archie.graphql.query('{ invalidField }');\n\nif (error) {\n  console.log(error.message); // 'Cannot query field \"invalidField\"'\n  console.log(error.code); // 'GRAPHQL_VALIDATION_FAILED'\n  console.log(error.path); // ['invalidField']\n  console.log(error.locations); // [{ line: 1, column: 3 }]\n}\n```\n\n### Auth Error Codes\n\nA failed `auth.*` call throws one of two families, and it is worth handling both:\n\n- **The server reached a verdict** — wrong password, unverified email, expired code. Always an\n  `AuthError`, including when the backend reports it as an HTTP 200 carrying a GraphQL\n  `errors[]` body, which is how the Archie auth service answers a rejected login. `err.message`\n  carries the backend's wording and is safe to show the user.\n- **The service could not answer** — network failure, timeout, a 5xx or gateway page with no\n  GraphQL error channel. These stay `NetworkError` or `ArchieError` and are deliberately _not_\n  dressed up as auth failures: nothing was wrong with the credentials. Treat them as\n  unavailability — \"try again in a moment\", not \"check your password\".\n\nSo `err instanceof AuthError` is the branch for a rejected credential, but it must not be your\nonly branch: a login form that tests it alone falls silent whenever the auth service is down.\n\n`err.code` carries the code the server put in `extensions.code`; when the server sends none, it\nfalls back to the generic **`AUTH_ERROR`**. Branch on `code` for specific handling, but treat\nany `AuthError` as a failed auth operation.\n\n| Code                       | Description                                 |\n| -------------------------- | ------------------------------------------- |\n| `AUTH_INVALID_CREDENTIALS` | Wrong email/password                        |\n| `AUTH_EMAIL_EXISTS`        | Email already registered                    |\n| `AUTH_EMAIL_NOT_VERIFIED`  | Email confirmation required                 |\n| `AUTH_ACCOUNT_LOCKED`      | Account temporarily locked                  |\n| `AUTH_INVALID_CODE`        | Invalid verification/recovery code          |\n| `AUTH_TOKEN_EXPIRED`       | Access token has expired                    |\n| `AUTH_TOKEN_INVALID`       | Malformed or revoked token                  |\n| `AUTH_NOT_CONFIGURED`      | Auth not enabled for the project            |\n| `AUTH_WEAK_PASSWORD`       | Password doesn't meet strength requirements |\n| `AUTH_ERROR`               | Auth failure the server sent no code for    |\n| `AUTH_INVALID_RESPONSE`    | Auth service returned an unusable payload   |\n\n### Automatic 401 Retry\n\nWhen a request returns 401:\n\n1. The SDK attempts to refresh the token automatically\n2. If refresh succeeds, the original request is retried with the new token\n3. If refresh fails, the user is signed out and the error is thrown\n\nThis is transparent — your code doesn't need to handle it.\n\n---\n\n## Retry & Timeout\n\nThe SDK supports automatic retries with exponential backoff and per-request timeouts.\n\n### Configuration\n\n```typescript\nconst archie = createClient({\n  projectId: 'your-project-uuid',\n  retries: 3, // retry up to 3 times on transient errors\n  retryDelay: 200, // initial delay: 200ms → 400ms → 800ms (with jitter)\n  timeout: 15_000, // abort requests after 15 seconds\n});\n```\n\n### Retryable Conditions\n\nThe SDK retries automatically on:\n\n| Condition        | Status Codes / Errors                 |\n| ---------------- | ------------------------------------- |\n| Server errors    | `500`, `502`, `503`, `504`            |\n| Rate limiting    | `429` (respects `Retry-After` header) |\n| Network failures | `TypeError` (DNS, connectivity)       |\n| Timeouts         | `TIMEOUT` errors                      |\n\nNon-retryable errors (`400`, `401`, `403`, `404`, `409`, etc.) are thrown immediately.\n\n### Backoff Strategy\n\nExponential with jitter to prevent thundering herd:\n\n```\ndelay = min(baseDelay × 2^(attempt-1) + random_jitter, 30s)\n```\n\n### Timeout Behavior\n\n- When `timeout > 0`, each individual request (including retries) is aborted after `timeout` milliseconds\n- Throws `ArchieError` with `code: 'TIMEOUT'` and `status: 408`\n- Set `timeout: 0` to disable (no timeout)\n- User-provided `AbortSignal` takes precedence over timeout\n\n---\n\n## Custom Fetch\n\nInject a custom `fetch` implementation for testing, proxies, or edge runtimes:\n\n```typescript\nimport { createClient } from '@archie/js-sdk';\n\n// Testing with a mock\nconst mockFetch = vi.fn().mockResolvedValue(new Response('{}'));\nconst archie = createClient({\n  projectId: 'test',\n  fetch: mockFetch,\n});\n\n// Edge runtime (Cloudflare Workers, Deno)\nconst archie = createClient({\n  projectId: '...',\n  fetch: globalThis.fetch, // or a custom implementation\n});\n\n// Proxy / logging middleware\nconst archie = createClient({\n  projectId: '...',\n  fetch: async (url, init) => {\n    console.log('→', init?.method, url);\n    const response = await globalThis.fetch(url, init);\n    console.log('←', response.status);\n    return response;\n  },\n});\n```\n\n---\n\n## Health Check\n\nVerify connectivity to the API before performing operations:\n\n```typescript\nconst isUp = await archie.ping();\n\nif (isUp) {\n  console.log('API is reachable');\n} else {\n  console.warn('API is unreachable');\n}\n```\n\nReturns `true` if the API responds with a `2xx` status, `false` otherwise. Never throws.\n\n---\n\n## Storage Adapters\n\nThe SDK uses a `StorageAdapter` interface for session persistence. You can provide a custom implementation.\n\n### Interface\n\n```typescript\ninterface StorageAdapter {\n  getItem(key: string): string | null | Promise<string | null>;\n  setItem(key: string, value: string): void | Promise<void>;\n  removeItem(key: string): void | Promise<void>;\n}\n```\n\n### Built-in Adapters\n\n```typescript\nimport { BrowserLocalStorage, MemoryStorage } from '@archie/js-sdk';\n\n// Browser — uses localStorage (default in browser)\nconst archie = createClient({\n  projectId: '...',\n  storageAdapter: new BrowserLocalStorage(),\n});\n\n// In-memory — for SSR, tests, or environments without localStorage\nconst archie = createClient({\n  projectId: '...',\n  storageAdapter: new MemoryStorage(),\n});\n```\n\n### Custom Adapter Example (AsyncStorage for React Native)\n\n```typescript\nimport AsyncStorage from '@react-native-async-storage/async-storage';\n\nconst archie = createClient({\n  projectId: '...',\n  storageAdapter: {\n    getItem: (key) => AsyncStorage.getItem(key),\n    setItem: (key, value) => AsyncStorage.setItem(key, value),\n    removeItem: (key) => AsyncStorage.removeItem(key),\n  },\n});\n```\n\n---\n\n## TypeScript Types\n\nAll types are exported for strong typing in your application.\n\n### Core Types\n\n```typescript\nimport type { ArchieClientOptions, Session, User } from '@archie/js-sdk';\n```\n\n### Auth Types\n\n```typescript\nimport type {\n  AuthSignUpParams,\n  AuthSignInParams,\n  AuthConfirmParams,\n  AuthRecoverParams,\n  AuthResetPasswordParams,\n  AuthEvent, // 'SIGNED_IN' | 'SIGNED_OUT' | 'TOKEN_REFRESHED' | 'USER_UPDATED'\n  AuthEventCallback,\n} from '@archie/js-sdk';\n```\n\n### GraphQL Types\n\n```typescript\nimport type {\n  GraphQLResponse, // { data: T | null; error: ArchieError | null }\n  GraphQLRequestOptions, // { headers?, signal? }\n  GraphQLRawRequest, // { query, variables?, operationName? }\n} from '@archie/js-sdk';\n```\n\n### File Types\n\n```typescript\nimport type {\n  FileUploadOptions, // { filename?, contentType?, providerType?, onProgress? }\n  FileUploadResult, // { url: string; fileId: string }\n  CsvUploadOptions, // { tableName, transactionality?, limit? }\n} from '@archie/js-sdk';\n```\n\n### Realtime Types\n\n```typescript\nimport type {\n  Subscription, // { unsubscribe: () => void }\n  SubscriptionCallbacks, // { onData, onError?, onComplete? }\n  RealtimeEvent, // 'INSERT' | 'UPDATE' | 'DELETE' | '*'\n  RealtimeChannel, // { on, subscribe, unsubscribe }\n  ConnectionState, // 'CONNECTING' | 'CONNECTED' | 'DISCONNECTED' | 'RECONNECTING'\n  ConnectionStateCallback,\n} from '@archie/js-sdk';\n```\n\n### REST Types\n\n```typescript\nimport type {\n  RestRequestOptions, // { headers?, params?, signal? }\n} from '@archie/js-sdk';\n```\n\n### Module Interfaces (for DI / Testing)\n\n```typescript\nimport type {\n  IAuthModule,\n  IGraphQLModule,\n  IFileModule,\n  IRealtimeModule,\n  IRestModule,\n  IHttpClient,\n  Logger,\n  TokenAccessor,\n  StorageAdapter,\n} from '@archie/js-sdk';\n```\n\n### Module Classes (for advanced typing)\n\nThe concrete module implementations are also exported for `instanceof` checks or advanced use:\n\n```typescript\nimport { AuthModule, GraphQLModule, FileModule, RealtimeModule, RestModule } from '@archie/js-sdk';\n```\n\n### Built-in Loggers\n\nTwo logger constants are available for the `logger` option:\n\n```typescript\nimport { consoleLogger, noopLogger } from '@archie/js-sdk';\n\n// Console logger — logs to console.debug/info/warn/error\nconst archie = createClient({ projectId: '...', logger: consoleLogger });\n\n// Noop logger — silences all logging (default)\nconst archie = createClient({ projectId: '...', logger: noopLogger });\n```\n\n---\n\n## License\n\n[MIT](../../LICENSE)\n","readmeFilename":"README.md"}