{"_id":"@africanies/shipping","_rev":"5-2952ea46900a6384fef1bf40027eb1d9","name":"@africanies/shipping","dist-tags":{"latest":"0.4.1"},"versions":{"0.1.0":{"name":"@africanies/shipping","version":"0.1.0","keywords":["africanies","shipping","logistics","sdk","custom-elements"],"license":"MIT","_id":"@africanies/shipping@0.1.0","maintainers":[{"name":"africanies","email":"ike.k@africanies.com"}],"dist":{"shasum":"3fee303afbe37a961a117e1168cfe8d5c529ae1f","tarball":"https://registry.npmjs.org/@africanies/shipping/-/shipping-0.1.0.tgz","fileCount":37,"integrity":"sha512-e4gBMojOkQJegOOeSuD3/4gR3/VsFSwd7p1HyAX7SCUKFel9TIllPf1eqhU5Nq8TdYEVqIrJYiXGoyjJ8WJt/Q==","signatures":[{"sig":"MEYCIQC94TYXrPT30kUycqwoUIWxNH54Iygeank3E7zemRiteQIhALf9v0igW8S4T3GBS6sCOB1WPzj+ZuYxACF+d/B+Buld","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":312426},"main":"./dist/index.js","type":"module","types":"./dist/types/index.d.ts","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/index.js"},"./ui":{"types":"./dist/types/ui.d.ts","import":"./dist/ui.js"},"./server":{"types":"./dist/types/server.d.ts","import":"./dist/server.js"},"./browser":{"types":"./dist/types/browser.d.ts","import":"./dist/browser.js"},"./elements":{"types":"./dist/types/elements.d.ts","import":"./dist/elements.js"},"./package.json":"./package.json"},"gitHead":"9ee587de9fc2e0ab1ff7ef37f8219d295fa05875","scripts":{"test":"vitest run","build":"npm run clean && vite build && vite build --config vite.config.cdn.ts && tsc -p tsconfig.build.json","check":"tsc --noEmit","clean":"node ./scripts/clean.mjs","verify":"npm run check && npm test && npm run build && npm run pack:check","preview":"vite preview","pack:check":"npm pack --dry-run","test:watch":"vitest","test:browser":"npm run build && playwright test","test:coverage":"vitest run --coverage","test:browser:built":"playwright test"},"_npmUser":{"name":"africanies","email":"ike.k@africanies.com"},"_npmVersion":"10.9.7","description":"Official AfricanIES Shipping JavaScript and TypeScript SDK","directories":{},"sideEffects":["./dist/browser.js","./dist/elements.js","./dist/africanies-shipping.global.js"],"_nodeVersion":"22.22.2","_hasShrinkwrap":false,"devDependencies":{"vite":"^8.2.1","jsdom":"^30.0.1","vitest":"^4.1.11","typescript":"^7.0.2","@types/node":"^26.2.0","@playwright/test":"^1.62.1","@vitest/coverage-v8":"^4.1.11"},"_npmOperationalInternal":{"tmp":"tmp/shipping_0.1.0_1787085955740_0.5282606683103006","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@africanies/shipping","version":"0.2.0","keywords":["africanies","shipping","logistics","sdk","custom-elements"],"license":"MIT","_id":"@africanies/shipping@0.2.0","maintainers":[{"name":"africanies","email":"ike.k@africanies.com"}],"homepage":"https://github.com/A-I-E-S/javascript-sdk#readme","bugs":{"url":"https://github.com/A-I-E-S/javascript-sdk/issues"},"dist":{"shasum":"e271acbf8b0daaec87e8f94269e15fc7e7574b11","tarball":"https://registry.npmjs.org/@africanies/shipping/-/shipping-0.2.0.tgz","fileCount":39,"integrity":"sha512-MHfIrSvr2NZHbqNK2uI6+Egq74XKe1MQXCkEXpgPGTD0Twsp8mWVVxF43pjY5OjM1y7DYL1UkZkfqU0kmjNJug==","signatures":[{"sig":"MEYCIQD4xjKuu2VXWyEmFHkdtVtFSpsUzwkP7w26G+ebu5+apgIhANOsNDWHEYdIiqH/LTGFE+6IHeUMrTAXT/u8kNjpI2Tc","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":362411},"main":"./dist/index.js","type":"module","types":"./dist/types/index.d.ts","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/index.js"},"./ui":{"types":"./dist/types/ui.d.ts","import":"./dist/ui.js"},"./server":{"types":"./dist/types/server.d.ts","import":"./dist/server.js"},"./browser":{"types":"./dist/types/browser.d.ts","import":"./dist/browser.js"},"./elements":{"types":"./dist/types/elements.d.ts","import":"./dist/elements.js"},"./package.json":"./package.json"},"gitHead":"62cf2b16474839538a25940e108ff4c22a4eb5df","scripts":{"test":"vitest run","build":"npm run clean && vite build && vite build --config vite.config.cdn.ts && tsc -p tsconfig.build.json","check":"tsc --noEmit","clean":"node ./scripts/clean.mjs","verify":"npm run check && npm test && npm run build && npm run pack:check","preview":"vite preview","pack:check":"npm pack --dry-run","test:watch":"vitest","test:browser":"npm run build && playwright test","test:coverage":"vitest run --coverage","test:browser:built":"playwright test"},"_npmUser":{"name":"africanies","email":"ike.k@africanies.com"},"repository":{"url":"git+https://github.com/A-I-E-S/javascript-sdk.git","type":"git"},"_npmVersion":"10.9.7","description":"Official AfricanIES Shipping JavaScript and TypeScript SDK","directories":{},"sideEffects":["./dist/browser.js","./dist/elements.js","./dist/africanies-shipping.global.js"],"_nodeVersion":"22.22.2","_hasShrinkwrap":false,"devDependencies":{"vite":"^8.2.1","jsdom":"^30.0.1","vitest":"^4.1.11","typescript":"^7.0.2","@types/node":"^26.2.0","@playwright/test":"^1.62.1","@vitest/coverage-v8":"^4.1.11"},"_npmOperationalInternal":{"tmp":"tmp/shipping_0.2.0_1787094804320_0.7391686323480455","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@africanies/shipping","version":"0.3.0","keywords":["africanies","shipping","logistics","sdk","custom-elements"],"license":"MIT","_id":"@africanies/shipping@0.3.0","maintainers":[{"name":"africanies","email":"ike.k@africanies.com"}],"homepage":"https://github.com/A-I-E-S/javascript-sdk#readme","bugs":{"url":"https://github.com/A-I-E-S/javascript-sdk/issues"},"dist":{"shasum":"100073831557c161c23ca1ad74d69a0a08b714a9","tarball":"https://registry.npmjs.org/@africanies/shipping/-/shipping-0.3.0.tgz","fileCount":45,"integrity":"sha512-TbniqZWF6n+pjTgBaixWpdfvigHgGOOPn9MuN0HbHeMToB4wYwEQzzWxBrYCttob49h5B8nqnO4Jq0tWLyVW6g==","signatures":[{"sig":"MEUCIGDUeNCxt/Rq+XRx2Q402iaDiJavs7SGAcESwKAlWY0jAiEA7XFE8IICjsosZtAhqGFpviOpZiBKXEnMniNK+8B5uAQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":613803},"main":"./dist/index.js","type":"module","types":"./dist/types/index.d.ts","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/index.js"},"./ui":{"types":"./dist/types/ui.d.ts","import":"./dist/ui.js"},"./server":{"types":"./dist/types/server.d.ts","import":"./dist/server.js"},"./browser":{"types":"./dist/types/browser.d.ts","import":"./dist/browser.js"},"./elements":{"types":"./dist/types/elements.d.ts","import":"./dist/elements.js"},"./package.json":"./package.json"},"gitHead":"dd65d654f7fdc6664cb7ddc54f6e4603a185dd68","scripts":{"test":"vitest run","build":"npm run clean && vite build && vite build --config vite.config.cdn.ts && tsc -p tsconfig.build.json","check":"tsc --noEmit","clean":"node ./scripts/clean.mjs","verify":"npm run check && npm test && npm run build && npm run pack:check","preview":"vite preview","pack:check":"npm pack --dry-run","test:watch":"vitest","test:browser":"npm run build && playwright test","pack:consumer":"node ./scripts/verify-packed-consumer.mjs","test:coverage":"vitest run --coverage","test:browser:built":"playwright test"},"_npmUser":{"name":"africanies","email":"ike.k@africanies.com"},"repository":{"url":"git+https://github.com/A-I-E-S/javascript-sdk.git","type":"git"},"_npmVersion":"10.9.8","description":"Official AfricanIES Shipping JavaScript and TypeScript SDK","directories":{},"sideEffects":["./dist/browser.js","./dist/elements.js","./dist/africanies-shipping.global.js"],"_nodeVersion":"22.23.1","_hasShrinkwrap":false,"devDependencies":{"vite":"^8.2.1","jsdom":"^30.0.1","vitest":"^4.1.11","typescript":"^7.0.2","@types/node":"^26.2.0","@playwright/test":"^1.62.1","@vitest/coverage-v8":"^4.1.11"},"_npmOperationalInternal":{"tmp":"tmp/shipping_0.3.0_1787539941904_0.3471421137661568","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@africanies/shipping","version":"0.4.0","keywords":["africanies","shipping","logistics","sdk","custom-elements"],"license":"MIT","_id":"@africanies/shipping@0.4.0","maintainers":[{"name":"africanies","email":"ike.k@africanies.com"}],"homepage":"https://github.com/A-I-E-S/javascript-sdk#readme","bugs":{"url":"https://github.com/A-I-E-S/javascript-sdk/issues"},"dist":{"shasum":"b72654e95120e9fed2c3bdf9241f7af84b164e4e","tarball":"https://registry.npmjs.org/@africanies/shipping/-/shipping-0.4.0.tgz","fileCount":41,"integrity":"sha512-b+4zwMpccB/fJVC07+4xv56rtDNADNaNvExyr1jDMyj1KkNB2/9Jwf/Db2zmRHg7G5PQ33/CQOKDlanu3XIAzQ==","signatures":[{"sig":"MEYCIQDlI/hJqKNmGGdofw51px/87FZn08oZCpeZyHygoytJ8QIhAKLmTYFiO16CXOf1BHJnVoOH4ZukKC2//qU/MXMW6rWD","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":449989},"main":"./dist/index.js","type":"module","_from":"file:africanies-shipping-0.4.0.tgz","types":"./dist/types/index.d.ts","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/index.js"},"./ui":{"types":"./dist/types/ui.d.ts","import":"./dist/ui.js"},"./server":{"types":"./dist/types/server.d.ts","import":"./dist/server.js"},"./browser":{"types":"./dist/types/browser.d.ts","import":"./dist/browser.js"},"./elements":{"types":"./dist/types/elements.d.ts","import":"./dist/elements.js"},"./package.json":"./package.json"},"scripts":{"test":"vitest run","build":"npm run clean && vite build && vite build --config vite.config.elements.ts && vite build --config vite.config.cdn.ts && tsc -p tsconfig.build.json","check":"tsc --noEmit","clean":"node ./scripts/clean.mjs","verify":"npm run check && npm test && npm run build && npm run pack:check","preview":"vite preview","pack:check":"npm pack --dry-run","test:watch":"vitest","test:browser":"npm run build && playwright test","pack:consumer":"node ./scripts/verify-packed-consumer.mjs","test:coverage":"vitest run --coverage","test:browser:built":"playwright test"},"_npmUser":{"name":"africanies","email":"ike.k@africanies.com"},"_resolved":"/private/tmp/javascript-sdk-release-040/africanies-shipping-0.4.0.tgz","_integrity":"sha512-b+4zwMpccB/fJVC07+4xv56rtDNADNaNvExyr1jDMyj1KkNB2/9Jwf/Db2zmRHg7G5PQ33/CQOKDlanu3XIAzQ==","repository":{"url":"git+https://github.com/A-I-E-S/javascript-sdk.git","type":"git"},"_npmVersion":"10.2.4","description":"Official AfricanIES Shipping JavaScript and TypeScript SDK","directories":{},"sideEffects":["./dist/browser.js","./dist/elements.js","./dist/africanies-shipping.global.js"],"_nodeVersion":"20.11.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^8.2.1","jsdom":"^30.0.1","vitest":"^4.1.11","typescript":"^7.0.2","@types/node":"^26.2.0","tailwindcss":"4.3.3","@playwright/test":"^1.62.1","@tailwindcss/vite":"4.3.3","@vitest/coverage-v8":"^4.1.11"},"_npmOperationalInternal":{"tmp":"tmp/shipping_0.4.0_1787574168637_0.08733848884823825","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@africanies/shipping","version":"0.4.1","description":"Official AfricanIES Shipping JavaScript and TypeScript SDK","type":"module","license":"MIT","sideEffects":["./dist/browser.js","./dist/elements.js","./dist/africanies-shipping.global.js"],"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/types/index.d.ts","repository":{"type":"git","url":"git+https://github.com/A-I-E-S/javascript-sdk.git"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/index.js"},"./server":{"types":"./dist/types/server.d.ts","import":"./dist/server.js"},"./ui":{"types":"./dist/types/ui.d.ts","import":"./dist/ui.js"},"./elements":{"types":"./dist/types/elements.d.ts","import":"./dist/elements.js"},"./browser":{"types":"./dist/types/browser.d.ts","import":"./dist/browser.js"},"./package.json":"./package.json"},"engines":{"node":">=22"},"scripts":{"clean":"node ./scripts/clean.mjs","check":"tsc --noEmit","build":"npm run clean && vite build && vite build --config vite.config.elements.ts && vite build --config vite.config.cdn.ts && tsc -p tsconfig.build.json","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","test:browser":"npm run build && playwright test","test:browser:built":"playwright test","pack:check":"npm pack --dry-run","pack:consumer":"node ./scripts/verify-packed-consumer.mjs","preview":"vite preview","verify":"npm run check && npm test && npm run build && npm run pack:check"},"keywords":["africanies","shipping","logistics","sdk","custom-elements"],"devDependencies":{"@playwright/test":"^1.62.1","@tailwindcss/vite":"4.3.3","@types/node":"^26.2.0","@vitest/coverage-v8":"^4.1.11","jsdom":"^30.0.1","tailwindcss":"4.3.3","typescript":"^7.0.2","vite":"^8.2.1","vitest":"^4.1.11"},"bugs":{"url":"https://github.com/A-I-E-S/javascript-sdk/issues"},"homepage":"https://github.com/A-I-E-S/javascript-sdk#readme","_id":"@africanies/shipping@0.4.1","_integrity":"sha512-9TpMcZ+4Wz9FIJ1nsHbu5EKflkpEehjUcK+JM17gppgLI1wixFmT863gB+/O8FBpWc8f1Ns3wRCEHYrG9UQs5Q==","_resolved":"/private/tmp/javascript-sdk-release-041/africanies-shipping-0.4.1.tgz","_from":"file:africanies-shipping-0.4.1.tgz","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-9TpMcZ+4Wz9FIJ1nsHbu5EKflkpEehjUcK+JM17gppgLI1wixFmT863gB+/O8FBpWc8f1Ns3wRCEHYrG9UQs5Q==","shasum":"ad3a63c112a3ebf7fd633cb45537636826437383","tarball":"https://registry.npmjs.org/@africanies/shipping/-/shipping-0.4.1.tgz","fileCount":41,"unpackedSize":451250,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDW/SwjamdhQqqts5rof9f7k/mimWVn9fPp9Ipxsp8EzgIhAMbxDs04x/C70VVXGxssgRl/fDb7cv1oB5A24H0A2zax"}]},"_npmUser":{"name":"africanies","email":"ike.k@africanies.com"},"directories":{},"maintainers":[{"name":"africanies","email":"ike.k@africanies.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/shipping_0.4.1_1787575296296_0.1883183576502201"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-18T20:45:55.475Z","modified":"2026-08-24T12:41:36.672Z","0.1.0":"2026-08-18T20:45:55.884Z","0.2.0":"2026-08-18T23:13:24.483Z","0.3.0":"2026-08-24T02:52:22.049Z","0.4.0":"2026-08-24T12:22:48.784Z","0.4.1":"2026-08-24T12:41:36.451Z"},"bugs":{"url":"https://github.com/A-I-E-S/javascript-sdk/issues"},"license":"MIT","homepage":"https://github.com/A-I-E-S/javascript-sdk#readme","keywords":["africanies","shipping","logistics","sdk","custom-elements"],"repository":{"type":"git","url":"git+https://github.com/A-I-E-S/javascript-sdk.git"},"description":"Official AfricanIES Shipping JavaScript and TypeScript SDK","maintainers":[{"name":"africanies","email":"ike.k@africanies.com"}],"readme":"# AfricanIES Shipping JavaScript SDK\n\nOfficial TypeScript/JavaScript client and framework-neutral UI for AfricanIES shipping integrations.\n\n> **Release status:** `@africanies/shipping@0.4.0` is published on npm. This documentation-only source update prepares `0.4.1`; publishing it remains a separate, authorized release step.\n\n## Live UAT Demo\n\nTry the public, sandbox-only demos without installing the SDK:\n\n- [Automatic checkout](https://a-i-e-s.github.io/javascript-sdk/) — the recommended default flow; the SDK selects from configurable boxes using cart quantities, unit weights, dimensions, protective allowance, and weight limits.\n- [Manual packaging lab](https://a-i-e-s.github.io/javascript-sdk/manual.html) — the host application controls the physical boxes, item assignments, measurements, and gross weights. This is an integration choice, not a customer checkout option.\n\nBoth demos require your own sandbox Base64 API credential at runtime. Credentials are not included in the site or repository; use sandbox credentials only because Base64 is encoding, not encryption.\n\n## Installation\n\n```sh\nnpm install @africanies/shipping\n```\n\n## Quick start\n\n```ts\nimport { createAfricaniesClient } from '@africanies/shipping';\n\nconst client = createAfricaniesClient({\n  environment: 'test',\n  auth: { encodedKey: 'BASE64_PUBLIC_KEY_COLON_PRIVATE_KEY' },\n});\n\nconst rates = await client.shipments.getRates(rateRequest);\n```\n\n`test` is the default environment and uses `https://api-sandbox.africaniestest.com`. `live` uses `https://api.africanies.com` and must be selected explicitly.\n\nShipment direction is inferred per request. A Nigerian sender means SFN; a populated non-Nigerian sender means STN, which requires a Nigerian receiver. `shipmentMode` remains an optional legacy hint for an incomplete draft, but populated addresses are authoritative.\n\nAuthentication can be provided as an already encoded API key or as raw keys:\n\n```ts\nauth: { encodedKey: '...' }\n// or\nauth: { publicKey: '...', privateKey: '...' }\n```\n\nBase64 is reversible encoding, not encryption. Never embed a credential in a published bundle, source map, repository, or log.\n\nRuntime Base64 credentials remain the selected integration model for the current stabilization work. The final policy for live browser integrations versus a backend/custom transport is pending; assess browser exposure before using a live credential.\n\n## Package entry points\n\n- `@africanies/shipping` — headless client and exact wire types\n- `@africanies/shipping/server` — server-oriented helpers\n- `@africanies/shipping/ui` — stage controllers and upload orchestration\n- `@africanies/shipping/elements` — native custom elements\n- `@africanies/shipping/browser` — client, controllers, and auto-registering elements for browser ESM\n\nThe browser UI is compiled with the exact Tailwind CSS v4 build toolchain during SDK development. Consumers do not install Tailwind or import a stylesheet: element styles are embedded in the browser/element bundles and isolated inside each Shadow Root. Headless, server, and controller-only entry points remain DOM- and CSS-free.\n\nDetailed guides are under [`docs/`](./docs/), including [getting started](./docs/getting-started.md), [checkout packaging](./docs/checkout-packaging.md), and the [UI guide](./docs/ui.md). The canonical [live automatic UAT demo](https://a-i-e-s.github.io/javascript-sdk/) and [manual packaging lab](https://a-i-e-s.github.io/javascript-sdk/manual.html) exercise the published browser integration without embedding credentials.\n\nVersion `0.2.0` introduced shipment wire-type corrections based on observed rate and purchase payloads. It contains breaking TypeScript and rate-to-purchase adapter changes; see [the migration guide](./docs/migrating-to-0.2.md) and [changelog](./CHANGELOG.md).\n\nSome implemented request details intentionally follow owner-confirmed sandbox evidence that differs from the public API documentation. Review [the API contract notes](./docs/api-contract.md); do not infer that these variances have been corrected in the public API/OpenAPI description.\n\n## Checkout and packaging\n\n`calculatePackaging()` is an optional host-facing preprocessor. Automatic mode is the new helper's default: it applies the configured allowance to every item's length, width, and height, performs deterministic three-dimensional placement, observes the global and per-box weight limits, and returns the existing `RateBox[]` contract plus a packaging breakdown. A host can instead pass `{ mode: 'manual', boxes }`; the existing builder and direct client methods are unchanged.\n\nItem `weight` is always unit weight. The backend line weight is `quantity × weight`; the generated box weight is the combined contents and configured empty-box weight. Do not send the multiplied line weight as an item's unit weight.\n\n`buildRateRequestFromPackaging()` adapts a complete result to the existing rates API, `selectCheckoutRate()` returns a validated numeric shipping cost, and `purchaseAfterPayment()` requires an explicit host payment confirmation before delegating to the existing purchase API. The low-level `client.shipments.purchase()` remains available for integrations that own their orchestration.\n\nSFN means Ship From Nigeria and requires a Nigerian sender. STN means Ship To Nigeria and requires a Nigerian receiver. The UI validators enforce these invariants before rates and purchase.\n\nThe [vanilla UAT demo](./examples/vanilla/) is a test-mode, SFN-only mini checkout. Its Base64 credential is entered at runtime and kept in memory only.\n\n## Development\n\n```sh\nnpm install\nnpm run check\nnpm run build\nnpm test\n```\n\nNo release or publication is authorized by implementation approval alone.\n","readmeFilename":"README.md"}