{"_id":"@api-wrappers/api-core","_rev":"9-9f33d17b306dcbf823c7d25698e76d4a","name":"@api-wrappers/api-core","dist-tags":{"latest":"1.1.1"},"versions":{"0.0.1":{"name":"@api-wrappers/api-core","version":"0.0.1","keywords":["http","client","fetch","plugin","cache","retry","api","wrapper","typescript"],"license":"MIT","_id":"@api-wrappers/api-core@0.0.1","maintainers":[{"name":"tdanks2000","email":"tommydanks2000@outlook.com"}],"dist":{"shasum":"a1d5efd5bab542e378cc3fd2f511f5c5b9783812","tarball":"https://registry.npmjs.org/@api-wrappers/api-core/-/api-core-0.0.1.tgz","fileCount":21,"integrity":"sha512-ALNhAQImmFS+g6IB6z1R7elpkgtASiCDRCxNiIm7ra0bCmv/kTIG3dtfmqanuwcwSdP5kNTGUC0CPFkem6DXkQ==","signatures":[{"sig":"MEUCIQDdZaECx49Kkmv+fPThGfbTLZla3JPQTkmWHffxKnl3qwIgao4q3MM46Kz3S9QxbR4Y6roI0UTs7L7D9TfcuY5jXBc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":287440},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"8492ec0bb69437a4029ffbf877ad70a7be771c7d","scripts":{"test":"bun test","build":"tsdown","check":"biome check --write .","check:ci":"biome check ."},"_npmUser":{"name":"tdanks2000","email":"tommydanks2000@outlook.com"},"_npmVersion":"11.13.0","description":"Shared HTTP client runtime for the api-wrappers organisation. Provides request orchestration, a plugin lifecycle, transport abstraction, and built-in cache/retry/logger plugins.","directories":{},"_nodeVersion":"22.17.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"0.21.7","@types/bun":"1.3.11","@biomejs/biome":"2.4.9"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/api-core_0.0.1_1778318491727_0.010369165937617275","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@api-wrappers/api-core","version":"0.0.2","keywords":["http","client","fetch","plugin","cache","retry","api","wrapper","typescript"],"license":"MIT","_id":"@api-wrappers/api-core@0.0.2","maintainers":[{"name":"tdanks2000","email":"tommydanks2000@outlook.com"}],"homepage":"https://github.com/Api-Wrappers/api-core#readme","bugs":{"url":"https://github.com/Api-Wrappers/api-core/issues"},"dist":{"shasum":"0c70186cf05c9c4548adba489fa0473c62d77a12","tarball":"https://registry.npmjs.org/@api-wrappers/api-core/-/api-core-0.0.2.tgz","fileCount":21,"integrity":"sha512-yn+kWg0ihwPqKYNrYEBRBNhZCQ2TxROTFnmITWGTJTBV2dsHKDASqlUhCAYQrNzZ9tFkqCXKhczA7VmS/teFPA==","signatures":[{"sig":"MEYCIQDI2lhHR7g8nv6jDIkkEUh9bbLJhMvyRosCoFld+ivSMgIhALugXVcQ2bQWQCR4UAnuDk7tJUXDifgHaNYiFCsAg0yY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@api-wrappers%2fapi-core@0.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":291283},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"3308c19d25400c347e38d135b5acb7abfc0a53ca","scripts":{"test":"bun test","build":"tsdown","check":"biome check --write .","check:ci":"biome check ."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:75921458-251e-4bbd-bcf4-43a83e549236"}},"repository":{"url":"git+https://github.com/Api-Wrappers/api-core.git","type":"git"},"_npmVersion":"11.11.0","description":"Shared HTTP client runtime for the api-wrappers organisation. Provides request orchestration, a plugin lifecycle, transport abstraction, and built-in cache/retry/logger plugins.","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"0.21.7","@types/bun":"1.3.11","@biomejs/biome":"2.4.9"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/api-core_0.0.2_1778320649324_0.3729507246057555","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@api-wrappers/api-core","version":"0.0.3","keywords":["http","client","fetch","plugin","cache","retry","api","wrapper","typescript"],"license":"MIT","_id":"@api-wrappers/api-core@0.0.3","maintainers":[{"name":"tdanks2000","email":"tommydanks2000@outlook.com"}],"homepage":"https://github.com/Api-Wrappers/api-core#readme","bugs":{"url":"https://github.com/Api-Wrappers/api-core/issues"},"dist":{"shasum":"99dfbe8e1f899ff9543362d8fe573c3270b0d725","tarball":"https://registry.npmjs.org/@api-wrappers/api-core/-/api-core-0.0.3.tgz","fileCount":21,"integrity":"sha512-YUbdgNaNwDvs+uKDxlNjdmrsPnIL2S8lNO6FBLTjrtImZfmxX7/OjB0ByUNVKiq428repafWKaqqo6JYt6m2kA==","signatures":[{"sig":"MEUCIQCZonwMH4sbWnV/n6YW4L6jDOcq6j6V8BLx0LzGyaEb1wIgKp4eEFk8ZW9WpP5jqUlGcBc68n9AX4bU6g1TqkDKOJ4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@api-wrappers%2fapi-core@0.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":305699},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"828e99b61e909f4125973367aed586a97d4a6c7c","scripts":{"test":"bun test","build":"tsdown","check":"biome check --write .","check:ci":"biome check ."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:75921458-251e-4bbd-bcf4-43a83e549236"}},"repository":{"url":"git+https://github.com/Api-Wrappers/api-core.git","type":"git"},"_npmVersion":"11.11.0","description":"Shared HTTP client runtime for the api-wrappers organisation. Provides request orchestration, a plugin lifecycle, transport abstraction, and built-in cache/retry/logger plugins.","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"0.21.7","@types/bun":"1.3.11","@biomejs/biome":"2.4.9"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/api-core_0.0.3_1778415175334_0.9357534342730331","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@api-wrappers/api-core","version":"1.0.0","keywords":["http","client","fetch","plugin","cache","retry","api","wrapper","typescript"],"license":"MIT","_id":"@api-wrappers/api-core@1.0.0","maintainers":[{"name":"tdanks2000","email":"tommydanks2000@outlook.com"}],"homepage":"https://github.com/Api-Wrappers/api-core#readme","bugs":{"url":"https://github.com/Api-Wrappers/api-core/issues"},"dist":{"shasum":"6d523715a93da71db3d1115222b4aefcc0a8db61","tarball":"https://registry.npmjs.org/@api-wrappers/api-core/-/api-core-1.0.0.tgz","fileCount":21,"integrity":"sha512-Q8lboFOh/cYa/Q3t0I30wB7xB87OF6ls/5dcrax5EZX+u4xpAJBhg+Mmjm+E/W3jhOR5pXqgUZ1PNQ4HvOoMcg==","signatures":[{"sig":"MEUCIQCfTCn7xDJ/Kjct/AP0c1G6s2gdbm1GLxCH6tV+dAwUDQIgXkC5otSZ/wmAtdUikdCw9xwIradVoVZkdbcMurO/Yzs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@api-wrappers%2fapi-core@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":305699},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"fdbbcb470047e80707fd27dd8a9a350937a36660","scripts":{"test":"bun test","build":"tsdown","check":"biome check --write .","check:ci":"biome check ."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:75921458-251e-4bbd-bcf4-43a83e549236"}},"repository":{"url":"git+https://github.com/Api-Wrappers/api-core.git","type":"git"},"_npmVersion":"11.11.0","description":"Shared HTTP client runtime for the api-wrappers organisation. Provides request orchestration, a plugin lifecycle, transport abstraction, and built-in cache/retry/logger plugins.","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"0.21.7","@types/bun":"1.3.11","@biomejs/biome":"2.4.9"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/api-core_1.0.0_1778607074043_0.39473754554791207","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@api-wrappers/api-core","version":"1.0.1","keywords":["http","client","fetch","plugin","cache","retry","api","wrapper","typescript"],"license":"MIT","_id":"@api-wrappers/api-core@1.0.1","maintainers":[{"name":"tdanks2000","email":"tommydanks2000@outlook.com"}],"homepage":"https://github.com/Api-Wrappers/api-core#readme","bugs":{"url":"https://github.com/Api-Wrappers/api-core/issues"},"dist":{"shasum":"7c7807b1cc85e6ed9af9b0bf008369f3ec671cd5","tarball":"https://registry.npmjs.org/@api-wrappers/api-core/-/api-core-1.0.1.tgz","fileCount":23,"integrity":"sha512-41scCl31yMc4a7ImVcpeLRrvZ3JCw3jZEuqUxaCY16twvXVqY4O7oigOcxZXazJkDWSvK6MFg5A4R0Rvq69NkQ==","signatures":[{"sig":"MEUCIFSErSKB85EcIzOPkAQxaddGyMAR/GEgzglURmDeE6KwAiEA6X8IgXjhVW6wclNK77sMT/JTotT+WCPMLcdWb8pCBOU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@api-wrappers%2fapi-core@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":321782},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.mts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"c10e78826ef0f92b7630875e6d3fc99520da6c20","scripts":{"test":"bun test","build":"tsdown","check":"biome check --write .","verify":"bun run check:ci && bun run typecheck && bun test && bun run build && bun run pack:dry-run","prepack":"bun run build","check:ci":"biome check .","typecheck":"tsc --noEmit","pack:dry-run":"bun pm pack --dry-run"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:75921458-251e-4bbd-bcf4-43a83e549236"}},"repository":{"url":"git+https://github.com/Api-Wrappers/api-core.git","type":"git"},"_npmVersion":"11.11.0","description":"Shared HTTP client runtime for the api-wrappers organisation. Provides request orchestration, a plugin lifecycle, transport abstraction, and built-in cache/retry/logger plugins.","directories":{},"sideEffects":false,"_nodeVersion":"24.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"bun@1.3.13","devDependencies":{"tsdown":"0.21.7","@types/bun":"1.3.11","typescript":"^5.9.3","@biomejs/biome":"2.4.9"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/api-core_1.0.1_1778763251843_0.20459744600147545","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@api-wrappers/api-core","version":"1.0.2","keywords":["http","client","fetch","plugin","cache","retry","api","wrapper","typescript"],"license":"MIT","_id":"@api-wrappers/api-core@1.0.2","maintainers":[{"name":"tdanks2000","email":"tommydanks2000@outlook.com"}],"homepage":"https://github.com/Api-Wrappers/api-core#readme","bugs":{"url":"https://github.com/Api-Wrappers/api-core/issues"},"dist":{"shasum":"80a3cffaf0d459e30789b0e8850941b0ec3f9cbd","tarball":"https://registry.npmjs.org/@api-wrappers/api-core/-/api-core-1.0.2.tgz","fileCount":23,"integrity":"sha512-T1IHFaxSEHCxhLFRzQx2wij4GE/LJfc5v4sry/e7lZyKq6mKYWReEEpfhfkt2bNXgW8nOK6H4BBfmThdnnuBFA==","signatures":[{"sig":"MEYCIQDRYQTtVw70zftYtaKM0RyVsjH1RhVsoqd8ZGXyCFG83QIhAK5faNqC0IDCuZjPN9m5a/99cyWvWTN1dqdpIQYxMFHS","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":322042},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.mts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"cce78a5ec33058b903c47737b53f8c97e0865e34","scripts":{"test":"bun test","build":"tsdown","check":"biome check --write .","verify":"bun run check:ci && bun run typecheck && bun test && bun run build && bun run pack:dry-run","prepack":"bun run build","check:ci":"biome check .","typecheck":"tsc --noEmit","pack:dry-run":"bun pm pack --dry-run"},"_npmUser":{"name":"tdanks2000","email":"tommydanks2000@outlook.com"},"repository":{"url":"git+https://github.com/Api-Wrappers/api-core.git","type":"git"},"_npmVersion":"11.13.0","description":"Shared HTTP client runtime for the api-wrappers organisation. Provides request orchestration, a plugin lifecycle, transport abstraction, and built-in cache/retry/logger plugins.","directories":{},"sideEffects":false,"_nodeVersion":"22.17.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"bun@1.3.13","devDependencies":{"tsdown":"0.21.7","@types/bun":"1.3.11","typescript":"^5.9.3","@biomejs/biome":"2.4.9"},"peerDependencies":{"typescript":"^5 || ^6"},"_npmOperationalInternal":{"tmp":"tmp/api-core_1.0.2_1778793820537_0.5100092365879649","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@api-wrappers/api-core","version":"1.0.3","keywords":["api-core","api-wrapper","api-wrappers","http","http-client","client","fetch","plugin","cache","retry","timeout","graphql","transport","bun","api","wrapper","typescript"],"license":"MIT","_id":"@api-wrappers/api-core@1.0.3","maintainers":[{"name":"tdanks2000","email":"tommydanks2000@outlook.com"}],"homepage":"https://github.com/Api-Wrappers/api-core#readme","bugs":{"url":"https://github.com/Api-Wrappers/api-core/issues"},"dist":{"shasum":"7344e693d36eafdb9d2baf8da80c5e03d9699c72","tarball":"https://registry.npmjs.org/@api-wrappers/api-core/-/api-core-1.0.3.tgz","fileCount":27,"integrity":"sha512-+TX4Nts0mjyJmzmhI+vSbbV5ROie3wTiahHiUyqvLRhhYdB78Z613RmJMh9/E7GSbvwqPn5OEPWS1+AWlaAaAw==","signatures":[{"sig":"MEYCIQCquf0pjyg941fyVO6zZ8zMujL0Sbycwk7MqqxToCq33AIhAPsFUESZ/v7jKbmDys8BfSKy11MA/As4ZiTFpTmDBnjo","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@api-wrappers%2fapi-core@1.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":374437},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.mts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"976831450a197961f813ac99cd19b6a0be34761a","scripts":{"test":"bun test","build":"tsdown","check":"biome check --write .","verify":"bun run check:ci && bun run typecheck && bun test && bun run build && bun run pack:dry-run && bun run smoke:package","prepack":"bun run build","release":"changeset publish","check:ci":"biome check .","changeset":"changeset","typecheck":"tsc --noEmit","pack:dry-run":"bun pm pack --dry-run","smoke:package":"bun ./scripts/smoke-package.ts","version-packages":"changeset version"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:75921458-251e-4bbd-bcf4-43a83e549236"}},"repository":{"url":"git+https://github.com/Api-Wrappers/api-core.git","type":"git"},"_npmVersion":"11.13.0","description":"Shared TypeScript HTTP runtime for Api-Wrappers packages with typed requests, plugins, retries, timeouts, GraphQL, and custom transports.","directories":{},"sideEffects":false,"_nodeVersion":"24.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"bun@1.3.13","devDependencies":{"tsdown":"0.21.7","@types/bun":"1.3.11","typescript":"^5.9.3","@biomejs/biome":"2.4.9","@changesets/cli":"^2.31.0"},"peerDependencies":{"typescript":"^5 || ^6"},"_npmOperationalInternal":{"tmp":"tmp/api-core_1.0.3_1782406831544_0.3872754728834207","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@api-wrappers/api-core","version":"1.1.0","keywords":["api-core","api-wrapper","api-wrappers","http","http-client","client","fetch","plugin","cache","retry","timeout","graphql","transport","bun","api","wrapper","typescript"],"license":"MIT","_id":"@api-wrappers/api-core@1.1.0","maintainers":[{"name":"tdanks2000","email":"tommydanks2000@outlook.com"}],"homepage":"https://github.com/Api-Wrappers/api-core#readme","bugs":{"url":"https://github.com/Api-Wrappers/api-core/issues"},"dist":{"shasum":"d79419f28e676d437bc290e97e181708ac7f14b1","tarball":"https://registry.npmjs.org/@api-wrappers/api-core/-/api-core-1.1.0.tgz","fileCount":28,"integrity":"sha512-a/9WidSFSBRD6r89xK6P+TXbbmVxs7WX3LBBtqEKYhspYXxSeMFee6wJLMPyH6clLO0IbrnAkSQm85p814Yw1A==","signatures":[{"sig":"MEQCIBoAAyfqMLJvEaV4UBeAx5P2GfGHtVh0ewlQutY8cs4JAiBYV1Pqxgqu/2KKCMH3d32d5gf1BvwjIZnQ51reS+N6nw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@api-wrappers%2fapi-core@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":425734},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.mts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./graphql":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"70164bec97cad32084229cacd3aa4abff35882e6","scripts":{"test":"bun test","build":"tsdown","check":"biome check --write .","verify":"bun run check:ci && bun run typecheck && bun test && bun run build && bun run pack:dry-run && bun run smoke:package","prepack":"bun run build","release":"changeset publish","check:ci":"biome check .","changeset":"changeset","typecheck":"tsc --noEmit","pack:dry-run":"bun pm pack --dry-run","smoke:package":"bun ./scripts/smoke-package.ts","version-packages":"changeset version"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:75921458-251e-4bbd-bcf4-43a83e549236"}},"repository":{"url":"git+https://github.com/Api-Wrappers/api-core.git","type":"git"},"_npmVersion":"11.18.0","description":"Shared TypeScript HTTP runtime for Api-Wrappers packages with typed requests, plugins, retries, timeouts, GraphQL, and custom transports.","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"bun@1.3.13","devDependencies":{"tsdown":"0.21.7","@types/bun":"1.3.11","typescript":"^5.9.3","@biomejs/biome":"2.4.9","@changesets/cli":"^2.31.0"},"peerDependencies":{"typescript":"^5 || ^6"},"_npmOperationalInternal":{"tmp":"tmp/api-core_1.1.0_1784337064223_0.7822951929261304","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@api-wrappers/api-core","version":"1.1.1","description":"Shared TypeScript HTTP runtime for Api-Wrappers packages with typed requests, plugins, retries, timeouts, GraphQL, and custom transports.","repository":{"type":"git","url":"git+https://github.com/Api-Wrappers/api-core.git"},"homepage":"https://github.com/Api-Wrappers/api-core#readme","bugs":{"url":"https://github.com/Api-Wrappers/api-core/issues"},"type":"module","packageManager":"bun@1.3.13","main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./graphql":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"sideEffects":false,"keywords":["api-core","api-wrapper","api-wrappers","http","http-client","client","fetch","plugin","cache","retry","timeout","graphql","transport","bun","api","wrapper","typescript"],"license":"MIT","scripts":{"build":"tsdown","test":"bun test","typecheck":"tsc --noEmit","check":"biome check --write .","check:ci":"biome check .","pack:dry-run":"bun pm pack --dry-run","smoke:package":"bun ./scripts/smoke-package.ts","verify":"bun run check:ci && bun run typecheck && bun test && bun run build && bun run pack:dry-run && bun run smoke:package","prepack":"bun run build","changeset":"changeset","version-packages":"changeset version","release":"changeset publish"},"engines":{"node":">=18"},"publishConfig":{"access":"public"},"devDependencies":{"@changesets/cli":"^2.31.0","@biomejs/biome":"2.4.9","@types/bun":"1.3.11","tsdown":"0.21.7","typescript":"^5.9.3"},"peerDependencies":{"typescript":"^5 || ^6"},"gitHead":"3f71b7a537ee6a5ff88e2d3636e7407d3243d26f","_id":"@api-wrappers/api-core@1.1.1","_nodeVersion":"24.20.0","_npmVersion":"11.18.0","dist":{"integrity":"sha512-4mibuUCo4La+Q5l+6gRP/rMWryvXQZY4lONNVINjhFYxqwgHOHvcMXLJ0RYVYWH4g46eVhcFm8rxYv3PzRurZg==","shasum":"821077251ed171f7e743026a27ca27571d7ddede","tarball":"https://registry.npmjs.org/@api-wrappers/api-core/-/api-core-1.1.1.tgz","fileCount":28,"unpackedSize":472655,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@api-wrappers%2fapi-core@1.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCcWAz/bJ7lMHh1HJL6SsRq8TkBSLPFZA3d3LSM5EQEogIhAPp2LDNVgjizrde/8E2dXsxm1+NngaFgk7mu/YY2CWAp"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:75921458-251e-4bbd-bcf4-43a83e549236"}},"directories":{},"maintainers":[{"name":"tdanks2000","email":"tommydanks2000@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/api-core_1.1.1_1789404055048_0.9734320130566116"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-09T09:21:31.552Z","modified":"2026-09-14T16:40:55.596Z","0.0.1":"2026-05-09T09:21:31.868Z","0.0.2":"2026-05-09T09:57:29.488Z","0.0.3":"2026-05-10T12:12:55.491Z","1.0.0":"2026-05-12T17:31:14.218Z","1.0.1":"2026-05-14T12:54:12.021Z","1.0.2":"2026-05-14T21:23:40.749Z","1.0.3":"2026-06-25T17:00:31.701Z","1.1.0":"2026-07-18T01:11:04.352Z","1.1.1":"2026-09-14T16:40:55.199Z"},"bugs":{"url":"https://github.com/Api-Wrappers/api-core/issues"},"license":"MIT","homepage":"https://github.com/Api-Wrappers/api-core#readme","keywords":["api-core","api-wrapper","api-wrappers","http","http-client","client","fetch","plugin","cache","retry","timeout","graphql","transport","bun","api","wrapper","typescript"],"repository":{"type":"git","url":"git+https://github.com/Api-Wrappers/api-core.git"},"description":"Shared TypeScript HTTP runtime for Api-Wrappers packages with typed requests, plugins, retries, timeouts, GraphQL, and custom transports.","maintainers":[{"name":"tdanks2000","email":"tommydanks2000@outlook.com"}],"readme":"<h1 align=\"center\">@api-wrappers/api-core</h1>\n\n<p align=\"center\">\n  Shared TypeScript HTTP runtime for API wrapper libraries.\n</p>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/@api-wrappers/api-core\"><img alt=\"npm version\" src=\"https://img.shields.io/npm/v/@api-wrappers/api-core\"></a>\n  <a href=\"https://github.com/Api-Wrappers/api-core/blob/main/LICENSE\"><img alt=\"license\" src=\"https://img.shields.io/npm/l/@api-wrappers/api-core\"></a>\n  <a href=\"https://github.com/Api-Wrappers/api-core/actions/workflows/ci.yml\"><img alt=\"CI\" src=\"https://github.com/Api-Wrappers/api-core/actions/workflows/ci.yml/badge.svg\"></a>\n  <a href=\"https://github.com/Api-Wrappers/api-core/stargazers\"><img alt=\"GitHub Repo stars\" src=\"https://img.shields.io/github/stars/api-wrappers/api-core\"></a>\n</p>\n\n`@api-wrappers/api-core` is the shared runtime that powers the Api-Wrappers\npackage ecosystem. It gives wrapper packages a small, predictable foundation for\nrequest execution, retries, timeouts, auth headers, caching, rate limiting,\nGraphQL requests, custom transports, and plugin-based request/response\nmiddleware.\n\nThis package exists so each wrapper does not need to reimplement fetch handling,\nerror parsing, retry behavior, timeout behavior, auth headers, cache hooks, or\ntest transports. Wrapper packages can focus on domain-specific endpoints and\ntypes while sharing one maintained HTTP layer.\n\n## Why use this?\n\n- Keep REST and GraphQL wrappers on one consistent request pipeline.\n- Reuse battle-tested auth, retry, timeout, cache, logger, and rate-limit\n  plugins instead of rewriting them per API.\n- Make wrapper clients easier to test by swapping `fetch` or the full\n  `Transport`.\n- Preserve strict TypeScript types while still handling unknown runtime errors\n  through exported error classes and guards.\n- Support Node, Bun, browsers, and edge runtimes without committing wrappers to\n  one server environment.\n- Give contributors one runtime contract to understand before improving any\n  wrapper package.\n\n## Used by\n\n`api-core` is intended to be the foundation under Api-Wrappers packages such as:\n\n- [`@api-wrappers/tmdb-wrapper`](https://github.com/Api-Wrappers/tmdb-wrapper)\n- [`@api-wrappers/trakt-wrapper`](https://github.com/Api-Wrappers/trakt-wrapper)\n- [`@api-wrappers/igdb-wrapper`](https://github.com/Api-Wrappers/igdb-wrapper)\n- [`@api-wrappers/anilist-wrapper`](https://github.com/Api-Wrappers/anilist-wrapper)\n\n## When should you use this directly?\n\nUse `@api-wrappers/api-core` directly when you are building a typed API wrapper,\nSDK, integration package, or internal service client and want shared HTTP\nbehavior without locking into a large framework. It is also useful when you need\na testable transport abstraction around `fetch`.\n\n## When should you not use this?\n\nDo not use this package when you only need one or two direct `fetch` calls, when\na provider's official SDK already covers your use case well, or when your\napplication needs generated clients from an OpenAPI or GraphQL schema as the\nprimary source of truth. `api-core` is a runtime foundation, not a schema\ngenerator, endpoint catalog, or full application data-fetching framework.\n\n## API Coverage\n\n`api-core` covers the shared HTTP runtime concerns wrapper packages usually\nneed:\n\n- Typed REST helpers: `get`, `post`, `put`, `patch`, `delete`, `head`,\n  `options`, and `request`.\n- `requestWithResponse` for wrappers that need response headers, status, or\n  plugin metadata.\n- GraphQL helper with typed `data` and `variables`.\n- Deterministic plugin lifecycle with `setup`, `beforeRequest`,\n  `afterResponse`, `onError`, and `dispose`.\n- Built-in auth, cache, logger, rate-limit, retry, and timeout plugins.\n- Native `HeadersInit` support for default, per-request, and GraphQL headers.\n- Type guards for ergonomic `unknown` error handling in TypeScript.\n- Fetch transport with JSON bodies, raw string bodies, abort signals, and\n  timeout handling.\n- Response parsing for JSON, text, and binary payloads.\n- Query string support for primitives and repeated array values.\n- ESM and CommonJS builds with TypeScript declarations.\n\n## Runtime support\n\n- TypeScript 5+\n- A runtime with `fetch`, `Request`, `Response`, and `AbortController`\n  available. Modern Node, Bun, browsers, and edge runtimes satisfy this.\n- For older runtimes, pass a custom `fetch` implementation or a full custom\n  `Transport`.\n\n## Installation\n\n```bash\nbun add @api-wrappers/api-core\n```\n\n```bash\nnpm install @api-wrappers/api-core\n```\n\n## Examples\n\n### Basic REST request\n\n```ts\nimport { createClient } from \"@api-wrappers/api-core\";\n\ninterface Movie {\n\tid: number;\n\ttitle: string;\n}\n\ninterface MovieSearchResponse {\n\tpage: number;\n\tresults: Array<Movie>;\n}\n\nconst client = createClient({\n\tbaseUrl: \"https://api.example.com/v1\",\n\tdefaultHeaders: { accept: \"application/json\" },\n});\n\nconst movies = await client.get<MovieSearchResponse>(\"/search/movie\", {\n\tquery: {\n\t\tquery: \"Arrival\",\n\t\tpage: 1,\n\t},\n});\n\nconsole.log(movies.results[0]?.title);\n```\n\n### Auth plugin\n\n```ts\nimport { createAuthPlugin, createClient } from \"@api-wrappers/api-core\";\n\nconst tokenStore: { accessToken?: string } = {\n\taccessToken: \"provider-access-token\",\n};\n\nconst client = createClient({\n\tbaseUrl: \"https://api.example.com/v1\",\n\tplugins: [\n\t\tcreateAuthPlugin({\n\t\t\tgetToken: () => tokenStore.accessToken,\n\t\t\theaderName: \"authorization\",\n\t\t\tscheme: \"Bearer\",\n\t\t}),\n\t],\n});\n\nawait client.get(\"/account\");\n```\n\nThe token is loaded for each request, so wrappers can refresh credentials\nwithout rebuilding the client.\n\n### Retry plugin\n\n```ts\nimport { createClient, createRetryPlugin } from \"@api-wrappers/api-core\";\n\nconst client = createClient({\n\tbaseUrl: \"https://api.example.com/v1\",\n\tplugins: [\n\t\tcreateRetryPlugin({\n\t\t\tmaxAttempts: 3,\n\t\t\tdelayMs: 300,\n\t\t\tjitter: true,\n\t\t\tretriableStatusCodes: [429, 500, 502, 503, 504],\n\t\t}),\n\t],\n});\n\nawait client.get(\"/temporarily-flaky-resource\");\n```\n\n### Timeout plugin\n\n```ts\nimport { createClient, createTimeoutPlugin } from \"@api-wrappers/api-core\";\n\nconst client = createClient({\n\tbaseUrl: \"https://api.example.com/v1\",\n\tplugins: [createTimeoutPlugin({ timeoutMs: 10_000 })],\n});\n\nawait client.get(\"/slow-report\");\n```\n\nRequests that exceed the timeout throw `TimeoutError`.\n\n### GraphQL request\n\n```ts\nimport { createClient, gql } from \"@api-wrappers/api-core\";\n\ninterface ViewerQuery {\n\tViewer: {\n\t\tid: number;\n\t\tname: string;\n\t};\n}\n\nconst client = createClient({\n\tbaseUrl: \"https://graphql.example.com\",\n});\n\nconst data = await client.graphql<ViewerQuery>(\"/\", {\n\tquery: gql`\n\t\tquery Viewer {\n\t\t\tViewer {\n\t\t\t\tid\n\t\t\t\tname\n\t\t\t}\n\t\t}\n\t`,\n});\n\nconsole.log(data.Viewer.name);\n```\n\n### Custom fetch / transport\n\nUse `fetch` when you only need to swap the fetch implementation:\n\n```ts\nimport { createClient } from \"@api-wrappers/api-core\";\nimport type { FetchLike } from \"@api-wrappers/api-core\";\n\nconst tracedFetch: FetchLike = async (input, init) => {\n\tconsole.log(\"api-core request\", input);\n\treturn fetch(input, init);\n};\n\nconst client = createClient({\n\tbaseUrl: \"https://api.example.com/v1\",\n\tfetch: tracedFetch,\n});\n```\n\nUse `transport` when tests or nonstandard runtimes need full execution control:\n\n```ts\nimport { createClient } from \"@api-wrappers/api-core\";\nimport type { Transport } from \"@api-wrappers/api-core\";\n\ninterface EchoBody {\n\turl: string;\n\tmethod: string;\n}\n\nconst testTransport: Transport = {\n\tasync execute(ctx) {\n\t\tconst body: EchoBody = {\n\t\t\turl: ctx.url,\n\t\t\tmethod: ctx.method,\n\t\t};\n\n\t\treturn new Response(JSON.stringify(body), {\n\t\t\theaders: { \"content-type\": \"application/json\" },\n\t\t});\n\t},\n};\n\nconst client = createClient({\n\tbaseUrl: \"https://api.example.com/v1\",\n\ttransport: testTransport,\n});\n```\n\n## Quick Start\n\n```ts\nimport {\n\tcreateAuthPlugin,\n\tcreateClient,\n\tcreateRetryPlugin,\n\tcreateTimeoutPlugin,\n} from \"@api-wrappers/api-core\";\n\ninterface User {\n\tid: string;\n\tname: string;\n}\n\nconst client = createClient({\n\tbaseUrl: \"https://api.example.com/v1\",\n\tdefaultHeaders: { accept: \"application/json\" },\n\tplugins: [\n\t\tcreateAuthPlugin(() => process.env.API_TOKEN),\n\t\tcreateRetryPlugin({ maxAttempts: 3, delayMs: 300 }),\n\t\tcreateTimeoutPlugin({ timeoutMs: 30_000 }),\n\t],\n});\n\nconst user = await client.get<User>(\"/users/123\");\n```\n\n`baseUrl` and request paths are slash-safe:\n\n```ts\nclient.get(\"/users\");\nclient.get(\"users\");\n```\n\nBoth work with `baseUrl: \"https://api.example.com/v1/\"`.\n\n## Client Configuration\n\n```ts\nimport { createClient } from \"@api-wrappers/api-core\";\n\nconst client = createClient({\n\tbaseUrl: \"https://api.example.com\",\n\tdefaultHeaders: {\n\t\taccept: \"application/json\",\n\t},\n\ttimeoutMs: 10_000,\n\tretry: {\n\t\tmaxAttempts: 2,\n\t\tdelayMs: 250,\n\t\tjitter: true,\n\t\tretriableStatusCodes: [429, 500, 502, 503, 504],\n\t},\n\tplugins: [],\n\tlogger: console,\n});\n```\n\n| Option | Purpose |\n| --- | --- |\n| `baseUrl` | Base URL prepended to relative request paths. |\n| `defaultHeaders` | Headers merged into every request. Per-request headers win. |\n| `timeoutMs` | Default request timeout. Can be overridden per request. |\n| `retry` | Global retry policy. Can be overridden by `createRetryPlugin`. |\n| `plugins` | Plugin list for auth, cache, logging, rate limiting, etc. |\n| `transport` | Full request executor override, useful in tests. |\n| `fetch` | Custom fetch implementation used by the default transport. |\n| `logger` | Internal diagnostics logger. Defaults to `console`. |\n\n## Requests\n\n```ts\nawait client.get<SearchResult>(\"/search\", {\n\tquery: {\n\t\tq: \"alien\",\n\t\tpage: 2,\n\t\twith_genres: [878, 12],\n\t\tskip: undefined,\n\t},\n\theaders: { accept: \"application/json\" },\n\ttimeoutMs: 5_000,\n\tsignal: abortController.signal,\n\ttags: [\"search\"],\n\tcacheKey: \"search:alien:2\",\n});\n```\n\nQuery values can be strings, numbers, booleans, nullish values, or arrays of\nthose primitives. `null` and `undefined` are skipped. Arrays are encoded as\nrepeated query parameters:\n\n```txt\n?with_genres=878&with_genres=12\n```\n\n### Request Methods\n\n```ts\nclient.get<T>(path, options);\nclient.post<T>(path, body, options);\nclient.put<T>(path, body, options);\nclient.patch<T>(path, body, options);\nclient.delete<T>(path, options);\nclient.head<T>(path, options);\nclient.options<T>(path, options);\nclient.request<T>(path, { method: \"POST\", body });\n```\n\nPlain objects and arrays are JSON encoded. Strings and native `BodyInit`\nvalues are sent as-is, which supports APIs that expect text query languages.\n`FormData`, `URLSearchParams`, blobs, and binary buffers are passed through\nwithout a default `content-type` so the runtime can set the correct one,\nincluding the multipart boundary:\n\n```ts\nconst games = await client.post<Array<Game>>(\n\t\"/games\",\n\t\"fields name,rating; limit 10;\",\n\t{\n\t\theaders: {\n\t\t\t\"content-type\": \"text/plain\",\n\t\t\taccept: \"application/json\",\n\t\t},\n\t},\n);\n```\n\nBinary responses can stay on the shared request path by selecting an explicit\nresponse type:\n\n```ts\nconst bytes = await client.post<ArrayBuffer>(\"/games.pb\", query, {\n\theaders: { accept: \"application/octet-stream\" },\n\tresponseType: \"arrayBuffer\",\n});\n```\n\n### Response Metadata\n\nUse `requestWithResponse` when a wrapper needs more than the parsed body:\n\n```ts\nconst result = await client.requestWithResponse<MoviePage>(\"/movie/popular\");\n\nresult.data;\nresult.response.status;\nresult.response.headers.get(\"x-ratelimit-remaining\");\nresult.request.url;\nresult.meta[\"cache.served\"];\n```\n\n## GraphQL\n\n```ts\ninterface GetMediaQuery {\n\tMedia: { id: number; title: { romaji: string } };\n}\n\ninterface GetMediaVariables {\n\tid: number;\n}\n\nconst data = await client.graphql<GetMediaQuery, GetMediaVariables>(\"/\", {\n\tquery: `\n\t\tquery GetMedia($id: Int) {\n\t\t\tMedia(id: $id) { id title { romaji } }\n\t\t}\n\t`,\n\tvariables: { id: 1 },\n\toperationName: \"GetMedia\",\n});\n\nconsole.log(data.Media.title.romaji);\n```\n\nGraphQL uses the same transport, plugin lifecycle, retry policy, timeout\nhandling, and error classes as REST requests.\n\n## Built-In Plugins\n\nPlugins are ordinary objects that run through a deterministic lifecycle. Lower\npriority values run earlier in `beforeRequest`; higher values run earlier in\n`afterResponse`.\n\n### Auth\n\n```ts\ncreateAuthPlugin(\"static-token\");\ncreateAuthPlugin(() => tokenStore.getAccessToken());\ncreateAuthPlugin({\n\tgetToken: () => apiKey,\n\theaderName: \"x-api-key\",\n\tscheme: null,\n});\n```\n\nThe default header is:\n\n```txt\nauthorization: Bearer <token>\n```\n\n### Retry\n\n```ts\ncreateRetryPlugin({\n\tmaxAttempts: 3,\n\tdelayMs: 300,\n\tjitter: true,\n\tretriableStatusCodes: [429, 500, 502, 503, 504],\n});\n```\n\n`429` responses respect `retry-after` when present. Numeric values are treated\nas seconds; HTTP-date values are also supported.\n\n### Timeout\n\n```ts\ncreateTimeoutPlugin({ timeoutMs: 30_000 });\n```\n\nTimeouts throw `TimeoutError`.\n\n### Rate Limit\n\n```ts\ncreateRateLimitPlugin({\n\tmaxConcurrent: 4,\n\tminTimeMs: 250,\n});\n```\n\n```ts\ncreateRateLimitPlugin({\n\tmaxRequestsPerInterval: 30,\n\tintervalMs: 60_000,\n});\n```\n\nThe limiter releases slots on successful responses, transport failures, and\nplugin failures. Queued requests also observe `RequestOptions.signal`: if the\ncaller aborts before the request acquires a slot, the queued item is removed and\nthe request rejects with the abort reason without reaching the transport.\n\n### Cache\n\n```ts\nimport { createCachePlugin, MemoryStore } from \"@api-wrappers/api-core\";\n\nconst cache = createCachePlugin({\n\tstore: new MemoryStore(),\n\tttlMs: 60_000,\n\tmethods: [\"GET\"],\n});\n\nconst client = createClient({\n\tbaseUrl: \"https://api.example.com\",\n\tplugins: [cache],\n});\n\nawait client.get(\"/users/1\", { tags: [\"user\"] });\nawait cache.invalidate(\"GET:https://api.example.com/users/1\");\nawait cache.invalidateByTag(\"user\");\n```\n\nCache hits skip the transport and set `meta[\"cache.served\"]`.\n\n### Logger\n\n```ts\ncreateLoggerPlugin({\n\tlogRequest: true,\n\tlogResponse: true,\n\tlogError: true,\n\tlogBody: false,\n\tlogger: console,\n});\n```\n\nRequest bodies are not logged by default. To log payloads in a trusted\nenvironment, opt in with `logBody: true` and use `redactBody` to remove tokens,\nsecrets, or user data before records reach your logger.\n\n```ts\ncreateLoggerPlugin({\n\tlogBody: true,\n\tredactBody: () => ({ token: \"[redacted]\" }),\n});\n```\n\nPass a structured logger or no-op logger to control diagnostics.\n\n## Custom Plugins\n\n```ts\nimport type { ApiPlugin } from \"@api-wrappers/api-core\";\n\nexport function createClientIdPlugin(clientId: string): ApiPlugin {\n\treturn {\n\t\tname: \"client-id\",\n\t\tpriority: 2,\n\t\tbeforeRequest(ctx) {\n\t\t\treturn {\n\t\t\t\t...ctx,\n\t\t\t\theaders: {\n\t\t\t\t\t...ctx.headers,\n\t\t\t\t\t\"client-id\": clientId,\n\t\t\t\t},\n\t\t\t};\n\t\t},\n\t};\n}\n```\n\nHooks may return a new context or `undefined` to keep the current one.\n\n| Hook | When it runs |\n| --- | --- |\n| `setup(client)` | Once, lazily before the first request. |\n| `beforeRequest(ctx)` | Before transport execution. |\n| `afterResponse(ctx)` | After response parsing. |\n| `onError(error, ctx)` | For transport, HTTP, and plugin failures. |\n| `dispose()` | When `client.dispose()` is called. |\n\nRead [docs/guides/plugins.md](docs/guides/plugins.md) for the full plugin\ncontract.\n\n## Error Handling\n\n```ts\nimport {\n\tisApiError,\n\tisGraphQLRequestError,\n\tisRateLimitError,\n\tisTimeoutError,\n} from \"@api-wrappers/api-core\";\n\ntry {\n\tawait client.get(\"/resource\");\n} catch (error) {\n\tif (isRateLimitError(error)) {\n\t\tconsole.log(error.retryAfterMs);\n\t} else if (isTimeoutError(error)) {\n\t\tconsole.log(\"timed out\");\n\t} else if (isGraphQLRequestError(error)) {\n\t\tconsole.log(error.graphqlErrors);\n\t} else if (isApiError(error)) {\n\t\tconsole.log(error.status, error.responseBody);\n\t}\n}\n```\n\n| Error | Meaning |\n| --- | --- |\n| `ApiError` | Non-2xx HTTP response after retries are exhausted. |\n| `RateLimitError` | HTTP 429 response. Includes `retryAfterMs` when available. |\n| `TimeoutError` | Request exceeded timeout. |\n| `GraphQLRequestError` | GraphQL response contained an `errors` array. |\n\n## Testing\n\nUse a custom transport for deterministic tests:\n\n```ts\nimport { BaseHttpClient } from \"@api-wrappers/api-core\";\n\nconst client = new BaseHttpClient({\n\tbaseUrl: \"https://api.example.com\",\n\ttransport: {\n\t\texecute: async (ctx) =>\n\t\t\tnew Response(JSON.stringify({ url: ctx.url }), {\n\t\t\t\theaders: { \"content-type\": \"application/json\" },\n\t\t\t}),\n\t},\n});\n```\n\nThis exercises the client, request options, plugins, and error handling without\nmaking network calls.\n\n## Package Exports\n\n```ts\nimport {\n\tApiError,\n\tBaseHttpClient,\n\tcreateAuthPlugin,\n\tcreateCachePlugin,\n\tcreateClient,\n\tcreateLoggerPlugin,\n\tcreateRateLimitPlugin,\n\tcreateRetryPlugin,\n\tcreateTimeoutPlugin,\n\tgql,\n\tGraphQLRequestError,\n\tisApiCoreError,\n\tisApiError,\n\tisGraphQLRequestError,\n\tisRateLimitError,\n\tisTimeoutError,\n\tMemoryStore,\n\tRateLimitError,\n\tTimeoutError,\n} from \"@api-wrappers/api-core\";\n\nimport type {\n\tApiCoreError,\n\tApiPlugin,\n\tApiResponse,\n\tClientConfig,\n\tFetchLike,\n\tHeaderInput,\n\tQueryParams,\n\tRequestContext,\n\tRequestOptions,\n\tResponseContext,\n\tTransport,\n} from \"@api-wrappers/api-core\";\n```\n\nThe package publishes:\n\n- ESM: `dist/index.mjs`\n- CommonJS: `dist/index.cjs`\n- Type declarations for both module formats\n- README, license, changelog, roadmap, contributing guide, and docs\n\n## More Documentation\n\n- [Documentation home](docs/README.md): recommended reading order and full docs\n  map.\n- [Getting started](docs/getting-started.md): install, create a client, and make\n  the first request.\n- [Examples](docs/examples.md): copy-pasteable REST, plugin, GraphQL,\n  transport, and error-handling examples.\n- [REST requests](docs/guides/rest-requests.md): methods, query params, request\n  bodies, abort signals, and response metadata.\n- [Built-in plugins](docs/guides/built-in-plugins.md): auth, retry, timeout,\n  rate-limit, cache, and logger usage.\n- [Client API reference](docs/reference/client.md): client methods and response\n  shapes.\n- [Roadmap](ROADMAP.md): runtime direction, priorities, and non-goals.\n- [Contributing](CONTRIBUTING.md): local setup, review expectations, and\n  validation commands.\n- [Contributing ideas](docs/contributing-ideas.md): starter issue ideas for new\n  contributors.\n\n## Development\n\n```bash\nbun install\nbun run verify\nbun run check\nbun run typecheck\nbun test\nbun run build\nbun run pack:dry-run\nbun run smoke:package\n```\n\n`dist` is generated by `tsdown`. The published package includes `dist`, `docs`,\n`README.md`, `LICENSE`, `CHANGELOG.md`, `CONTRIBUTING.md`, `ROADMAP.md`, and\n`package.json`. `bun run smoke:package` packs the project into a temporary\nconsumer and verifies both ESM import and CommonJS require from the package root.\n\n## Release process\n\nMaintainers release from `main` with Changesets. Add a changeset with\n`bun run changeset`, merge the generated version PR, and the release workflow\nwill run validation, publish to npm with provenance, and create GitHub release\nnotes. See [.github/RELEASE.md](.github/RELEASE.md) for npm trusted publishing\nsettings and safe dry-run guidance.\n","readmeFilename":"README.md"}