{"_id":"@ardent-africa/sdk","_rev":"3-d9ec532d168bdc7f0f915ed05086fb54","name":"@ardent-africa/sdk","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@ardent-africa/sdk","version":"1.0.0","keywords":["ardent","ardent-africa","api","sdk","fundraising","petitions","ghana"],"license":"MIT","_id":"@ardent-africa/sdk@1.0.0","maintainers":[{"name":"deyoungdoer","email":"mdyoungdoer@gmail.com"}],"homepage":"https://docs.ardent.africa/developers/sdks","bugs":{"url":"https://github.com/mdYoungDOer/ardent-africa/issues"},"dist":{"shasum":"9b362dcb3973932d356d5a2d5da2a06ee2a1e0d3","tarball":"https://registry.npmjs.org/@ardent-africa/sdk/-/sdk-1.0.0.tgz","fileCount":7,"integrity":"sha512-URhkp8P83wjfxeK21MEZmvSVVMqaE4Dm5Zoc5g4uhJvBfygaLoPx5os4xgB13ao7jcklKAEPwGaUWFsaHBp/gQ==","signatures":[{"sig":"MEYCIQCwa0LOf4BRuAH3HaMyTjnvHCyqaSe8RuTdYPiu8U6ffAIhAIXIKgn+s47uPSTbA1P677oeY+mMtHdDvpM8+WR8+gdi","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26051},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"0838c38658ddf9796874d1c6676fb4fd95583bbe","scripts":{"test":"node --import tsx --test src/*.test.ts","build":"tsup src/index.ts --format esm,cjs --dts --clean","typecheck":"tsc --noEmit"},"_npmUser":{"name":"deyoungdoer","email":"mdyoungdoer@gmail.com"},"repository":{"url":"git+https://github.com/mdYoungDOer/ardent-africa.git","type":"git","directory":"integrations/sdk-js"},"_npmVersion":"11.10.1","description":"Typed, read-only client for the Ardent Africa public API (/public/v1).","directories":{},"_nodeVersion":"24.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.6","tsup":"^8.3.0","typescript":"^5.9.3","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.0_1782485655866_0.2609447706212411","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@ardent-africa/sdk","version":"1.0.1","keywords":["ardent","ardent-africa","api","sdk","fundraising","petitions","ghana"],"license":"MIT","_id":"@ardent-africa/sdk@1.0.1","maintainers":[{"name":"deyoungdoer","email":"mdyoungdoer@gmail.com"}],"homepage":"https://docs.ardent.africa/docs/developers/sdks","dist":{"shasum":"c9ef7bd75e5764503838926cc12ee072e40ddb12","tarball":"https://registry.npmjs.org/@ardent-africa/sdk/-/sdk-1.0.1.tgz","fileCount":7,"integrity":"sha512-WdGaLaW4F1Ro0FRTyxRlSo4HSr0WtF+7+S0wpoS/U59Up7vEuPBi1ES1jyyVpsat3OqzmbFt9Ue45ioEA9DbyQ==","signatures":[{"sig":"MEUCIQDMAOT9ers1hCT+Jh8fZ5eTHdjwIOMO6CoolZsppsdYLAIgTfBAyHc5hFqjJ7J/XScM2vgVwKYOV2I0L6qBvygW758=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25917},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"9f53ff28468ced488774a26da788bd2857e5e06e","scripts":{"test":"node --import tsx --test src/*.test.ts","build":"tsup src/index.ts --format esm,cjs --dts --clean","typecheck":"tsc --noEmit"},"_npmUser":{"name":"deyoungdoer","email":"mdyoungdoer@gmail.com"},"_npmVersion":"11.10.1","description":"Typed, read-only client for the Ardent Africa public API (/public/v1).","directories":{},"_nodeVersion":"24.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.6","tsup":"^8.3.0","typescript":"^5.9.3","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.1_1782486656224_0.678095942775486","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@ardent-africa/sdk","version":"1.1.0","description":"Typed, read-only client for the Ardent Africa public API (/public/v1).","license":"MIT","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup src/index.ts --format esm,cjs --dts --clean","typecheck":"tsc --noEmit","test":"node --import tsx --test src/*.test.ts"},"engines":{"node":">=18"},"publishConfig":{"access":"public"},"devDependencies":{"@types/node":"^22.0.0","tsup":"^8.3.0","tsx":"^4.20.6","typescript":"^5.9.3"},"keywords":["ardent","ardent-africa","api","sdk","fundraising","petitions","ghana"],"homepage":"https://docs.ardent.africa/docs/developers/sdks","gitHead":"adb54de6c83ee3b8bb43f4c8197456f65ac138d9","_id":"@ardent-africa/sdk@1.1.0","_nodeVersion":"24.15.0","_npmVersion":"11.10.1","dist":{"integrity":"sha512-ltrzw1cvtUPievlCfDArf85zza58+8+araBiiQ4lP9f1H0cDLaAhLyy9aG8Ief/Upek9WN8lpYtkKMx87yd/XQ==","shasum":"a53ca2e5750a1dc601a0f031867ec84ab6468245","tarball":"https://registry.npmjs.org/@ardent-africa/sdk/-/sdk-1.1.0.tgz","fileCount":8,"unpackedSize":34491,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEjyz9iOoEItQOTEUXKnkvjruNc9v2bgcCe4w8DYgMPAAiBdsdaI/N4sVuTDrg3ynQvry4lDD6tDeCaDnQp7wSsaHg=="}]},"_npmUser":{"name":"deyoungdoer","email":"mdyoungdoer@gmail.com"},"directories":{},"maintainers":[{"name":"deyoungdoer","email":"mdyoungdoer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_1.1.0_1784149885499_0.5682909877333631"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-26T14:54:15.477Z","modified":"2026-07-15T21:11:25.804Z","1.0.0":"2026-06-26T14:54:16.011Z","1.0.1":"2026-06-26T15:10:56.375Z","1.1.0":"2026-07-15T21:11:25.640Z"},"license":"MIT","homepage":"https://docs.ardent.africa/docs/developers/sdks","keywords":["ardent","ardent-africa","api","sdk","fundraising","petitions","ghana"],"description":"Typed, read-only client for the Ardent Africa public API (/public/v1).","maintainers":[{"name":"deyoungdoer","email":"mdyoungdoer@gmail.com"}],"readme":"# @ardent-africa/sdk\n\nA tiny, typed, **read-only** client for the [Ardent Africa public API](https://docs.ardent.africa/docs/developers) (`/public/v1`). Campaigns, petitions, events, jobs, review entities and TrustScore, marketplace listings, blog posts, public profiles, and platform stats. No write access, no PII.\n\n## Install\n\n```bash\nnpm install @ardent-africa/sdk\n```\n\nWorks in Node 18+ and modern browsers (uses the global `fetch`).\n\n## Usage\n\n```ts\nimport { ArdentClient } from '@ardent-africa/sdk';\n\n// The key is optional (keyless works at a lower rate tier). Create one at\n// https://ardent.africa/dashboard/developer\nconst ardent = new ArdentClient({ apiKey: process.env.ARDENT_API_KEY });\n\nconst { data, total } = await ardent.listCampaigns({ limit: 5, category: 'Education' });\nconst campaign = await ardent.getCampaign('clean-water-for-tamale');\nconst stats = await ardent.getStats();\n```\n\n### Methods\n\n`listCampaigns` · `getCampaign` · `listPetitions` · `getPetition` · `listEvents` · `getEvent` ·\n`listJobs` · `getJob` · `listReviewEntities` · `getReviewEntity` · `listServices` · `getService` ·\n`listCategories` · `listBlog` · `getBlogPost` · `getProfile` · `getStats`.\nList methods return `{ data, page, limit, total }`.\n\n### Errors\n\nNon-2xx responses throw an `ArdentApiError` with `code`, `message`, `status`, and `ref`:\n\n```ts\nimport { ArdentApiError } from '@ardent-africa/sdk';\n\ntry {\n  await ardent.getCampaign('does-not-exist');\n} catch (err) {\n  if (err instanceof ArdentApiError && err.code === 'NOT_FOUND') { /* … */ }\n}\n```\n\n### Options\n\n```ts\nnew ArdentClient({\n  apiKey: 'ardent_pk_…',                       // optional\n  baseUrl: 'https://api.ardent.africa/public/v1', // override for staging\n  fetch: customFetch,                          // optional fetch impl\n});\n```\n\n## Develop\n\n```bash\nnpm install\nnpm run typecheck\nnpm test\nnpm run build   # emits dist/ (ESM + CJS + d.ts)\n```\n\nThe types mirror the published [OpenAPI contract](https://api.ardent.africa/public/v1/openapi.json); the API is additive within `v1`, so treat response objects as open.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}